SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
To trigger the restore-the-factory image from the host, the following steps are required:
Examples:
_i32 slRetVal;
SlFsRetToFactoryCommand_t RetToFactoryCommand;
_i32 Status, ExtendedStatus;
RetToFactoryCommand.Operation = SL_FS_FACTORY_RET_TO_IMAGE;
Status = sl_FsCtl( (SlFsCtl_e)SL_FS_CTL_RESTORE, 0, NULL , (_u8 *)&RetToFactoryCommand , sizeof(SlFsRetToFactoryCommand_t), NULL, 0 , NULL );
if ((_i32)Status < 0)
{
/*error*/
//Status is composed from Signed error number & extended status
Status = (_i16)Status>> 16;
ExtendedStatus = (_u16)slRetVal& 0xFFFF;
break;
}
//Reset
sl_Stop(10);
sl_Start(NULL, NULL, NULL);
_i32 slRetVal;
SlFsRetToFactoryCommand_t RetToFactoryCommand;
_i32 Status, ExtendedStatus;
RetToFactoryCommand.Operation = SL_FS_FACTORY_RET_TO_DEFAULT;
Status = sl_FsCtl( (SlFsCtl_e)SL_FS_CTL_RESTORE, 0, NULL , (_u8 *)&RetToFactoryCommand , sizeof(SlFsRetToFactoryCommand_t), NULL, 0 , NULL );
if ((_i32)Status < 0)
{
/*error*/
//Status is composed from Signed error number & extended status
Status = (_i16)Status>> 16;
ExtendedStatus = (_u16)slRetVal& 0xFFFF;
break;
}
//Reset
sl_Stop(10);
sl_Start(NULL, NULL, NULL);