UART
GPIO
nHib
Tx
Rx
CTS
RTS
Tx
Rx
CTS
RTS
MCU
SimpleLink
TM
CC3120
Copyright © 2017, Texas Instruments Incorporated
Host Interface
31
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Device
shows a typical host setup of the SimpleLink Wi-Fi device using UART interface.
Figure 3-2. Typical CC3120 Setup (UART)
Working with the UART interface requires the use of hardware flow control to avoid data loss. UART
hardware flow control works in a way that an entity that is ready to accept data, keeps its RTS line
asserted. Before the transmission, the UART peripheral of the second side will read its CTS line, which is
connected to the RTS of the first side, to verify if it is allowed to send data over the line. The SimpleLink
Wi-Fi device may request to stop transmissions in some scenarios; and therefore, its RTS line must be
respected. If the host is fast enough and does not need to stop transmissions from the SimpleLink device
at any time, the CTS line of the SimpleLink Wi-Fi device might be tied to a pullup instead.
For UART mode only, the following define should be added in user.h: #define SL_IF_TYPE_UART
3.4.2.1
Change UART Baud Rate
The SimpleLink device does not support automatic baud rate detection; therefore this parameter should be
set after every reset. When calling to sl_start, the default baud rate (115,200) must be set as part of the
API parameters. If a different baud rate is needed, the host can set it after the initialization process
completes by using the API sl_DeviceUartSetMode. This setting is not persistent and must be repeated
every time sl_Start is called.
Supported baud rates:
•
SL_DEVICE_BAUD_9600
•
SL_DEVICE_BAUD_14400
•
SL_DEVICE_BAUD_19200
•
SL_DEVICE_BAUD_38400
•
SL_DEVICE_BAUD_57600
•
SL_DEVICE_BAUD_115200
•
SL_DEVICE_BAUD_230400
•
SL_DEVICE_BAUD_460800
•
SL_DEVICE_BAUD_921600