Hi,
because of a software evolution I unintentionally move flash programming FAPI functions from RAM to FLASH, by removing a line in linker script that locates the API in RAM:
.TI.ramfunc: { -l F021_API_F2837xD_FPU32.lib }
LOAD = FLASHC, PAGE = 0
RUN = RAMD0_1, PAGE = 0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
table(BINIT)
I only left following:
.TI.ramfunc: LOAD = FLASHI
RUN = RAMD0_1,
table(BINIT)
Althrough the FAPI is in flash I saw that flash programming was performed successfully.
Here are the conditions:
- data is programmed in sector C,
- programmed flash locations are blank (only FFs),
- Main FAPI code is located in another flash sector (e.g. sector G)
- three minor functions are still in RAM (i.e.: Fapi_setupEepromSectorEnable, Fapi_setupBankSectorEnable, Fapi_serviceWathcdogTimer that are in Fapi_UserDefinedFunctions.c).
- my loop that waits for end of programming is in RAM: while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
- the program does not execute erase command only program-with-auto-ecc
- the interrupts are disabled
- CPU is secured by DCSM (all flash sectors, RAMD, RAMLS are secured)
I would like to ask:
- if it will work all the time with my conditions, or there is a risk that sometimes goes wrong?
- if it goes wrong, what errors can be expected:
- NMI,
- incorrect data programmed in flash
- or data programmed in another locations (or even sectors)?
I prefer not to change my code if it works, so I am looking for confirmation of that.
Regards,
Piotr Romaniuk