Part Number: F28M35H52C
Hello, i am using the driverlib and flashapi to develop a compact driver for the flash,
my program is executed from flash, however the entire driver is executed from ram (including flashapi and necessary flash functions)
the problem is that when I call FlashGainPump it works the first time, and then i call the erase sector function from the Fapi lib and it returns success
at the end of the function i call the FlashLeavePump function
after the sector is erased i try to program it with 128 bit program (ecc auto generated), and i call FlashGainPump however the field SEM is stuck on 0x2 from the previous call, therefore
the while loop:
while(HWREG(MTOCIPC_BASE + IPC_O_MPUMPREQUEST) != 0) { }
runs forever, even though FlashLeavePump should have reset it to zero, when i forcefully attempt to modify it (using the relevant key and sem value) from the debugger it works and the value resets.
since my C28 is not booted at all at the moment i figured i'll try to program the flash without gaining the semaphore, the program returned success but the fsm status register was all '1's and the addresses were not programmed so there was probably an error of some sort.
my initialization:
1.FlashInit with the appropriate system clock and wait states,
2.DCSM Unlock on both zones (even though the keys are all FFs)
3. Fapi_InitializeAPI
4. Fapi_setupBankSectorEnable
5.Fapi_setupEepromSectorEnable
6. Fapi_setActiveFlashBank(Fapi_FlashBank0);
Note that MRALLOW and MDIS encapsulates every function in the driver.
map file shows that every one of the driver functions + my high level functions are mapped to RAM (debug disassembly shows RAM addresses)
as said C28 is not booted.
Thanks.