UART

During development, it may be beneficial to leverage the primary UART debug interface for loading your boot binaries onto the phyCORE-AM62Ax development kit. This guide will walk through the process of booting into U-Boot via UART.

Preparing the Development Kit

The phyCORE-AM62Ax development kit is configured to boot from an SD Card slot by default and basic steps for performing this and establishing serial communication are outlined in the Quickstart. We need to modify the default boot configuration to UART Boot AND connect the development kit’s Debug UART interface to your Ubuntu Host Machine (these steps are not currently supported from a Windows Host Environment).

  • S7 should be ON to override the default boot settings.

UART Boot Switch Settings phyBOARD-AM62x Boot Switch Location
  • Once configured, connect your phyCORE-AM62Ax development kit’s Debug UART interface to your Ubuntu Host Machine. This can typically be done in the Virtual Machine settings but exact steps vary depending on the VM software you are using.

Note

This guide assumes the following:
  1. The console is connected to ttyUSB0 of the Ubuntu Host Machine.

  2. lrzsz package is installed on the Ubuntu Host Machine. To install lrzsz, run:

host:~$ sudo apt update && sudo apt install lrzsz
  • Make sure you are part of the dialout group.

    host:~$ sudo usermod -a -G dialout <username>
    

Note

You may need to restart your computer for the dialout permission to take effect.

  • Power-on the development kit.

  • To test your setup thus far, open a serial console within your Ubuntu Host Machine:

    • Use the following command to start a serial connection with the development kit:

      host:~$ minicom -b 115200 -D /dev/ttyUSB0
      
    • In UART Boot mode, you should see the following string of characters printed to the terminal:

      minicom Session
      01000000011a0000616d36326100000000000000475020200008000000080000CC
      
    • You should also see the final “C” character continuously printed to the terminal.

    • You must now close the minicom session for the remaining steps to work. To close minicom, first enter Ctrl-A and then hit the X key (Ctrl-A and then the Z key will give you a command reference for more options).

Loading the Bootloader Binaries

Enter the following commands in your Ubuntu Host Machine in order to load the multiple stages of the bootloaders in sequence (be sure to replace the “<path to>” substring within each command to reflect the appropriate filesystem path your build system has these files stored):

host:~$ stty -F /dev/ttyUSB0 115200
host:~$ sb --xmodem <path to>/tiboot3.bin > /dev/ttyUSB0 < /dev/ttyUSB0
host:~$ sb --ymodem <path to>/tispl.bin > /dev/ttyUSB0 < /dev/ttyUSB0
host:~$ sb --ymodem <path to>/u-boot.img > /dev/ttyUSB0 < /dev/ttyUSB0

Once complete, you can reopen minicom to access the U-Boot console:

host:~$ minicom -b 115200 -D /dev/ttyUSB0