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.

AM5728: Boot using EMMC while blank SD card is inserted

Part Number: AM5728


Tool/software:

Hi,

Our product uses the AM5728 EVM reference board. We have flashed the EMMC with version 09_03_06_05 of the SDK. We can boot to the EMMC correctly and everything works.

Going forward we would like to use the SD card to store configs and other data. The problem is when we have a blank SD card inserted and try to boot from the EMMC, the boot fails and the device gets into a reboot loop.

Upon further investigation the SPL interrogates the SD card, which is OK. However when when it comes back to the EMMC it chooses the wrong hardware partition, preventing a successful boot.

MLO and uboot.img are in the boot0 hardware partition of the EMMC.The kernel is in the user partition.

How do we configure the SPL to resume booting from the boot0 partition after checking the SD card?

Tim

  • Hi Tim,

    Responses will be delayed owing to the Good Friday/Easter holidays across TI.

    regards

    Suman

  • Hello Tim,

    What are the SYSBOOT pins set to?

    How is it that you can boot correctly from eMMC?

    We can boot to the EMMC correctly and everything works.

    -Josue

  • Josue,

    We are using the standard AM5728 EVM reference board with no modifications. For that board the sysboot pins are set as follows:

    We are able to boot to the EMMC when we don't have the SD card inserted.

    Tim

  • Tim, 

    So the ROM code will always check the SD card first. I am curious if you were to change the SYSBOOT pins to eMMC as the first boot order, then you might not have this problem.

    See the following FAQ:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/959283/faq-ccs-am5728-am57xx-boot-modes-supported

    This is all the possible booting options. See the last one in specific.

    Also, note that eMMC boot mode is not validated in our SW therefore it is not directly supported by our team.

    Hope this helps,

    Josue

  • Josue,

    Unfortunately we need to boot to the SD card in order to flash the EMMC. The EMMC comes preloaded on the reference board so if we look at the EMMC first it would prevent us from ever being able to boot to an SD card with a flash image. Additionally we are using the stock reference board, doing the above would require a hardware change and we don't make the board.

    The Ti ROM code is working correctly in that it checks the SD card, finds nothing bootable, then goes to the EMMC. The problem appears to be in Ti's MLO. Below is what we see happening....

    • Ti ROM code checks SD and finds nothing bootable and chooses to boot from EMMC.
    • Ti's MLO is then run from EMMC boot0 and it checks the SD card again.
      • If the SD card is not present it continues the boot process from the EMMC boot0.
      • If a blank card is present the MLO tries to boot from the SD card, fails, and then attempts to fallback to booting from EMMC.
      • Unfortunately when it returns to the EMMC it chooses the user partition, not boot0.

    I think the MLO is getting off track in the save_omap_boot_params() function of the arch/arm/mach-omap2/boot-common.c file. This sets the gd->arch.omap_boot_mode variable, influencing how the MLO boots. When the blank SD card is present it is a 1 (MMCSD_MODE_RAW) and when the SD card is not present it is a 3 (MMCSD_MODE_EMMCBOOT).

    Tim

  • Tim,

    What you are trying to change is the expected behavior, See TRM:

    Can you try booting the eMMC from user partition instead?