Programming
127
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
File System
•
Host (not relevant to the CC3220 device)
•
External (third party) flash programmer
The programming time depends on the image size and the SFLASH type. During the programming, no file
operation can be executed; trying to read or write a file results in an error of
SL_ERROR_FS_PROGRAMMING_IN_PROCESS.
The programming involves two internal steps:
1. Download the image.
2. Extract the image packed file.
8.12.1.2.1 Image Creator Tool (UART) Programming
The UniFlash Image Creator tool is a method of programming that uses the device UART interface. The
tool is the common programming method.
The device starts the extraction procedure when the last portion of the image file is received.
At the end of the programming method, a success status is returned to the caller, and the device is
operational.
8.12.1.2.2 Host Programming
The host has an interface function for programming the device. For the CC3220/R/F/S devices, the host
programming method is not applicable (because 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).
8.12.1.2.3 External Tool Programming
Programming the SFLASH by an external tool requires using the .bin or .hex programming files. The
programming files used by the external tool are created by the UniFlash Image Creator tool.
For non-secure programming, use the programming.bin/.hex. For secure programming, use the
programming.encrypt.bin/.hex.
The .bin and .hex (Intel Hex) files are standard file formats.
At the end of the programming process, the device is operational and configured.
The external programming steps are:
1. Program the SFLASH with the third-party programming tool.
•
Important: The entire SFLASH should be erased before programming the image. The extraction
process considers that the SFLASH is erased, except to the programming image storage.
2. Assemble the SFLASH to the device.