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.

AM2434: Firmware valid flag

Part Number: AM2434

Hello Expert, 

I am implementing a bootloader which requires some register and flag manipulation.
I need to be able to set and read the firmware-valid flag and be able to reboot the device.
I couldn´t find much info in the SDK so I am using the spruim2c as reference. 

Could you describe the proccess of reading/setting the firmware-valid flag and device reboot?
Also is there any shorter documentation of registers/flags ? Or is the main source of information the spruim2c ?

Thank you for your time and have great day,

Dominik

  • Hi Dominik,

    I assume you asked two questions:

    1. How to read/set the bit fields in the AM243x registers

    2. How to reset the AM243x to trigger a bootloading.

    For 1,  you can use the MACROs defined in C:\ti\mcu_plus_sdk_am64x_08_02_00_31\source\drivers\hw_include\cslr.h, such as CSL_FEXT and CSL_FINS.

    For 2, you can use the CCS --> Run --> Reset --> System Reset to trigger a WARM RESET. it will trigger a bootloading session. If you want to trigger a WARM RESET in your application code by calling SOC_generateSwWarmResetMainDomain().

    Best regards,

    Ming 

  • Hey Ming,

    Great advice as always. Register writing seems to be fine.
    However I was unable to use SOC_generateSwWarmResetMainDomain() in my code.

    In SDK:

    C:/ti/mcu_plus_sdk_am243x_08_02_00_31/docs/api_guide_am243x/group__DRV__SOC__MODULE.html 

    there is not documentation on this function. Do I need to make any includes to use SOC_generateSwWarmResetMainDomain().
    Other SOC funcitons are running fine when including soc.h.

    Thank you for your advice and have a great day.

    Dominik

  • Hi Dominik,

    I am sorry. The SOC_generateSwWarmResetMainDomain() is a newly added SOC function. It will be released in MCU+ SDK 08.03.00 in a few days. You cannot find it in MCU+ SDK 08.02.00.31.

    void SOC_generateSwWarmResetMainDomain(void)
    {
    /* Reset Ctrl belongs to partition 6 of the CTRL MMR */
    uint32_t rstPartition = 6U;

    /* Unlock CONTROL MMR registers */
    SOC_controlModuleUnlockMMR(SOC_DOMAIN_ID_MAIN, rstPartition);

    /* MAIN domain reset */
    CSL_REG32_FINS(CSL_CTRL_MMR0_CFG0_BASE + CSL_MAIN_CTRL_MMR_CFG0_RST_CTRL,
    MAIN_CTRL_MMR_CFG0_RST_CTRL_SW_MAIN_WARMRST,
    0x6U);

    /* Lock CONTROL MMR registers */
    SOC_controlModuleLockMMR(SOC_DOMAIN_ID_MAIN, rstPartition);

    /* execute wfi */
    #if defined(__ARM_ARCH_7R__)
    __asm volatile ("wfi");
    #endif
    }

    Best regards,

    Ming

  • Hello Ming,
    This has solved my Issue thank you for your excellent help.

    Dominik