Hello all
Im having hard time understanding all the passwords and locks of memory at this mcu
my program needs to preform erase and write to flash while running from flash (different sectors and running from ram)
when i load the program with the emulator (connected to target or disconnected after loading) the operation of cleaning and writing works !!!
but
after restarting (power down -> power up) the program start OK but the cleaning and writing doesn't work !!!
I believe this something to do with the CSM or some other memory lock.
can any one please put a short initialization sequence of unlocking all the memory, thanks.
one more thing in the FLASH API 021 the sequence of erasing sector is:
oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS,HCLK_FREQUENCY);
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,
(uint32 *) 0);
while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
for some (or same) reason the "Fapi_setActiveFlashBank(Fapi_FlashBank0)" restarts the mcu only after power up.
thanks
danny