Other Parts Discussed in Thread: CONTROLSUITE
Hi,
I am using code composer studio Version: 6.0.0.00190 and compiler version is TI v6.2.5. All the libraries and includes files have been added to the projects
I have been trying to erase and program Sector E in C28x Flash block with some data (lets say 4 16 bits values to 4 locations).
- The flash pump is gained
- Flash APIs is initialized
- Flash bank is set Active
- Flash is erased (sector E), FSM ready is checked and FMC data cache is flushed
- Flash is programmed (sector E), FSM ready is checked, read FSM status and FMC data cache is flushed.
- All CPU interrupts are disabled during erase and program.
- EALLOW and EDIS is also looked after.
This Flash related code is written in a function and called from main(). All the system initialization, flash intialization, PLL etc are done properly. All the flash user function and library have been made to run from RAM.
My question is that if run the code, the flash API does not write any value to the sector E and neither any of the Flash API function return errors. But if i call this function another time (same function called twice one after the other in main), then i see value written to the sector E, the second time that function is executed.
I am unable to find why it does not program the flash with that data the first time?
Any quick help in that will be appreciated.