Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

SK-AM62-LP: USB boot time for AM62

Part Number: SK-AM62-LP

Tool/software:

Hi,

I am curious about boot time of Cortex-A core with a bare metal example that will be running from DDR. From what I know, the whole process of the serial boot from UART, SPL->DDR will take a quite decent amount of time as its needs for acknowledgement.

I would like to know if boot from USB can help improve the boot time, and how long it would take to get the application in DDR to start.

Thank you,

Dazong

  • Hi Dazong,

    The MCU+ SDK does not support booting from the USB media. It only supports booting from UART, NOR, NAND, eMMC, and SD card media.

    The Processor SDK supports booting over USB DFU but it boots U-Boot & Linux on the A53 core.

    3.1.1.2. USB Device Firmware Upgrade (DFU) — Processor SDK AM62x Documentation

    Regards,

    Prashant

  • Hi Prashant,

    Here we are talking about the possible MPU bare metal solution for A53 core, is there a way that bare metal application can be loaded into DDR through DFU mode, and how long would that take to have the application starts running, counting from boot up.

    Thanks,

    Dazong

  • Hi Dazong,

    The MCU+ SDK has the support for booting baremetal application on A53. But, as previously conveyed, the MCU+ SDK doesn't have support for the USB so that leaves us with the UART only.

    As an alternative, you may use the OSPI boot media & leverage the following SoC initialization method.

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_00_00_14/exports/docs/api_guide_am62x/EVM_SETUP_PAGE.html#EVM_FLASH_SOC_INIT

    This way you would be able to load & run A53 executable using CCS.

    Regards,

    Prashant

  • Thanks Prashant,

    USB probably is needed for our development. If we go with Linux SPL, then jump to a baremetal application in DDR, is it something doable?

    Thanks,

    Dazong

  • Hi Dazong,

    If we go with Linux SPL, then jump to a baremetal application in DDR, is it something doable?

    That is an option I have thought of but I will have to confirm if it can really work.

    Before we go there, can you please clarify the use case for booting a baremetal application? Is this part of testing phase? Which SDK is used to develop this baremetal application?

    I would expect you to boot U-Boot/Linux on A53 core & use the tools available there for any use case.

    Regards,

    Prashant

  • hi Prashant,

    For our purpose which is the hw validation, we want to use baremetal as much as possible.

    There are two scenarios, one is serial boot from USB/UART and the other one is from external non-volatile memory (NVM)

    Since boot from uart is taking too long, so it makes sense to me that if baremetal USB boot is not supported, we can go with dfu mode which is linux SPL run in RAM + bare metal application run in DDR

    When boot from NVM, we want a solution with bare metal SPL and bare metal application.

    The bare metal SPL will initialize clocks, ddr, external nvm, copy the bare metal from external nvm into DDR, and jump to DDR and execute the application.

    We are not in the stage of which SDK to use yet.

    Thanks,

    Dazong

  • Hi Dazong,

    Thanks for the clarification.

    When boot from NVM, we want a solution with bare metal SPL and bare metal application.

    This is already there in the MCU+ SDK. You may use the SBL_OSPI or SBL_EMMC to boot your application from OSPI or eMMC respectively.

    Regards,

    Prashant

  • Thanks Prashant,

    Just please update us on if dfu usb boot then jump to baremetal application is doable, and how long the download time will take.

    Regards,

    Dazong

  • Hi, I will check with the U-Boot expert & get back to you.

  • Hi Prashant, just wondering if any updates?

  • Just please update us on if dfu usb boot then jump to baremetal application is doable, and how long the download time will take

    You can do that with the SDK out of the box.

    1) Build the U-Boot chain using the related defconfigs as per steps in the SDK documentation

    2) Once you boot to U-Boot prompt, you can load your bare metal application using the usual U-Boot commands from any media you like (including USB DFU)

    3) Start your application using the `go` command

    Note that if you use this approach you might want to make sure the MMU is turned off and caches are flushed as part of executing the `go` command, by adding this piece of code here, which is populating a function hook to be executed during `go` command execution:

    $ git diff
    diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
    index fa8cd93d664..99e8f37ac37 100644
    --- a/arch/arm/mach-k3/common.c
    +++ b/arch/arm/mach-k3/common.c
    @@ -214,6 +214,14 @@ void board_prep_linux(struct bootm_headers *images)
                                     ROUND(images->os.end,
                                           CONFIG_SYS_CACHELINE_SIZE));
     }
    +
    +unsigned long do_go_exec(ulong (*entry)(int, char * const []),
    +                        int argc, char *const argv[])
    +{
    +       cleanup_before_linux();
    +
    +       return entry(argc, argv);
    +}
     #endif
    
    void spl_enable_cache(void) 

    All this should not take more than a couple of seconds, depending on what type of application you load and its size.

    If you want it faster and more optimized you could also just replace `tispl.bin` with your bare-metal application directly, and load it using USB DFU, completely skipping over `u-boot.img` and any `go` command execution discussed earlier. You just want to see how `tispl.bin` is being build into an image, and replace the code with your own code.