SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
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 */
}