Persistent Configuration
35
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Device
3.12 Persistent Configuration
The SimpleLink Wi-Fi device lets users set the system-persistent configuration. By default, the mode of
the system-wide configuration persistence is set to true, and all APIs that follow the system configured
persistence maintain their configured settings after reset. If false, all calls to the APIs that follow the
system-configured persistence are volatile, and the configurations revert to default after reset.
Example:
_i16 Status;
_u8 persistent = 1;
Status
= sl_DeviceSet(SL_DEVICE_GENERAL, SL_DEVICE_GENERAL_PERSISTENT,
sizeof
(_u8),
(_u8*)(&persistent));
if
( Status )
{
/* error */
}
For a full list of parameters and their persistent configuration, refer to
.
NOTE:
If system-persistent configuration is enabled, any change in the system settings may result in
a serial-flash write operation, and its write endurance must be considered.
3.13 Errors
Errors are indicated by the return value of the API or by an asynchronous event. Asynchronous events
can be sent to the host at any time with a specific error indication, and may also include specific data for
each event. To listen to these events and conclude the needed information, a handler should be
implemented in the user application, and registered under the user.h header file. Each error code is
unique. The following errors are common and require user action (a full possible error list is under the file
error.h in the host driver):
lists common errors indicated by asynchronous events.
Table 3-4. Common Asynchronous Error Events
Error
Handler
Comments
SL_DEVICE_EVENT_ERROR
slcb_DeviceGeneralEvtHdlr
General error. Includes the parameters status
(specified in the following table and sender, see
SlDeviceSource_e).
SL_DEVICE_EVENT_FATAL_DEVICE_ABORT
slcb_DeviceFatalErrorEvtHdlr
Notifies fatal error. The SimpleLink device is
asserted. User must perform device restart (call
sl_Stop followed by sl_Start).
SL_DEVICE_EVENT_FATAL_DRIVER_ABORT
slcb_DeviceFatalErrorEvtHdlr
Notifies fatal error. The host driver is asserted.
User must perform device reset.
SL_DEVICE_EVENT_FATAL_NO_CMD_ACK
slcb_DeviceFatalErrorEvtHdlr
Notifies fatal error. The host driver did not
receive the ACK command from the device.
User must perform device restart (call sl_Stop
followed by sl_Start).
SL_DEVICE_EVENT_FATAL_SYNC_LOSS
slcb_DeviceFatalErrorEvtHdlr
Notifies fatal error. The host driver and
SimpleLink device are out of sync. User must
perform device restart (call sl_Stop followed by
sl_Start).
SL_DEVICE_EVENT_FATAL_CMD_TIMEOUT
slcb_DeviceFatalErrorEvtHdlr
Notifies fatal error. The command time-out has
expired. User must perform device restart (call
sl_Stop followed by sl_Start).