3.6.2. DFU Boot

3.6.2.1. Overview

AM62x USB peripheral boot (also called device boot) mode receives second bootloader images from a USB host using the Device Firmware Update (DFU) specification defined by USB-IF.

This section demonstrates how to use DFU to boot AM62x EVM to U-Boot prompt with a Linux Ubuntu PC.

3.6.2.2. Setup

Hardware

  • Refer to EVM Boot Mode Switches to set the AM62x SK EVM boot mode switches to USB Peripheral boot.

  • Connect the AM62x SK EVM type-C USB port J13 to the Linux PC USB host port.

Software

  • dfu-util is the commonly used DFU tool on Linux host. Use the following command to install it on the Ubuntu PC:

$ sudo apt update && sudo apt install dfu-util
  • Prepare the following U-Boot images for downloading to and booting on the EVM via DFU:

    • tiboot3.bin

    • tispl.bin

    • u-boot.img

Due to the U-Boot binary size limitation, the DFU support is disabled in the prebuilt U-Boot binaries in the Processor SDK Linux for AM62x. To enable DFU support, rebuild U-Boot following the instruction in Build U-Boot but using defconfig am62x_evm_r5_usbdfu_config instead of am62x_evm_r5_config.

3.6.2.3. DFU Boot Procedure

Command Summary

The following commands are used on the Linux host to transfer the U-Boot images.

$ sudo dfu-util -R -a bootloader -D tiboot3.bin
$ sudo dfu-util -R -a tispl.bin -D tispl.bin
$ sudo dfu-util -R -a u-boot.img -D u-boot.img

Transfer tiboot3.bin

Power on the AM62x EVM. Run the following command on the Linux host to ensure the ROM DFU device is enumerated.

$ sudo dfu-util -l
...
Found DFU: [0451:6165] ver=0200, devnum=7, cfg=1, intf=0, path="3-4.1.3", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=7, cfg=1, intf=0, path="3-4.1.3", alt=0, name="bootloader", serial="01.00.00.00"

Note name=”bootloader” in the message above. This message means that the EVM is waiting to receive tiboot3.bin. Run the following command on the Linux host to transfer tiboot3.bin:

$ sudo dfu-util -R -a bootloader -D tiboot3.bin

After the host shows the transfer is complete, the EVM UART console should show the following messages.

U-Boot SPL 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:20 +0000)
...
Trying to boot from DFU

Transfer tispl.bin

Now run command dfu-util -l command on the Linux host again. It should show the following messages:

$ sudo dfu-util -l
...
Found DFU: [0451:6165] ver=0224, devnum=12, cfg=1, intf=0, path="3-4.1.3", alt=1, name="u-boot.img", serial="UNKNOWN"
Found DFU: [0451:6165] ver=0224, devnum=12, cfg=1, intf=0, path="3-4.1.3", alt=0, name="tispl.bin", serial="UNKNOWN"

Note name=”tispl.bin” in the message above. This message means that the EVM is waiting to receive the U-Boot image tispl.bin. Now run the following command on the Linux host to transfer tispl.bin:

$ sudo dfu-util -R -a tispl.bin -D tispl.bin

After the host shows the transfer is complete, the EVM UART console should show the following messages.

####################################DOWNLOAD ... OK
Ctrl+C to exit ...
...
Trying to boot from DFU

Transfer u-boot.img

Now run the following command on the Linux host to transfer u-boot.img:

$ sudo dfu-util -R -a u-boot.img -D u-boot.img

After the host shows the transfer is complete, the EVM UART console should show the following messages.

####DOWNLOAD ... OK
Ctrl+C to exit ...

U-Boot 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:19 +0000)

...
Hit any key to stop autoboot:  0

Now press any key on the EVM UART console to enter the EVM U-Boot prompt.