This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Additional UART in U-boot

Hello Guys,

I'm using AM335x and using SDK 7.0, can you please let me know how I can enable additional UART (UART 1 preferred) in u-boot? I don't want to use it as console, I would like to send and receive data to a peripheral. Additionally, what commands do I need for Tx and Rx on the second UART? (For the console, I use printf for Tx but is there a uart_send (?) for the additional uart.

Thank you

Regards

Santhosh

  • Hi,

    I will ask the software team to comment.
  • Hello Biser,

    I was able to get it working, I had to do the following:

    1. In board.c, I enabled the pin mux for UART1

    2. I added #include <serial.h> to my board.c file

    3. I added CONFIG_SYS_NS16550_COM2 to my config .h file (#define CONFIG_SYS_NS16550_COM2        0x48022000). This adds UART1 as a NS16550 serial port and hence we can use serial functions to send data to the UART. It bypasses the config silent definition, so the puts, putc will continue to work even if silent=1.

    4. I then used the function eserial2_device.puts to send data on UART1.

    Please note that this works only for UART1 - so if someone wants to use UART2/3/4 they will need to modify serial.h/c to suit their needs.

    Thank you

    Regards

    Santhosh