188.8.131.52. USB Device Firmware Upgrade (DFU)¶
When working with USB Device Firmware Upgrade (DFU), regardless of the medium to be written to and of the board being used, there are some general things to keep in mind. First of all, you will need to get a copy of the dfu-util program installed on your host. If your distribution does not provide this package you will need to build it from source. Second, the examples that follow assume a single board is plugged into the host PC. If you have more than one device plugged in you will need to use the options that dfu-util provides for specifying a single device to work with. Finally, to program via DFU for a given storage device see the section for the storage device you are working with.
184.108.40.206.1. USB Peripheral boot mode (SPL-DFU support)¶
The USB Peripheral boot mode is used to boot using USB interface using SPL-DFU feature. Steps outlined here can be used on platform that support USB Peripheral boot mode.
- Build the bootloader images using default “am64x_evm_r5_defconfig” and “am64x_evm_a53_defconfig” configs files. The configs required for DFU boot as well as DFU in U-Boot are already enabled. For instructions to build the bootloader images please refer to Build U-Boot.
- Load the bootloader images tiboot3.bin, tispl.bin and u-boot.img using the dfu-util from host PC.
- Once the U-Boot is up, use DFU command from u-boot to flash the binary images from Host PC (using dfu-utils tool) to the eMMC, or QSPI to fresh/factory boards.
USB Peripheral boot mode on AM64x EVM (SPL-DFU boot mode)
- Set SYSBOOT switches to USB Peripheral boot mode (Refer to Initialization chapter of AM64 TRM for boot switch details)
- For AM64X GP EVM, SYSBOOT switch settings are SW2[1:8] = 11001010 and SW3[1:8] = 00000000. Also, the jumper on pin header J23 has to be removed.
- Connect USB 2.0 Port on EVM to PC through USB cable
- Power on the board
On Linux host
host$ sudo dfu-util -l
On Windows host
Download dfu-util from Releases section of dfu-util Homepage and extract the zip file.
host> dfu-util.exe -l
This will show the following DFU entities:
Found DFU: [0451:6165] ver=0200, devnum=9, cfg=1, intf=0, path="1-2.2", alt=1, name="SocId", serial="01.00.00.00" Found DFU: [0451:6165] ver=0200, devnum=9, cfg=1, intf=0, path="1-2.2", alt=0, name="bootloader", serial="01.00.00.00"
Send boot images in this order: tiboot3.bin -> tispl.bin -> u-boot.img
On Windows, if you face any issues while listing the available DFU Interfaces, try installing/updating the Generic USB DFU Drivers using Zadig.
Move to directory containing the images and give the following commands
On Linux host
host$ sudo dfu-util -R -a bootloader -D tiboot3.bin host$ sudo dfu-util -l Found DFU: [0451:6165] ver=0224, devnum=11, cfg=1, intf=0, path="1-2.2", alt=1, name="u-boot.img", serial="UNKNOWN" Found DFU: [0451:6165] ver=0224, devnum=11, cfg=1, intf=0, path="1-2.2", alt=0, name="tispl.bin", serial="UNKNOWN" host$ sudo dfu-util -R -a tispl.bin -D tispl.bin host$ sudo dfu-util -R -a u-boot.img -D u-boot.img
On Windows host
host> dfu-util.exe -R -a 0 -D tiboot3.bin host> dfu-util.exe -l Found DFU: [0451:6165] devnum=0, cfg=1, intf=0, alt=0, name="tispl.bin" Found DFU: [0451:6165] devnum=0, cfg=1, intf=0, alt=1, name="u-boot.img" host> dfu-util.exe -R -a 0 -D tispl.bin host> dfu-util.exe -R -a 1 -D u-boot.img
On Windows host, if name of the DFU Interface doesn’t work, use alt number instead.
At this point, the board should boot to the U-Boot prompt.