The phyCORE-AM57x SOM is configured by default to use UART3 (ttyS2) for console input and output over the Carrier Board's X18 connector. The connector X17 also allows for the use of UART5 (ttyS4). This guide will show you how to send serial data over the UART5 interface.

Requirements  

ItemItem Number (Description)

M-F 2.54mm pitch Jumper Cables

Image result for M-F 2.54mm pitch Jumper Cables

Only 3 of these cables are needed. Male to Female connections. 

D-sub 9 to 10 pin Ribbon cable

Null Modem connector should be female. 

Null Modem cable

Image result for Null Modem cable

Female to male connections. 

RS232-USB adapter cable

Null Modem connector should be male. 

Connecting to UART5

  • With the phyCORE-AM57x development kit powered off, connect a jumper cable to each of the three pins at the header X17.
  • Connect these three jumpers to the D-sub9 to 10 pin Ribbon cable by using the following image as a reference:

     

         





  • Now connect your Null Modem cable and RS232-USB adapter cable to the D-sub9 to 10 pin Ribbon cable.
  • Setup a second Serial Console with the new COM port that should have been registered when the serial cable was connected to the Host PC. This will be the UART5 console. Configure this for 115200 baud, 8 data bits, no parity, and 1 stop bit (8n1) with no flow control.
  • Power on the kit and boot into Linux.
  • Enter the following command to open the /etc/securetty file in a Vi text editor. This file restricts the available terminal sessions in which a root user can login. 

    Target (Linux)

    vi /etc/securetty
    CODE
  • Edit the contents of the file by adding "ttyS4" to the bottom of the list of Standard Serial Ports. The beginning of the file should match the example below.

    File after Editing

    # /etc/securetty: list of terminals on which root is allowed to login.
    # See securetty(5) and login(1).
    console
    
    # Standard serial ports
    ttyS0
    ttyS1
    ttyS2
    ttyS3
    ttyS4
    
    ...
    CODE

    The vi text editor begins in "Command Mode" and you must first hit the 'i' key in order to enter "Insert Mode". Using the arrow keys to navigate, make the necessary changes and then hit ESC to go back to "Command mode". Now enter ":wq" to write the file and quit.

  • Once you saved your changes to the /etc/securetty file, reboot the board with the following command:  

    Target (Linux)

    reboot
    CODE
  • Stop the board in U-Boot. You will have approximately 3 seconds to enter any key once the board begins bootstrapping.
  • Enter this command in U-Boot: 

    Target (U-Boot)

    editenv console
    CODE
  • Once prompted, change the content of the console variable to ttyS4 before hitting the Enter key: 

    Example

    => editenv console
    edit: ttyS4,115200n8
    CODE
  • Save the new environment setting before resetting the board: 

    Target (U-Boot)

    saveenv
    reset
    CODE
  • Once booted you should be presented with a login prompt in both UART console sessions. 

Reverting Changes

  • Enter the following command to open the /etc/securetty file in a Vi text editor. This file restricts the available terminal sessions in which a root user can login. 

    Target (Linux)

    vi /etc/securetty
    CODE
  • Edit the contents of the file by removing "ttyS4" from the bottom of the list of Standard Serial Ports. Remember to save your changes!

  • Reboot the board: 

    Target (Linux)

    reboot
    CODE
  • Stop the board in U-Boot. You will have approximately 3 seconds to enter any key once the board begins bootstrapping.
  • Revert all environment settings to their default values: 

    Target (U-Boot)

    env default -f -a
    saveenv
    CODE
  • Boot back into Linux with the following command. You should now no longer see a login prompt in the UART5 Console session. 

    Target (U-Boot)

    boot
    CODE