3.6.2. DFU Boot

3.6.2.1. Overview

AM64x 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 AM64x 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 AM64x GPEVM boot mode switches to USB Peripheral boot.

  • Connect the AM64x GPEVM micro-B USB port J24 to the Linux PC USB host port.

  • Remove headers on Jumper J23 on AM64x GPEVM to let the USB port work in device mode.

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

These image files are located under the board-support/prebuilt-images/ folder in the Processor SDK on the Linux host. u-boot.img is named as u-boot-am64xx-evm.img.

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 AM64x 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.