SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
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:
Example:
_i16 Status;
_i16 Role;
SlDeviceUartIfParams_t params;
#define COMM_PORT_NUM 24 /* uart com port number */
params.BaudRate = SL_DEVICE_BAUD_115200; /*set default baud rate */
params.FlowControlEnable = 1;
params.CommPort = COMM_PORT_NUM;
Role = sl_Start(NULL, (signed char*)¶ms, NULL)
params.BaudRate = SL_DEVICE_BAUD_921600; /* set default baud rate 921600 */
Status = sl_DeviceUartSetMode((signed char*)¶ms);
if( Status )
{
/* error */
}