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.

AM6548: DFU function in AM6548

Part Number: AM6548

We followed guide in https://software-dl.ti.com/processor-sdk-linux/esd/AM65X/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-DFU.html

We use IDK evm board to verify this function, we meet some problems:

set boot code to boot from USB [3..0] to 1000, its mode and port we select mode 0(dfu function), USB0

connect our host with usb0 on IDK (PCIE extender board),

run command on host:

kenn@Precision-5530:~/tmp/uboot_6548$ 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:6162] ver=0000, devnum=23, cfg=1, intf=0, path="1-2", alt=1, name="SocId", serial="02.00.00.00"
Found DFU: [0451:6162] ver=0000, devnum=23, cfg=1, intf=0, path="1-2", alt=0, name="bootloader", serial="02.00.00.00"

kenn@Precision-5530:~/tmp/uboot_6548$ 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:6162
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% 154140 bytes
Download done.
state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
dfu-util: can't detach
Resetting USB to switch back to runtime mode

and after that, we can't transfer other files:sysfw.itb/ tispl.bin /u-boot.img.  what's wrong with it?

Thanks

Kenn

  • Hi,

    You will have to am65x_evm_r5_usbdfu_defconfig to build your tiboot3.bn that can be used for DFU.

    Rest all other images will be same.

    Please try to compile the am65x_evm_r5_usbdfu_defconfig and use the tiboot3.bin obtained from that for DFU.

    Best Regards,
    Keerthy

  • Hi, Keerthy

    I had replaced the tiboot3.bin from am65x_evm_r5_usbdfu_deconfig compiling process, but the result is the same as follow:

    kenn@Precision-5530:~/tmp/uboot_6548$ 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:6162
    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% 149472 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode

    do you have any suggestion?

    Thanks

    Kenn

  • Hi, Keerthy

    Any updates about this issue?

    Thanks

    Kenn

  • Hi,

    dfu-util: can't detach
    Resetting USB to switch back to runtime mode

    Is not a fatal error.

    Can you try 'sudo dfu-util -l' after the transferring tiboot3.bin. You should see the name of the next binary to be
    transferred.

    Best Regards,
    Keerthy

  • Please see the message that we try "sudo dfu-util -l" after sending tiboot3.bin:

    kenn@Precision-5530:~/tmp/uboot_6548$ 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:6162
    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% 149472 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode

     
    kenn@Precision-5530:~/tmp/uboot_6548$ 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/.../

    We can't see message like that:

    host$ sudo dfu-util -l
    
    Found DFU: [0451:6163] ver=0224, devnum=51, cfg=1, intf=0, path="3-2", alt=0, name="sysfw.itb", serial="UNKNOWN"
    

    Thanks

    Kenn

  • Hi Kenn,

    Are you using a ubuntu Virtual machine or a Ubuntu host machine?

    - Keerthy

  • Yes, We used a Ubuntu host machine, which the version of Ubuntu is 18.04

    Thanks

    Kenn

  • Hi Kenn,

    I am facing issues with my ubuntu VM with DFU. I will try to get a native Ubuntu host machine & try to reproduce the issue.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Any update?

    Thanks

    Kenn

  • Hi Kenn,

    We have reproduced the issue. We are debugging it at priority and we will keep you posted.
    Thanks for your patience.

    Best Regards,
    Keerthy

  • Hi Kenn,

    On top of using the am65x_evm_r5_usbdfu_defconfig to build your tiboot3.bn
    Please use the below DT change as well:

    diff --git a/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
    index ade2a4814a..ba96d3c933 100644
    --- a/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
    +++ b/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
    @@ -249,7 +249,7 @@
     &usb0 {
            pinctrl-names = "default";
            pinctrl-0 = <&usb0_pins_default>;
    -       dr_mode = "host";
    +       dr_mode = "peripheral";
            u-boot,dm-spl;
     };
     

    Let me know if this solves DFU issue. If yes please click on verify answer.

    - Keerthy

  • Hi, Keerthy

    I modified it as your guide, but it still didn't work:

    kenn@Precision-5530:~/ti-sdk-08000004/board-support/u-boot_build/r5$ 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:6162] ver=0000, devnum=14, cfg=1, intf=0, path="1-1", alt=1, name="SocId", serial="02.00.00.00"
    Found DFU: [0451:6162] ver=0000, devnum=14, cfg=1, intf=0, path="1-1", alt=0, name="bootloader", serial="02.00.00.00"
    kenn@Precision-5530:~/ti-sdk-08000004/board-support/u-boot_build/r5$ 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!!!
    dfu-util: Cannot open DFU device 0451:6162
    dfu-util: No DFU capable USB device available

    Thanks

    Kenn

  • Kenn,

    This issue is different. Earlier you were able to transfer tiboot3.bin.

    Device returned transfer size 512
    Copying data from PC to DFU device
    Download [=========================] 100% 149472 bytes

    Please check your connection.

    Also the above diff is provided on top of 8.0 SDK.

    In 7.3 SD you should change the dr_mode like below:

    diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
    index 33fd5658eed6..d9d6da18f018 100644
    --- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
    +++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
    @@ -253,7 +253,7 @@
     &usb0 {
            pinctrl-names = "default";
            pinctrl-0 = <&usb0_pins_default>;
    -       dr_mode = "host";
    +       dr_mode = "peripheral";
            u-boot,dm-spl;
     };

    - Keerthy

  • Keerthy,

    Yes, we built it on SDK 8.0.  After we reconnect the usb line, now it can transfer three files successfully, but it failed at the last file u-boot.img transferring:

    kenn@Precision-5530:~/tmp/uboot_6548$ sudo dfu-util -R  -a u-boot.img -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 sourceforge.net/.../

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    dfu-util: No DFU capable USB device available

    The output of console(/dev/ttyUSB0)  listed as follow:

    U-Boot SPL 2021.01-dirty (Aug 26 2021 - 13:23:04 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
    Trying to boot from DFU
    #####################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    init_env from device 8 not supported!
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.5(release):08.00.00.004-dirty
    NOTICE: BL31: Built : 04:09:04, Aug 7 2021

    U-Boot SPL 2021.01-g53e79d0e89 (Aug 07 2021 - 04:22:53 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
    Detected: Silicon SR2.0
    i2c_omap i2c@42120000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
    Detected: AM6-IDKAPPEVM rev A
    Detected: SER-PCIE2LEVM rev A
    Trying to boot from DFU
    No USB device found
    usb_gadget_initialize failed

    Thanks

    Kenn

  • U-Boot SPL 2021.01-dirty (Aug 26 2021 - 13:23:04 +0800)

    This is new 26th August. So this is all good.


    U-Boot SPL 2021.01-g53e79d0e89 (Aug 07 2021 - 04:22:53 +0000)

    This is old right? Aug 7th? Are you building the new tispl.bin & trying DFU?

    Please build all the binaries fresh after the change in DT.

    Use the latest built binaries. If this works please click on verify answer.

    Regards,
    Keerthy

  • Thanks, Keerthy:

    Yes, it worked, I just copied that tispl.bin and u-boot.img from the folder "prebuilt-images“ in SDK 8.0 yesterday, today I compiled it and it worked fine.

    Thanks!

    Kenn