NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Enabling UART1 on AM18X/DA850/OMAP-L138 running Linux
Contents
About this page[edit]
This page describes steps to enable and verify the UART1/ttyS1 on AM18x/DA850/OAMP-L138 EVMs running linux.
Enabling UART1[edit]
- Merge below series patches if your kernel is prior to PSP release 03.21.00.04.
- Build kernel by following steps specified in below user guide link.
- As UART1 lines on EVM are not available on DB9 connector, user should have custom card on J30 audio expander slot(ref:EVM figure) to connect UART1 lines to DB9.
Enabling flow control on UART1[edit]
- Since AHCLKX and AHCLKR pins of McASP are muxed with CTS and RTS of UART1 respectively, UART1 flowcontrol and audio cannot be enabled simultaneously.
- For enabling UART1 flow control make sure to enable flow control by selecting CONFIG_DAVINCI_UART1_AFE and disable McASP by deselecting CONFIG_SND_DA850_SOC_EVM options from menuconfig as shown below.
Select UART1 flow control[edit]
System Type ---> <*> TI DaVinci Implementations ---> <*> DA850/OMAP-L138/AM18x based system <*> Enable UART1 flow control
Disable Audio[edit]
Device Drivers ---> <*> Sound card support ---> <*> Advanced Linux Sound Architecture ---> <*> ALSA for SoC audio support ---> <*> SoC Audio for the TI DAVINCI chip < > SoC Audio support for DA850/OMAP-L138/AM18xx EVM
- Make sure that AUDIO_EXP_SEL is driven high by turning S7-2(ref:EVM figure) switch ON, otherwise the UART1_CTS signal will have contention with the AIC_MCLK clock signal(i.e. Flow control will be non-functional).
Verification[edit]
- UART1 can be verified by connecting 2 EVMs back to back on UART1 using custom made connectors as shown in below figure.
- UART1 port of 2 EVMs are connected using single stranded green wires as shown in above figure and connection are made as shown below:
- Connect UART1_RTS of EVM1 to UART1_CTS of EVM2
- Connect UART1_CTS of EVM1 to UART1_RTS of EVM2
- Connect UART1_TX of EVM1 to UART1_RX of EVM2
- Connect UART1_RX of EVM1 to UART1_TX of EVM2
target1$ cat /dev/ttyS1 target2$ echo <enter_text> > /dev/ttyS1
- Should receive entered text on target1. Above steps can be repeated after enabling flow control.
- UART1 can also be verified on single EVM by doing external loopback connection as below:
- Short RTS-CTS lines of UART1.
- Short TX-RX lines of UART1.
- Write to and read from /dev/ttyS1 from an application. The test is passed if you read back what you written.
- Above test can be rerun after enabling flow control.