SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The host has an interface function for programming the device. The interface is applicable more for CC31xx devices since in CC32xx devices, the JTAG interface is locked by default and the host application is part of the programming image.
The programming file used by the host interface is created by the UniFlash Image Creator tool.
For non-secure programming, use the file programming.ucf. For secure programming, use the file programming.encrypt.ucf.
_i32 Status
_u8 DataBuf[1000];
_u16 Len;
_u8 Key[16];
Status = sl_FsProgram ((const _u8*)DataBuf , Len , &Key , 0 );
if( Status < 0 )
{
/*error */
}
For programming, the function receives the .ucf file and the image key (or null key). The device starts the extraction procedure when the last portion of the file is received. The function returns after the extraction is complete.
When the function completes, a hibernate-reset is required (sl_Stop, sl_Start).