AM623: Custom board - AM623 - NAND booting not working

Part Number: AM623

Tool/software:

hi,

I am working on a AM623 based custom board and

I am trying to boot from the GPMC NAND flash (MT29F2G08ABBGAH4). The NAND flash is successfully working in linux, i have checked with ubi commands.

but trying to boot from primary boot mode its not working, primary boot configuration GPMC-NAND and secondary is USB .

attaching pin configuration,

B0: 1 

B1: 1

B2: 0

B3: 1

B4: 1

B5: 0

B6: 1

B7: 0

B8: 0

B9: 0

B10: 1

B11: 0

B12: 0

B13: 0

B14: 0

B15: 0

But we are facing USB-DFU is not detecting issue while trying initial boot (sudo dfu-util -l shows no device available)

But the same set up is working if I configure primary boot media as EMMC and secondary boot media as USB-DFU.

physically verified pin logic also.

Regards,

-RJ

  • Hi,

    The expert is currently out of office. Please expect delay of 2-3 working days to get a response.

    Regards,
    Aparna

  • Hi RJ,

    but trying to boot from primary boot mode its not working, primary boot configuration GPMC-NAND and secondary is USB .
    But we are facing USB-DFU is not detecting issue while trying initial boot (sudo dfu-util -l shows no device available)

    Please clarify the problem you have is about GPMC NAND primary boot or USB-DFU secondary boot?

  • Hi Bin Liu,

    GPMC NAND is the primary boot configuration, and DFU is the secondary boot configuration. On a brand-new custom board, DFU was operating OK, so I used uboot commands to flash the NAND images. However, after powering on reset , the device is not booting from either NAND or DFU.

    I switched the boot configuration to primary EMMC (EMMC is not mounted in custom board) and secondary DFU for testing purposes. After that, it was able to flash images via USB and successfully check the NAND read process using uboot commands.

    I hope it's clear.

    Regards,

    -RJ

  • Hi RJ,

    Thanks for the information.

    It sounds like the U-Boot binaries flashed to NAND through USB-DFU is not correct. Then ROM loaded the bootloader to memory but failed to execute it on R5F. But at this point of execution, ROM is done and won't be able to switch to the second boot mode (DFU).

    To confirm this, if your board has JTAG connection, you can try to connect to R5 in CCS, and see what its PC address is.

  • Hi Bin Liu,

    Thanks for the inputs ,

    f your board has JTAG connection, you can try to connect to R5 in CCS, and see what its PC address is.

    can you share any document links how can i debug this .

    regrads,

    -RJ

  • Hi RJ,

    I don't have a doc for this purpose, but once you launched the AM62x configuration in CCS, please try to connect to the R5 core. If the connection failed, it likely means the execution is still in ROM, the R5 core is not initialized yet. But if you can connect to the R5 core, the CCS register window will show all the R5 registers, pay attention to the value of the PC register.

  • Hi Bin liu,

    I try to connect using XDS110 ,In CCS after selecting target as AM62 and connection as Texas instruments XDS110 USB debug probe , when i try to  verify it showing error ,

    This error is generated by TI's USCIF driver or utilities.

    The value is '-233' (0xffffff17).
    The title is 'SC_ERR_PATH_BROKEN'.

    regards,

    RJ

  • Hi RJ,

    Let's take a different approach, as I am very certain that the problem is that the NAND image (tiboot3.bin) wasn't flash correctly which causes ROM loaded it but unable to run it.

    Can you please provide the details and/or console logs showing how exactly you configured and flashed the NAND image using DFU?

    You also mentioned that you could boot from eMMC then flash the NAND. Can you boot from NAND after flashed from eMMC? You can also provide the details of the flashing process from eMMC for us to review.

  • Hi Bin Liu,

    Can you please provide the details and/or console logs showing how exactly you configured and flashed the NAND image using DFU?

    Attaching below,

     

    ------------Build changes for NAND in SDK 10.00.07.04------------
    
    
    UBOOT_MACHINE_R5=am62x_lpsk_r5_gpmc_defconfig
    
    
    
    ----------------uboot log---------------------------
    
    U-Boot SPL 2024.04-dirty (Jan 02 2025 - 14:11:41 +0530)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
    SPL initial stack usage: 13392 bytes
    Trying to boot from DFU
    #########################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    ############################################################DOWNLOAD ... OK
    Ctrl+C to exit ...                                                    
    Authentication passed                                                 
    Authentication passed                                                 
    Authentication passed                                                 
    Loading Environment from nowhere... OK
    init_env from device 10 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
     
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
     
    U-Boot SPL 2024.04-dirty (Jan 02 2025 - 14:12:20 +0530)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
    SPL initial stack usage: 1888 bytes
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:1
    Error: could not access storage.
    Trying to boot from DFU
    Authentication passed
    Authentication passed
     
     
    U-Boot 2024.04-dirty (Jan 02 2025 - 14:12:20 +0530)
     
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -19
    DRAM:  1 GiB
    Core:  59 devices, 30 uclasses, devicetree: separate
    NAND:  256 MiB
    MMC:   mmc@fa10000: 0
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    => nand erase.chip
     
    NAND erase.chip: device 0 whole chip
    Erasing at 0xffe0000 -- 100% complete.
    OK
    => setenv dfu_alt_info "tiboot3.bin raw 0x0 0x200000; tispl.bin raw 0x200000 0x400000; u-boot.img raw 0x6000"
    => dfu 0 mtd nand0
    generic_phy_get_bulk : no phys property
    ###DOWNLOAD ... OK
    Ctrl+C to exit ...
    #########DOWNLOAD ... OK
    Ctrl+C to exit ...
    ########DOWNLOAD ... OK
    Ctrl+C to exit ...
    
    
    -----------------dfu log -----------------------------------------------
    
    :~/tisdk/board-support/u-boot-build/bin/nand_usb_v2$ sudo dfu-util -l
    dfu-util 0.9
     
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
     
    Found DFU: [0451:6165] ver=0223, devnum=67, cfg=1, intf=0, path="1-9", alt=2, name="u-boot.img", serial="0000000000000000"
    Found DFU: [0451:6165] ver=0223, devnum=67, cfg=1, intf=0, path="1-9", alt=1, name="tispl.bin", serial="0000000000000000"
    Found DFU: [0451:6165] ver=0223, devnum=67, cfg=1, intf=0, path="1-9", alt=0, name="tiboot3.bin", serial="0000000000000000"
    :~/tisdk/board-support/u-boot-build/bin/nand_usb_v2$ cd ../nand
    :~/tisdk/board-support/u-boot-build/bin/nand$ 
    :~/tisdk/board-support/u-boot-build/bin/nand$ sudo dfu-util -a 0 -D tiboot3.bin
    dfu-util 0.9
     
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
     
    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       323062 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    :~/tisdk/board-support/u-boot-build/bin/nand$ sudo dfu-util -a 1 -D tispl.bin
    dfu-util 0.9
     
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
     
    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #1 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%      1111383 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    :~/tisdk/board-support/u-boot-build/bin/nand$ sudo dfu-util -a 2 -D u-boot.img
    dfu-util 0.9
     
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
     
    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #2 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%      1004467 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    ----------------------------------------------------------------------------------------------

    Regards,

    RJ

  • This is the FAQ on flashing u-boot to GPMC-NAND with USB-DFU on AM62x for your reference
    Best,
    -Hong

  • Hi Hong ,

    This is the FAQ on flashing u-boot to GPMC-NAND with USB-DFU on AM62x for your reference

    Attaching the logs based on reference above ,

    Attaching below,

    Regards,

    RJ

  • I forgot adding the FAQ link in my last reply.
    Here is the FAQ link on flashing u-boot to GPMC-NAND with USB-DFU on AM62x for your rerference.
    https://e2e.ti.com/support/processors-group/processors/f/791/t/1460090
    Best,
    -Hong

  • Hi Hong ,

    I already got the link , and logs are attached above in previous replays ,

    Regards,

    -RJ

  • I think a follow-up e2e on the same topic was submitted.
    Let's continure our discussions in the new e2e.
    https://e2e.ti.com/support/processors-group/processors/f/791/t/1460866
    Best,
    -Hong