This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR6843AOP: APP into abnormal through SBL demo loaded.

Part Number: AWR6843AOP
Other Parts Discussed in Thread: UNIFLASH, IWR6843ISK, IWR6843

Hi,

I build sbl demo bin file successful by "mmwave_sdk_03_05_00_04\packages\ti\utils\sbl".

I download app bin file by uniFlash, the app project work stable and  send CAN message at every 100ms.

But when I use sbl download app bin file by xmode and load app. The app only can sended two CAN message and app into abnormal.

By I analyse, when app use interrupt, the function is "HwiP_create",will happen this issue.

Did the APP need do something if we want use sbl.

  • Hello,

    Can you please answer a few questions. 

    1. Which APP project are you using? Is it a lab or is it custom code?

    2. It seems you have a project that outputs data on the CAN bus. The SBL project will load the new binary via the UART lines, is this correct?

    3. Can you load any project via the SBL? If you load in the OOB demo does this program work correctly?

    Regards,

    Jackson

  • 1. Which APP project are you using? Is it a lab or is it custom code?

    It's custom code, this app code can single run stable by uniflash download.

    2. It seems you have a project that outputs data on the CAN bus. The SBL project will load the new binary via the UART lines, is this correct?

    Yes, our custom code download by SBL UART lines, and loaded by SBL,it work abnormal.

    3. Can you load any project via the SBL? If you load in the OOB demo does this program work correctly?

    I load the mmwave demo bin file by sbl, it work fine. But I think the mmwave demo not use the interrupt.

    If I not enable interrupt in our custom code, the custom app also can run stable by sbl loaded.

    So,Did we need do something about interrupt vector remaping in custom code if we need use interrupt.

  • This seems to be the issue, but I will need more info to help. What interrupt vector are you using? When is it supposed to fire? What is the behavior of this interrupt?

    Also, you say the behavior is 'abnormal'. Can you describe the behavior? Does the code start? Are there any errors flagged? Does the device not chirp?

  • The app project is use default cmd file as below.

    The app code enable the can tx confirm interrupt. This interrupt will touched when CAN tx successful.

    And also if have "SOC_XWR68XX_MSS_DSS2MSS_SW1_INT" interrupt,will happen the same issue.

    For a word, if app happen any interrupt,the software will crash. But the app is running stable without sbl.

    You can have a try on your side.

    Thanks very much. This issue is very hurry for our project.

  • The app code is start successful from sbl. And app send can message successful, then touched the can tx confirm interrupt. then the software crash. The app only can send out two can message.

    But the app without sbl, the can message is send out every 100ms. 

  • Ok, it seems there is an issue with the interrupt vector somehow, maybe from using the UART SBL and the CAN for data. Can you try using the CAN SBL project to load this image instead of UART? I will see if there is something to be careful with when mixing these peripherals.

    --Jackson

  • The can sbl in the toolbox has the same issue.

  • 1.You can replay the issue use "mmwave_platform_1_2_1\labs\diagnostic_monitor_ref\ti\demo\diag_mon_ref"

    APP BIN:mmwave_platform_1_2_1\labs\diagnostic_monitor_ref\ti\demo\diag_mon_ref\prebuilt_binaries\xwr68xx_diag_mon_demo.bin

    SBL BIN:mmwave_platform_1_2_1\labs\diagnostic_monitor_ref\ti\utils\diag_sbl\prebuilt_binaries\xwr68xx_diag_sbl.bin

    1. If I download APP BIN without SBL by uniFlash, the app will period send out message by UART as below;

     

    2. If I download SBL by uniFlash, and download app by SBL use Xmode.

    The app start up successful and also send out some message  through UART. But will not period send out UART message.

    I think app was crash after interrupt happen.

    I found this app demo enable the interrupt as below:

    You can have a check. these bin file was release by TI ,I not change anything.

  • Hello,

    I am looking into this. Please give me a few days to look deeper.

    Regards,

    Jackson

  • Hello,

    That demo will only work fully if you have the safety libraries installed and set up. Do you see this behavior with any of the prebuilt binaries from the industrial toolbox?

    Regards,

    Jackson

  • Hi, Jackson.

    You can ignore platform sbl  which need set up safety lib. I only mean all of sbl demo will have this issue.

    You also can find  this issue in sdk sbl and can sbl, if your app  code use interrupt.

  • SDK SBL: mmwave_sdk_03_05_00_04\packages\ti\utils\sbl\

    CAN SBL: mmwave_automotive_toolbox_3_4_0\labs\lab0012_can_sbl\

  • Hello,

    It looks like you are using an AOP EVM. Have you also been able to verify this happens on the ISK evm? Do you have a IWR6843ISK to try with? I want to make sure the project you are loading is generated to work for the AOP device. I know you have flashed it with uniflash and it works, so likely this is not the issue, but it is good to check. I will try to check on my side.

    Regards,

    Jackson

  • I have tested SBL to load a project that outputs data over CAN. When I load via SBL, this works fine on IWR6843. I get many more than 2 can messages. I have not tried on AOP, but it should be the same. Are you sure your setup for AOP is correct?

    EDIT: I also tested this with AOP, and sending CAN messages after loading via UART SBL works well. What are the image sizes you are loading? If they are >500kB there may be issues with the SBL

  • Hi Jackson, thanks for your support.

    Which App project is your use.

    I think you should check whether the app project enable interrupt. This issue only repeat in interrupt happen. 

    I think you  should check "HwiP_create" is used in your app code first. This point is very import. Thanks very much.

    I enable can tx confirm interrupt like below code, only for reference.

        CANFD_DriverMCB*        ptrCanFdMCB;
        HwiP_Params             hwiParams;
    
        HwiP_Params_init(&hwiParams);
        ptrCanFdMCB->hwCfg.instanceId = 0;
        ptrCanFdMCB->hwCfg.interruptNum0 = 35;
        ptrCanFdMCB->hwCfg.interruptNum1 = 42;
        ptrCanFdMCB->hwCfg.regBaseAddress = 0xFF500000U;
        hwiParams.name = "CanFD";
        hwiParams.arg = (uintptr_t)ptrCanFdMCB;
        HwiP_create(SOC_XWR68XX_MSS_MCAN_LVL0_INT, Can_1_Int0ISR, &hwiParams);

  • Hello,

    We did not manually set this interrupt. It should be set automatically when initializing the CAN driver. What are you needing to set it manually for? If you have this off, does the CAN communication work?

    Regards,

    Jackson

  • We integrate Autosar mcal to this chip. The mcal interface of tx confirm is used this interrupt. 

    You can check my previous response, I used can tx confirm interrupt and "SOC_XWR68XX_MSS_DSS2MSS_SW1_INT" interrupt. If I remove both interrupt, the app code will run success by sbl load.

    Also  you can enable other interrupt, like timer or gpio interrput. 

  • I don't think interrupt is enable automatically  after initializing the CAN driver. If it is true like your says, which function is interrupt service function.

  • Ok, understood. Let me look a little deeper and get back to you with some more info.

  • Hello,

    Sorry for the delay. Can you look at the SBL code and after the load/transfer, add a interrupt disable to any that are created there? This may be the issue, there are conflicting interrupts.

    void HwiP_disableInterrupt(int32_t interruptNum)
    Regards,
    Jackson