SPRUJB8 April 2024
This reference guide provides a detailed description of Texas Instruments' TMS320F28P65x Flash API Library (FAPI_F28P65x _EABI_v3.00.02.lib or FAPI_F28P65x _COFF_v3.00.02.lib) functions that can be used to erase, program and verify Flash on TMS320F28P65x devices. Note that Flash API V3.00.XX.XX should be used only with TMS320F28P65x devices. The Flash API Library is provided in C2000Ware at C2000Ware_x_xx_xx_xx\libraries\flash_api\F28P65x.
TMS320F28P65x devices have up to five flash banks. Out of these five banks, the user application can map any bank to any CPU (CPU1 or CPU2) as per the application’s requirement using the BANKMUXSEL register. Since there is only one flash wrapper (and only one flash pump) in this device, only one bank can be erased/programmed at a time. A semaphore (called as FLASHCTLSEM or FLASHSEM) is provided to manage the ownership of the flash wrapper between the two CPUs. Before performing any flash erase/program operations, a given CPU has to gain the ownership of the flash wrapper by using this semaphore. Once the erase and program operations are complete, the respective CPU should relinquish the ownership of the flash wrapper using this semaphore to allow the other CPU to gain the ownership of the flash wrapper when needed. For more details on the BANKMUXSEL and the FLASHCTLSEM (also called as FLASHSEM) registers, see the TMS320F28P65x Real-Time Microcontrollers Technical Reference Manual. Note that the flash API library does not configure these registers. Before performing any flash erase/program operations using the flash API library, the user application should configure these registers as per the application’s requirement. The flash API usage example provided in the C2000Ware uses the IPC_claimFlashSemaphore() to configure the FLASHCTLSEM and SysCtl_allocateFlashBank() configure the BANKMUXSEL. These functions are provided in the driverlib. Refer to the flash programming example provided in C2000Ware at “C2000Ware_.....\driverlib\F28P65x\examples\....\flash\flashapi_128bit_programming\flashapi_cpu1_128bitprogramming.c”