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.

IWRL6432: How to reset&reboot device

Part Number: IWRL6432
Other Parts Discussed in Thread: , UNIFLASH

Hello, 

I want to reset IWRL6432 with specific CAN message.

When call SOC_triggerWarmReset, Sensor stops working. But it doesn't reboot again.

How could I fix the problem?

- HW: Custom IWRL6432 Board

- SDK: MMWAVE_L_SDK_05_03_00_02

- Example: motion_and_presence_detection_demo

Thanks for your support.

Best regards,

JIYEON.

  • Hello.

    This issue has been resolved in SDK 5.4.  However, this may not be compatible with your device so you will need to have access to the latest production-ready silicon to be able to support this SDK.  It should be available to order in a few days.  Otherwise, you can refer to the CLI command in SDK 5.4 for the out of box demos to trigger a warm reset and migrate those changes to your project to trigger a warm reset.

    Sincerely,

    Santosh

  • Hello, Santosh.

    MmwDemo_CLISensorWarmReset from SDK L 5.4.0.1 is migrated to my project.

    But it still doesn't reboot. Am I missed something?

    static int32_t MmwDemo_CLISensorWarmReset(void)
    {
        volatile uint32_t fecPdstatus = 0;
    
        /* Gracefully Shutdown the FrontEnd for Warm Reset */
        /* Halt the FECSS core */
        HW_WR_REG32((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_FEC_CORE_SYSRESET_PARAM),FEC_CORE_HALT);
    
        /* Set to Manual Mode in FEC_PWR_REQ_PARAM register */
        CSL_REG32_FINS((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_FEC_PWR_REQ_PARAM ), TOP_PRCM_FEC_PWR_REQ_PARAM_FEC_PWR_REQ_PARAM_MODE, 0);
    
        /* Do not retain any FECSS RAM */
        CSL_REG32_FINS((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_PSCON_FEC_PD_RAM_STATE ), TOP_PRCM_PSCON_FEC_PD_RAM_STATE_PSCON_FEC_PD_RAM_STATE_FEC_PD_MEM_SLEEP_STATE,0);
        CSL_REG32_FINS((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_PSCON_FEC_PD_RAM_GRP4_STATE ), TOP_PRCM_PSCON_FEC_PD_RAM_GRP4_STATE_PSCON_FEC_PD_RAM_GRP4_STATE_FEC_PD_MEM_GRP4_SLEEP_STATE,0);
    
        /* Switch OFF the Front end */
        CSL_REG32_FINS((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_FEC_PWR_REQ_PARAM ), TOP_PRCM_FEC_PWR_REQ_PARAM_FEC_PWR_REQ_PARAM_WAKEUP_OUT_STATE, 0);
        do
        {
            fecPdstatus = ((HW_RD_REG32(CSL_TOP_PRCM_U_BASE+CSL_TOP_PRCM_PSCON_FEC_PD_EN) & 0x200) >> 9);
        }while(fecPdstatus == 0);
    
        /* Switch ON the Front end for allowing RBL to load the Front End Firmware*/
        CSL_REG32_FINS((CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_FEC_PWR_REQ_PARAM ), TOP_PRCM_FEC_PWR_REQ_PARAM_FEC_PWR_REQ_PARAM_WAKEUP_OUT_STATE, 1);
        do
        {
            fecPdstatus = ((HW_RD_REG32(CSL_TOP_PRCM_U_BASE+CSL_TOP_PRCM_PSCON_FEC_PD_EN) & 0x200) >> 9);
        }while(fecPdstatus == 1);
    
        /* Enable Clock for FECSS */
        HW_WR_REG32((CSL_APP_CTRL_U_BASE + CSL_APP_CTRL_FECSS_CLK_GATE),0);
    
        /* Wait for Clock to start */
        ClockP_usleep(500);
    
        /* Issue Warm Reset */
        /* Following AON Registers fields are used by bootloader during Warm reset. Setting Boot Vector to 0 will make boot loader to reload application from flash in a Warm reset scenario */
        uint32_t *pc_reg1 = (uint32_t *)(CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_PC_REGISTER1);
        uint32_t *pc_reg2 = (uint32_t *)(CSL_TOP_PRCM_U_BASE + CSL_TOP_PRCM_PC_REGISTER2);
        /*Setting pc parity, data integrity check parity,image length parity, boot vector parity, lbist in boot, perform integrity check to 0*/
        *pc_reg1 = 0x0;
        *pc_reg2 = *pc_reg2 & (uint32_t)PCR2_BOOTVEC_CLR;
        SOC_triggerWarmReset();
        return 0;
    }
    

    "latest production-ready silicon" means new version will be released or ES2.0?

    Best regards,

    JIYEON.

  • Hi JIYEON, 

    Santosh is currently out of office so he can not respond at the moment. Regarding the silicon version supported by SDK 5.4, it is indeed ES2.0. 

    Best Regards,

    Josh

  • Hi Josh,

    When could I expect a reply?

    Best regards,

    JIYEON.

  • Hi JIYEON, 

    Santosh will return on Monday of next week. Thank you for your patience. 

    Best Regards,

    Josh

  • Hello.

    What behavior are you seeing when you send the CLI command to do warm reset?  I will note that this command will only work if lowPowerCfg is disabled and also make sure to add in the CLI functionality to the table storing the required CLI string and its appropriate callback function.

    Sincerely,

    Santosh

  • Hello, Santosh.

    When specific CAN message received, MmwDemo_CLISensorWarmReset is called.

    (Our custom board has no UART interface.)

     And lowPowerCfg is set to 0.

    When sensor powered-up, CAN message sent-out  continually.

    After receive Warm reset command at 116.353 sec, It stop working and doesn't reboot.

    It looks like that stop at ClockP_usleep(500).

    Best regards,

    JIYEON.

  • Hello.

    Please make sure that after you execute the warm reset, you switch your baud rate back to 115200.  I have confirmed that this works with SDK 5.3 on the IWRL6432BOOST EVM.

    Sincerely,

    Santosh

  • Hello,

    I did same update on SDK5.4 and It works. I used ES2.0 Custom board.

    Is there difference between SDK5.4(ES2.0) and SDK5.3(ES1.0) which can make different operation? 

    Additionally, Warm reset doesn't work occasionally.

    When I commented out ClockP_usleep(500);. It works fine.

    Is there a reason for wait? Could I delete it?

    Best regards,

    JIYEON.

  • I used ES2.0 Custom board.

    Is there difference between SDK5.4(ES2.0) and SDK5.3(ES1.0) which can make different operation? 

    Has the device always been ES2.0?  If so, SDK 5.4 will only work with ES2.0 and not ES1.0.  

    Additionally, Warm reset doesn't work occasionally.

    When I commented out ClockP_usleep(500);. It works fine.

    I have not encountered this issue; is there a specific use-case in which this occurs?  Is this happening when you are running in CCS Debug or when you run it normally?

    Sincerely,

    Santosh

  • I have two custom board, ES1.0 and ES2.0. Before, I used ES1.0 and SDK5.3. It was first time to use ES2.0 and SDK5.4.

    Project were compile as release version and flashed using Uniflash. Same test are repeated. When ClockP_usleep(500);, It didn't work time to time.

    When comment-out ClockP_usleep(500);, It always works well.

    I want to check that is it fine to comment-out the statement.

    Best regards,

    JIYEON.

  • Hello Jiyeon.

    Let me check on this and will provide an update by Monday.

    Sincerely,

    Santosh

  • Hello Jiyeon.

    Can you try running the motion and presence demo on an IWRL6432 EVM and see if you encounter the same issue?  I am not able to replicate this issue, so I am wondering if it is due to the custom hardware.

    Sincerely,

    Santosh