Flash

Non-volatile flash memory on C2000 devices is primarily used as program memory for the core and also as static data memory. During application development, application executable can be programmed in to the flash memory using Code Composer Studio (CCS). When CCS identifies that the code is mapped in to the flash memory for a given application, it will automatically invoke CCS On-Chip Flash Plugin to load the executable in to the flash memory. Flash Plugin GUI is available at CCS Debug view -> Tools -> On-chip Flash. By default, the on-chip Flash Plugin erases the flash before programming, generates ECC for the executable and programs it along with the main array flash content and verifies the programmed content. If needed, users can enable blank check - CPU verification to confirm that flash is erased before programming. All of the USER OTP fields (DCSM and boot settings) can be programmed as well using the CCS On-chip Flash Plugin. Checksum calculation feature is also available within the Plugin GUI. Performance of the CCS flash programming is best when using high performance debug probes (XDS200 is suggested).

TI also provides UniFlash, a standalone JTAG based flash programming tool. This has a smaller footprint compared to that of CCS, since it does not include debug support. Users can create device-specific UniFlash package to further reduce the tool size (See Standalone Command Line window in UniFlash after installation). UniFlash offers all the GUI operations that CCS Flash Plugin does.

If the application safety standard requires the ECC generator and the verifier unit to be different, users can use the –ecc options provided in the link step in CCS. This when enabled, linker will generate the ECC image for the flash application and append it at the end of the executable. TI flash tools (CCS and UniFlash) are capable of programming this appended ECC image instead of the default generated Auto ECC. When using the linker ECC option, Auto ECC Generation provided in the TI flash tools should be disabled. Please refer to TMS320C28x Assembly Language Tools guide for more information. Note that TI flash tools do not support programming linker generated ECC for TMS320F28M3x, TMS320F2837x and TMS320F2807x devices.

Customers may also refer to 3rd party programmers like CodeSkin, DATA IO etc. to get flash programming support via serial peripherals like SCI, CAN etc. Elprotronic offers JTAG based C2000 GANG programmers.

TI flash tools and 3rd party flash programmers use Flash API library to perform flash erase and program operations. Flash API library and reference guide for each device are available in C2000Ware at /libraries/flash_api. Flash API library has functions to do flash operations like erase, blank check, program flash and corresponding ECC, program verify, suspend an erase or program operation, resume an erase or program operation, ECC calculation, checksum calculation, remap an ECC address to corresponding main array address etc. Note that ECC is not available for some C2000 devices. Please check Datasheet and TRM for the details. Applications that require erase or program flash at runtime can embed Flash API library to accomplish the same. An example to use Flash API library is provided in C2000Ware (e.g. C2000Ware_x_xx_xx_xx\driverlib\f2838x\examples\c28x\flash\flashapi_ex1_programming).

Note

TI does not normally distribute the flash API source code nor support development, or modifications, of the flash API by customers. Programming and erase of the flash must be done in a very specific manner. Testing the flash API library involves special test modes accessed by the device during automatic test equipment (ATE). Testing of the library is accomplished by using it in TI development, device testing, write erase cycle qualification, and by all flash programming tools. Modification or rebuilding the API library will not benefit from this testing and thus the restrictions.

In situations where the application is military, aviation, or medical in nature and the user has a justifiable and legitimate need for the source code for certification purposes, it can be provided under a signed license agreement with TI. If users fall into this category, contact your TI sales or distribution representative or post in the TI E2E forum for assistance.