I have some code that successfully writes data into internal Flash sector-H and then erases sector-G, using the ROM-resident API, through "2806x_BootROM_API_TABLE_Symbols_fpu32.lib". This works both on our own hardware and on a TI ControlCard.
In anticipation of switching on the CSM at some point, I understand that I need to change to use a RAM-resident API so have installed the "Flash2806x_API_fpu32_V100.lib" ControlSuite patch provided by David Atler, 21-Mar-2014 in thread http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/329360.aspx.
The library is loaded into 0-wait secure L4 SARAM. On both my hardware platforms, Flash_Program still works OK but Flash_Erase now returns '24' (STATUS_FAIL_PRECOMPACT).
I can Erase and reprogram through the X100 debugger so there does not seem to be a 'real' problem with the Flash being over-erased... multiple calls to FlashDeprecover() make no difference. Timings seem correct... Flash_ToggleTest gives an accurate 10KHz output. Both ROM and RAM Flash_APIVersionHex return '100'.
I have reverted to the ROM-resident API and erase now works with no errors.
Any ideas for what might be causing my RAM-resident Flash_Erase to fail? Thank you, Dave.