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.

TDA4VM: Backup Boot Mode can not work properly

Part Number: TDA4VM

Hi, experts,

My customer feedback a issue while using backup boot mode with TDA4.

He is debugging with MCAL in MCUSW and uses SD card for boot. When setting SD card as Primary Boot Mode, it can boot properly. But when setting OSPI as Primary Boot Mode, SD card as Backup Boot Mode, and there is not boot files in OSPI Flash, it can NOT boot properly. The log from MCU_UART prints only SBL version information.

I tested on J7 EVM and get some result.

The version of SDK is psdk_rtos_auto_j7_06_02_00_21.

Please help to check the way to use backup boot mode. Thanks.

  • Hi Felix,

    Please provide answers to the below:

    1. When you use the SD card as backup boot mode and OSPI as primiary, you make sure that the OSPI flash does not have bootloader (SBL) flashed at 0x0?

    2. The SD card has all the three images? SBL (as tiboot3.bin), sysfw.bin (as sysfw.bin) and application appimage (as app)?

    3. Same set of the above three images work with SD boot mode as primary boot mode?

    Felix ZF said:
    But when setting OSPI as Primary Boot Mode, SD card as Backup Boot Mode, and there is not boot files in OSPI Flash, it can NOT boot properly. The log from MCU_UART prints only SBL version information.

    If answers to both 1. and 2. is yes then - when the SBL prints are coming that means that the backup boot mode (SD boot) is working. As the SBL is being picked up from the SD card.

    Can you please let me know which application are you using? Also please confirm your boot switch settings and the SW3 switch settings too.

    Regards,
    Karan

  • Hi, Karan,

    To answer your questions.

    1. Yes, there is no boot files in OSPI Flash.

    2. Yes, tiboot3.bin, sysfw.bin and app are in SD card.

    3. Yes, the same SD card can be used to boot normally with SD boot mode as primary boot mode.

    I agree that the SBL is picked up from SD card so that the SBL version information is print through UART. It seems there is something wrong when loading SYSFW.

    BOOTMODE[7:0] = 11001010

    MCU_BOOTMODE[9:0] = 1100001000

    SW3[1:10] = 0100001111

    The test app is dio_app from MCUSW.

    Another information is, with the same boot pin setting, vision_app demo can be boot from SD card normally.

    Thanks. 

  • Hi Felix,

    Felix ZF said:
    I agree that the SBL is picked up from SD card so that the SBL version information is print through UART. It seems there is something wrong when loading SYSFW.

    So you don't get the sysfw version number print on the console? Can you please send the output log too, I can look at that.

    Also please let me know the SW8 and SW9 switch settings.

    Regards,

    Karan

  • Hi, Karan,

    The output log is just a line showing "SBL Revision: 01.00.09.02 (Mar  9 2020 - 12:56:25)"

    SW8 ans SW9 settings are set as BOOTMODE and MCU_BOOTMODE in above post.

    Please see the picture below.

    Thanks.

  • Hi, Karan,

    Are you making progress?

    Thanks.

  • Hi Felix,

    I tried to enable full logs and seems like it fails at the OSPI flash open:

    SBL Revision: 01.00.09.02 (May 25 2020 - 04:09:30)
    Board_flashOpen failed!

    I think we might be missing some boot pin settings, looks a little complicated and easy to get something wrong. Let me go back and check.

    Regards.

    Karan

  • Hi Felix,

    Can you please change your BOOTMODE[7] from 1 to 0?

    i.e. BOOTMODE[7:0] = 10001010

    Please check both scenarios, boot from OSPI and remove a valid image from OSPI flash and try booting from SD (Backup mode)

    Regards,

    Karan

  • Hi, Karan,

    Here is my test result:

    1. BOOTMODE[7:0] = 11001010, MCU_BOOTMODE[9:0] = 1100001000, SW3[1:10] = 0100001111, boot files in OSPI Flash, SD inserted.

    boot failed with below log

    SBL Revision: 01.00.09.02 (May 14 2020 - 14:30:01)
    Board_flashOpen failed!

    2. BOOTMODE[7:0] = 11001010, MCU_BOOTMODE[9:0] = 1100001000, SW3[1:10] = 0100001111, no boot file in OSPI Flash, SD inserted.

    boot failed with below log

    SBL Revision: 01.00.09.02 (Mar  9 2020 - 12:56:25)

    3. BOOTMODE[7:0] = 10001010, MCU_BOOTMODE[9:0] = 1100001000, SW3[1:10] = 0100001111, boot files in OSPI Flash, SD inserted.

    boot successfully

    4. BOOTMODE[7:0] = 10001010, MCU_BOOTMODE[9:0] = 1100001000, SW3[1:10] = 0100001111, no boot file in OSPI Flash, SD inserted.

    boot failed with below log

    SBL Revision: 01.00.09.02 (Mar  9 2020 - 12:56:25)

    Change BOOTMODE[6] from 1 to 0, only make OSPI primary boot mode workable, it doesn't help to enable backup boot mode.

  • Hi Felix,

    I think not in the bootmode there could be some problem with SBL there. Because I tried to boot linux from SD card with the configuration I suggested you.

    With valid OSPI image I was able to boot and when no valid image in OSPI i was able to boot linux from SD card.

    Regards,

    Karan

  • Hi, Karan,

    I can also use backup boot mode when running vision_app from SD card.

    As SPL from linux SDK is used instead of SBL, it seems the problem is inside SBL. This may be the reason of backup boot failure when using SBL.

  • Hi Felix,

    One confirmation I just got from the team is that the ROM doesn't support the 133MHz with PHY and hence we need to stick to BOOTMODE[6] = 0

    Regards,

    Karan

  • Hi, Karan,

    OK, This is the reason of "Board_flashOpen failed". Thanks.

    Let's move to backup boot mode with SBL.

  • Hi Felix,

    Yes that would be the next thing, I'm checking with the team if this is some known gap in the OSPI SBL or something.

    Regards,

    Karan

  • Hi Felix,

    I'm debugging this, the SBL seems to be getting stuck in the MMCSD driver waiting for data inhibit to go low.

    Regards,

    Karan

  • Hi Felix,

    Can you try with the attached binary? Rename and put it on the SD card by name tiboot3.bin.

    This should work and then I can explain what the problem was actually and provide a patch to update your MMCSD SBL.

    Regards,

    Karan

    /cfs-file/__key/communityserver-discussions-components-files/791/tiboot3.bin.1bit

  • Hi, Karan,

    It works.

    With the binary you provide, SD card can boot as backup boot mode.

  • Hi Felix,

    So the problem was in how the MMCSD was bootmode was being set up in case of backup boot mode.

    Usually the primay boot mode has more options – when you select a bootmode as backup – some of the configurable options get frozen at defaults (set by ROM code)

    Comparing the configuration for MMCSD we are telling ROM to use when MMCSD is primary and when it is backup we see that there is a delta.

    Let me try to explain –

    1. When MMCSD as primary boot mode, MCU_BOOTMODE[4,5,6] configure the boot mode. (Table 4-10)
      1. This lets us configure the Port, Bus width and Fs/raw mode parameters
    2. When MMCSD as secondart boot mode, BOOTMODE[7] configures the boot mode. (Table 4-11)
      1. This lets us configure just the Port.
    3. In both cases MMCSD as primary and backup boot mode – Port1 is selected by changing BOOTMODE[6] in primary and BOOTMODE[7] in backup to 1.
      1. This leaves us with only 2 other configurations of Bus width and Fs/raw mode.
      2. Both Bus width and Fs/raw are set to 0 in MMCSD as primary boot mode, hence selecting 4 bit bus width and File system mode.
      3. But when in backup mode when we have the bus width set to 1 bit (and we can't override this) this is different to what we expect in the MMCSD SBL.

    What patch I've attached changes the expectation of the MMCSD SBL to 1 bit bus width and then it works fine. Please refer the patch to make changes to your SBL.

    Patch - /cfs-file/__key/communityserver-discussions-components-files/791/mmcsd_5F00_backup_5F00_boot.patch

    Let me know if you have more questions.

    Regards,

    Karan

  • Hi, Karan,

    Thank you very much for the detailed explanation. 

    How about other backup boot mode? For example, primary boot mode is SD card, backup boot mode is CCS boot. If the SD card is not inserted, then I try to boot through CCS by running launch.js script. The process is stuck after "running the board configuration initialization from R5!". Click "Suspend" twice would resume the booting and the "Okay you are good to go.. Happy Debugging!" log is print, but the program can not run properly after loading .xer5f file.

    Thanks.

  • Hi Felix,

    CCS boot is a no ROM boot mode. As far as my understanding goes, the no-boot mode can not be a backup boot mode as the ROM has already run.

    I think what you could have confused is the no backup boot mode with the no-boot?

    Regards,

    Karan