SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
STA mode is not the initialization mode by default, therefore it must be set by the application or during the image creation. The following API should be called to set the device in STA mode. Switching to a new mode requires a reset and is persistent with no dependency on the system-persistent configuration.
Example:
_i16 Role;
_i16 Status;
/* Set the device in STA mode */
Status = sl_WlanSetMode(ROLE_STA);
if( Status )
{
/* Error setting mode */
}
/* Reset the device */
Status = sl_Stop(0);
Role = sl_Start(NULL,NULL,NULL);
if (ROLE_STA != Role)
{
/* Role Error */
}