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.

MCU-PLUS-SDK-AM243X: How to differentiated or identify SBL at 0x0 and 0x40_0000 from OSPI bootflash

Part Number: MCU-PLUS-SDK-AM243X

Tool/software:

Try to updated SBL at default location at 0x0 in OSPI flash. And, we have backup image at 0x40_0000 on OSPI as fall back SBL.

If update at 0x0 is failed or not properly done. AM243x might have fall backed to fall back SBL at 0x40_0000. And, load application image.

Question is how do I know, AM243x is booted from SBL at 0x0 or at fall back address 0x40_0000?

is there any register to identify it?

Please let me know on it

  • Hello,

    Please have a look at the following thread

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1304243/am6442-boot-backup-mode-selection-in-case-of-qspi-primary-boot-mode

    As an example, the following test function extracts the relevant information from the xSPI parameter table

    void test_func() {
        uint8_t* active_boot_table_ptr = NULL;
        uint32_t active_boot_table_index = *(uint32_t*)0x701BEBFC;
    
        if(active_boot_table_index == 0x0) {
            active_boot_table_ptr = (uint8_t*)0x701BEC00;
            DebugP_log("Bootmode: Primary\r\n");
        } else {
            active_boot_table_ptr = (uint8_t*)0x701BEE00;
            DebugP_log("Bootmode: Backup\r\n");
        }
    
        DebugP_log("Peripheral: %d\r\n", *(uint16_t*)(active_boot_table_ptr + 4));
    
        uint32_t read_index = *(uint32_t*)(active_boot_table_ptr + 292);
    
        if(read_index == 0) {
            DebugP_log("Boot offset: Primary @0x%x\r\n", *(uint32_t*)(active_boot_table_ptr + 296));
        } else {
            DebugP_log("Boot offset: Redundant @0x%x\r\n", *(uint32_t*)(active_boot_table_ptr + 300));
        }
    }

    Attached are the logs when the test function is integrated to SBL NULL:

    Starting NULL Bootloader ...
    
    DMSC Firmware Version 10.0.8--v10.00.08 (Fiery Fox)
    DMSC Firmware revision 0xa
    DMSC ABI revision 4.0
    
    Bootmode: Primary
    Peripheral: 130
    Boot offset: Redundant @0x400000

    Regards,

    Prashant

  • Thanks Prashant.