Hi,
I have questions related to the Hercules mcu TMS570LS313 running with OS FreeRTOS and LWIP TCP/IP Stack provided from TI.
I try to write data (30Kbytes all equal 0x22) to the Flash Bank 1 using the F021 Flash API. This work fine when I Enter a critical Section (disable all interrups) while the FSMStatus is busy:
...
oReturnCheck = Fapi_issueProgrammingCommand(pDest, pSrc, 1, 0, 0, Fapi_DataOnly);
taskENTER_CRITICAL(); // disable all interrups
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy){};
taskEXIT_CRITICAL(); // enable interrups
oReturnCheck = Fapi_getFsmStatus();
...
When I run the same code without disabling the interrups, the write to the flash go wrong. I.e., there are 1 or 2 Bytes in the flash with the value 0x00 instead of 0x22.
My Quetion:
Is it necessary to disable all the interrups while writing to the flash?
OR there is another possibility to manage this?
Regards