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.

SK-AM62: Trouble flashing SK-AM62-LP using USB DFU mode

Part Number: SK-AM62
Other Parts Discussed in Thread: AM62P

Hello, 

We are trying to flash our development boards SK-AM62-LP with revision PROC124E2 using USB DFU mode. 

We are using a host computer that is Linux with Ubuntu 22.04. 

When following the guide here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1127618/faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2 

The board is connected like this: 

  • J17 micro USB on board to USB-C on host laptop for UART connection
  • J15 USB-C on board connected to USB-C on laptop for DFU flashing
  • J12 USB-C (PWR) connected to PD capacle power supply
  • micro SDHC Sandisk 3gb card

But once we have built the 3 files(using the updated "defconfig" files: “am62x_evm_r5_usbdfu_defconfig” and  “am62x_evm_a53_defconfig”): 

  • tiboot3.bin
  • tispl.bin
  • u-boot.img

And try to flash them onto the board using "df-util" we get this output: 

>> sudo dfu-util -R -a bootloader -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 sourceforge.net/.../

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 512
Copying data from PC to DFU device
Download [=========================] 100% 332022 bytes
Download done.
state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion
dfu-util: can't detach
Resetting USB to switch back to runtime mode
------------------------------------------------------------------

And we see no output in the serial UART micro USB console (gtkterm). It is completely empty. 

When we try to list the dfu-units again the board is gone: 

>>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/
----------------------------------------------------------------------------------------------------

I can only get it back by power-cycling the board. 

After power-cycling: 
>>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 sourceforge.net/.../

Found DFU: [0451:6165] ver=0200, devnum=58, cfg=1, intf=0, path="3-5", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=58, cfg=1, intf=0, path="3-5", alt=0, name="bootloader", serial="01.00.00.00"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

We are not able to continue trying to flash the tispl.bin file and the u-boot.img file after this.

I cannot find that much information on our specific board SK-AM62-LP with PROC124E2. Do we need any special instructions for this board? 

Important to note is that we have tried to flash a SD card with the supplied wic image here: https://dev.ti.com/tirex/explore/node?node=A__AdoyIZ2jtLBUfHZNVmgFBQ__am62x-devtools__FUz-xrs__LATEST&search=am62x 

But after flashing the SD card using Balena Etcher and then trying to boot using boot pins in SD card boot according to https://dev.ti.com/tirex/explore/node?node=A__ABlmxwZfle7AfM3QhRii6w__linux_academy_am62x__XaWts8R__8.3.0.0%20v1&search=am62 

We cannot get it to boot either, we see nothing in the Micro USB UART serial console (using gtkterm for /dev/ttyUSB0 115200-8-N-1). 

So we have 2 issues: 

  • Cannot flash eMMC using USB DFU mode
  • We get no serial output on UART connection for any type of boot except UART boot mode

In UART boot mode i could get the character "C" and the other characters. After some decoding it looks like this: 

-----------------------
SoC ID Header Info:
-----------------------
NumBlocks            : [2]
-----------------------
SoC ID Public ROM Info:
-----------------------
SubBlockId           :
SubBlockSize         :
DeviceName           : am62x
DeviceType           : HSFS
DMSC ROM Version     : [0, 1, 0, 1]
R5 ROM Version       : [0, 1, 0, 1]
-----------------------
SoC ID Secure ROM Info:
-----------------------
Sec SubBlockId       : 2
Sec SubBlockSize     : 166
Sec Prime            : 0
Sec Key Revision     : 0
Sec Key Count        : 0
Sec TI MPK Hash      : d68ecb2c055dff11ade95bd927e837d2a53bc23b0a2800cebce4f106bcf309df2213912d77a157a8b7c2df40672a06a918034aa4c7d603e462481475225d49b8
Sec Cust MPK Hash    : ad0bc40b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sec Unique ID        : 5a7e46551e64d1d60590128b2566531d07bd00f3a6a23c6c52eedb5a38072a34


Thanks in advance! 

/Johan

  • An addition, I saw now that we actually seem to get some UART serial console output when flashing via USB DFU sometimes. But we only get this: 

    U-Boot SPL 2021.01-00001-g45cb7e44ae (Jun 14 2023 - 15:45:27 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes

    And then nothing...

  • Hi,

    You seem to have an AM62-lp SK not AM62x SK board. Those binaries will not boot on your board. You need to build U-boot with the following defconfigs:
    - am62x_lpsk_a53_defconfig
    - am62x_lpsk_r5_defconfig

    ~ Judith

  • Hello Judith, 

    Thank you for the answer. I tried to build with those defconfigs and made a litlle bit further. 
    Now when I try to download the tiboot3.bin using "dfu-util" this happens: 

    >> sudo dfu-util -R -a bootloader -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 sourceforge.net/.../

    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 512
    Copying data from PC to DFU device
    Download [=========================] 100% 314198 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    dfu-util: unable to read DFU status after completion
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode


    And then in the Micro USB serial console i get this: 

    U-Boot SPL 2021.01-00001-g45cb7e44ae (Jun 15 2023 - 08:19:10 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    I tried to reset the board (both soft and hard reset) but it did not help. 
    Could it be that the defconfigs that you supplied doesn't support DFU boot maybe? 
    - am62x_lpsk_a53_defconfig
    - am62x_lpsk_r5_defconfig 

    I know that the defconfigs for other boards needs to have "_usbdfu_" in the name of the defconfig for DFU boot to work. 

    Best regards

    Johan

  • We abandoned the DFU USB boot for our board since we couldn't find any defconfigs with DFU support in the SDK. 

    However, we switched to SD card boot now and we used the tiboot3.bin, tispl.bin an u-boot.img that we got using the 
     
    - am62x_lpsk_a53_defconfig
    - am62x_lpsk_r5_defconfig

    We also flashed an SD card with a default image from the TI SDK: tisdk-default-image-am62xx-evm.wic.xz 

    And then we changed the boot-files on the boot partition to the ones we created above. 

    Now we get U-boot to come further but then it fails in the end with this: 

    U-Boot SPL 2021.01-00001-g45cb7e44ae (Jun 15 2023 - 10:54:51 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 05:06:58, Feb 24 2023
    
    U-Boot SPL 2021.01-00001-g45cb7e44ae (Jun 15 2023 - 10:54:47 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC2
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    
    
    U-Boot 2021.01-00001-g45cb7e44ae (Jun 15 2023 - 10:54:47 +0200)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM62x LP SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-LP-SKEVM rev E2
    DRAM:  2 GiB
    NAND:  0 MiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    1490 bytes read in 3 ms (484.4 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    Running uenvcmd ...
    1 bytes read in 3 ms (0 Bytes/s)
    Already setup.
    19147264 bytes read in 760 ms (24 MiB/s)
    Failed to load '/boot/k3-am62x-lp-sk.dtb'
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    ERROR: Did not find a cmdline Flattened Device Tree
    Could not find a valid device tree


    How can we fix this? 

    Failed to load '/boot/k3-am62x-lp-sk.dtb'
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    ERROR: Did not find a cmdline Flattened Device Tree
    Could not find a valid device tree 

    I tried to put the  k3-am62x-lp-sk.dtb in the boot partition on the SD card (took it from the TI SDK) but it gives the same error.. 

    /Johan

  • Hi Johan,

    Yes, there does not seems to be usbdfu defconfigs for your board in TI-U-boot, therefore I am not sure it has been validated.

    So the PSDK for AM62-lp has not been released yet, that is why you cannot find much information. Although it will be available here soon: https://software-dl.ti.com/cicd-report/linux/ under AM62p device. You can then flash the .wic image to boot your board.

    If not, you are in the correct track, it should work. Except you need to place k3-am62x-lp-sk.dtb  in the root/boot partition of the SD card.

    ~ Judith

  • Hello Judith, 

    Thank you for your reply. 

    Yes, it seems like this board doesn't have that much support yet based on the documentation. 

    However, following the documentation here: https://dev.ti.com/tirex/explore/node?node=A__AHlqIk-7QQxAvfmhk-DlOA__linux_academy_am62x__XaWts8R__LATEST 
    I was able to build the bootchain, custom kernel and use the filesystem from the default TI image and get it to boot from SD card. 

    I will see if I run into any more problems down the line. 

    Best regards
    Johan

  • Hi,

    Great, keep me posted.

    ~ Judith