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.

AM62A7: About flash system to NAND by dfu

Part Number: AM62A7
Other Parts Discussed in Thread: AM62L

Tool/software:

Hi TI Experts,

Similar to this question,

e2e.ti.com/.../am62a7-something-wrong-when-execute-dfu-command

Now I have successfully flashed the system into EMMC, but the boot time has not been significantly reduced.

I tried to flash the system into NAND, but a similar error message appeared.

Please tell me how to flash into NAND correctly?

Best Regards,

Meng

Here are logs:

lihao@lihao-B460MAORUSPRO:~/uboot-flash-writer/tools/DFU_flash$ python3 dfu_flash.py -d am62axx-evm -t hsfs -c ./bin/am62axx-evm/hsfs/flash-files-nand.cfg
2025-05-02 21:53:57 INFO: Starting the flashing tool
2025-05-02 21:53:57 INFO: Validating the requirements before flashing...
2025-05-02 21:53:57 INFO: Validated the CLI arguments and the paths to the DFU boot binaries
2025-05-02 21:53:57 INFO: Parsing the flash configuration file {./bin/am62axx-evm/hsfs/flash-files-nand.cfg}...
2025-05-02 21:53:57 INFO: Found 4 flash images
<<DFU_FLASH_CONF
------- --------------------------------------- --------- -------- ----- ----------
Alt Path Size Offset Media Attributes
------- --------------------------------------- --------- -------- ----- ----------
tiboot3 bin/am62axx-evm/hsfs/images/tiboot3.bin 330105 0x0 NAND None
tispl bin/am62axx-evm/hsfs/images/tispl.bin 1465251 0x80000 NAND None
u-boot bin/am62axx-evm/hsfs/images/u-boot.img 1179459 0x280000 NAND None
rootfs bin/am62axx-evm/hsfs/images/rootfs.ext4 314572800 0x0 NAND None
------- --------------------------------------- --------- -------- ----- ----------
DFU_FLASH_CONF
2025-05-02 21:53:57 INFO: Found 4 boot images
<<DFU_BOOT_CONF
---------- ------------------------------------------------------------------------------- -------
Alt Path Size
---------- ------------------------------------------------------------------------------- -------
bootloader /home/lihao/uboot-flash-writer/tools/DFU_flash/bin/am62axx-evm/hsfs/tiboot3.bin 357147
tispl.bin /home/lihao/uboot-flash-writer/tools/DFU_flash/bin/am62axx-evm/hsfs/tispl.bin 1207728
u-boot.img /home/lihao/uboot-flash-writer/tools/DFU_flash/bin/am62axx-evm/hsfs/u-boot.img 1012196
uEnv.txt /home/lihao/uboot-flash-writer/tools/DFU_flash/bin/am62axx-evm/hsfs/uEnv.txt 172
---------- ------------------------------------------------------------------------------- -------
DFU_BOOT_CONF

  • software-dl.ti.com/.../UG-QSPI.html

    I tried to flash OSPI NAND using the method in this document,

    but after flashing according to the command,

    I switched the switch to OSPI NAND boot mode and failed to boot.

    => fatload mmc 1 ${loadaddr} tiboot3.bin
    330121 bytes read in 37 ms (8.5 MiB/s)
    => mtd write spi-nand0 $loadaddr 0x0 $filesize
    Size not on a page boundary (0x1000), rounding to 0x51000
    Writing 331776 byte(s) (81 page(s)) at offset 0x00000000
    => fatload mmc 1 ${loadaddr} tispl.bin
    1554715 bytes read in 51 ms (29.1 MiB/s)
    => mtd write spi-nand0 $loadaddr 0x80000 $filesize
    Size not on a page boundary (0x1000), rounding to 0x17c000
    Writing 1556480 byte(s) (380 page(s)) at offset 0x00080000
    => fatload mmc 1 ${loadaddr} u-boot.img
    1182571 bytes read in 47 ms (24 MiB/s)
    => mtd write spi-nand0 $loadaddr 0x280000 $filesize
    Size not on a page boundary (0x1000), rounding to 0x121000
    Writing 1183744 byte(s) (289 page(s)) at offset 0x00280000

  • https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1421944/am620-q1-am62x-flash-and-boot-from-ospi-nand-using-usb-dfu-method/5478782?tisearch=e2e-sitesearch&keymatch=AM62AX%25252525252525252520OSPI%25252525252525252520NAND#5478782

    I tried to flash OSPI NAND in this way.

    I flashed the binary file into uboot through DFU and followed the command in the document.

    The error message is as follows

    => setenv dfu_alt_info "tiboot3 raw 0x0 0x80000;tispl raw 0x80000 0x280000;u-boot raw 0x280000 0x680000"
    => dfu 0 mtd spi-nand0
    DFU entities configuration failed!
    (partition table does not match dfu_alt_info?)
    dfu - Device Firmware Upgrade

    Usage:
    dfu <USB_controller> [<interface> <dev>] [list]
    - device firmware upgrade via <USB_controller>
    on device <dev>, attached to interface
    <interface>
    [list] - list available alt settings

    => mtd list
    List of MTD devices:
    * spi-nand0
    - device: flash@0
    - parent: spi@fc40000
    - driver: spi_nand
    - path: /bus@f0000/bus@fc00000/spi@fc40000/flash@0
    - type: NAND flash
    - block size: 0x40000 bytes
    - min I/O: 0x1000 bytes
    - OOB size: 128 bytes
    - OOB available: 80 bytes
    - 0x000000000000-0x000008000000 : "spi-nand0"
    - 0x000000000000-0x000000080000 : "ospi_nand.tiboot3"
    - 0x000000080000-0x000000280000 : "ospi_nand.tispl"
    - 0x000000280000-0x000000680000 : "ospi_nand.u-boot"
    - 0x000000680000-0x0000006c0000 : "ospi_nand.env"
    - 0x0000006c0000-0x000000700000 : "ospi_nand.env.backup"
    - 0x000002000000-0x000007fc0000 : "ospi_nand.rootfs"
    - 0x000007fc0000-0x000008000000 : "ospi_nand.phypattern"

  • Hi,

    => setenv dfu_alt_info "tiboot3 raw 0x0 0x80000;tispl raw 0x80000 0x280000;u-boot raw 0x280000 0x680000"
    => dfu 0 mtd spi-nand0
    DFU entities configuration failed!
    (partition table does not match dfu_alt_info?)

    I tried the following command at my end but this is working for me (not getting this error: DFU entities configuration failed! ), I am using ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05, I assume you are using the same, please confirm this.

    I switched the switch to OSPI NAND boot mode and failed to boot.

    Could you please elaborate what issue you are facing here, please share the boot logs from the UART terminal that might indicate the failure.

    Best Regards,

    Meet.

  • Hi Meet,

    Now I flashed the boot file into the SPI NAND by this way,

    what should I do with the system file? (I want to get rid of the SD card)

    Best Regards,

    Meng

  • Meng,

    I suppose you are asking about how to install and run a Linux rootfs from SPI NAND?

    For this you'd want to use UBI/UBIFS containing your Linux system on your OSPI NAND `rootfs` partition. While we don't have a step-by-step guide specific for the SK-AM62A board here are some pointers:

    1. Basic UBI/UBIFS info in the AM62A SDK User's Guide
      https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI.html

    2. Detailed into on UBI/UBIFS and how to create images that can be used for rootfs. The below link points to AM62L documentation (not AM62A) but the associated SDK there is newer and has more info in it, and that info is largely also applicable to AM62A so I'm posting it here
      https://software-dl.ti.com/processor-sdk-linux/esd/AM62LX/11_00_05_02/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS.html#

    3. E2E FAQ that shows a working end-to-end solution to boot Linux from OSPI NOR (not OSPI NAND) including the needed modifications to the U-Boot bootloader configuration to make the boot automatic. Note that this is for the AM64 board (not AM62A board that you have) and there's an OSPI NOR on it (not an OSPI NAND device) so the parameters to be used for creating the UBI/UBIS images (MKUBIFS_ARGS and UBINIZE_ARGS) in Yocto will need to be different. But the point is the basic principles outlined in this E2E FAQ of getting this working still apply to SK-AM62A.
      https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1510258/faq-sk-am64b-building-and-booting-an-ubifs-based-linux-rootfs-from-ospi-nor-flash-using-ti-processor-sdk-linux-v11-x-yocto-sources

    I think the above 3 pieces of information should be a good starting point for you to enable you to create a working OSPI NAND solution that boots into Linux.

    Regards, Andreas