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: QSPI bootloader issue

Part Number: AM5728

Hello TI community,

I'm trying to boot my software by using the flash. I use the Sitara AM5728 Industrial EVM, Rev. 1.3B. The boot sequence and the selected boot devices, respectively, are configured via the SYSBOOT pads. Because of the Industrial EVM, I cannot change the boot devices without any hardware modifications (see this post). But, this board "is configured by default to 0x8106 to enable UBOOT/Linux boot from the SDCARD. The secondary boot device selected by this boot mode is QSPI1" (sprui64c.pdf, chapter 4.1). Thus, there is an opportunity to boot from QSPI flash (32 MB NOR flash), right?

At first, I start my software via SD card and copy the necessary binaries (bootloader + application) into the flash. I used the following commands to copy my files into the flash:

Erase entire flash: flashctl -p /dev/fs0p0 -ev

Copy bootloader (MLO): dd if=/mnt/sdcard/mlo of=/dev/fs0p0 seek=0 skip=0

Copy application (here: HLOS) with 64k offset: dd if=/mnt/sdcard/qnx-ifs of=/dev/fs0p0 seek=64 skip=0 bs=1024

After copying successfully the binaries into the flash, the SD card has to be removed and the system must restart. After rebooting, the TI's ROM code shall recognize the MLO in flash because of omitted SD card. But in my case, nothing happens (all LEDs are still on).

If I start my software via SD card again, my MLO starts from SD card and I can select the boot device (SD card, eMMC, QSPI, Serial etc.) (QNX specific). If I select QSPI, the MLO starts successfully my software. Thus, I suggest the QSPI works correctly.

What are the conditions (special header, special start address etc.) in order that the TI's ROM code load my bootloader from QSPI flash (without SD card)?

Did somebody already pay attention to this problem (booting from QPSI flash on IDK AM5728 Rev. 1.3B)?

Thanks for your help & best regards

Thomas

  • The software team have been notified. They will respond here.
  • In SPRUHZ6J.pdf, chapter 33.3.7.1 (AM5728 technical ref manual) I found some note:

    "A booting image is considered to be present, when the first 4-byte word of the sector is not equal to 0000 0000h or FFFF FFFFh".

    My booting image (MLO file) has the following hex content snippet (first column is the hex address):

    0000000 00000040 0000000c 00000000 00000000
    0000010 00000000 45534843 4e495454 00005347
    0000020 ffffffff ffffffff ffffffff ffffffff
    *
    0000040 c0c0c0c1 00000100 00000000 00000000
    0000050 00000000 00000000 00000000 00000000
    *
    0000200 0000c4c8 40300008 e59f8054 e5880000
    0000210 e10f0000 e3c0001f e38000d3 e129f000
    0000221

    Finally, the first 4-byte word is not equal 0000 0000h or FFFF FFFFh.

  • Thomas,

    Your understanding of boot sequence on AM572x IDK and feasibility to boot from QSPI flash is correct. In addition to that all of the boot image format details and boot mode specific details for QSPI booting are provided in the Initialization Chapter in the AM572x Technical Reference manual.

    Additionally, from software side steps to write image to QSPI and boot AM57xx/DRA7xx devices using QSPI boot are in the document provided here: processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide

    If you have any questions after following these steps then please let us know and we can provide further guidance.

    Regards,
    Rahul
  • Hi Rahul,

    thanks for your reply. I don't understand the usage of U-Boot. Is U-Boot mandatory, to boot from QPSI or is it possible to boot only with MLO and os-image?

    I don't use the Linux provided by TI - I use QNX. To my mind, the TI's ROM code has to recognize my MLO (regardless of how it is the MLO of TI or QNX), but it don't.

    My memory layout of QSPI flash looks like the following:

    +----------------+ 0x00000

    |     MyMLO      |

    |   (QNX IPL)    |

    +----------------+ 0x010000

    |    2.-4. MLO   |

    |    (Empty)     |

    +----------------+ 0x040000

    |     Image      |

    |   (QNX IFS)    |

    +----------------+

    I wrote the binaries from SD-card to flash with the help of a QSPI driver in my OS.

    Best regards

    Thomas

  • Thomas,

    Unfortunately we don`t support QNX for these devices on E2E forums. you will need to reach out to the third party OS vendor whom you have obtained the QNX BSP from. We only support bare-metal, TI RTOS application development using Processor SDK RTOS and Linux development using Processor SDK Linux on these forums.

    In theory you are correct, different OS refer to their secondary bootloaders by different names, Linux community uses uboot, RTOS/bare-metal use SBL so there might be a similar secondary bootloader provided by QNX. The concept from booting from the ROM bootloader should be the same the initial image should be in TIIMAGE GPHEader format and should reside at the base of QSPI flash and boot switches should be setup correctly to boot the initial bootloader (MLO name is only forced for SD boot where ROM looks for that image in FATFS partition).

    Regards,
    Rahul