Hi,
I'm trying to implement bootloader for the TMS570LS0332 using example provided in the spna185 SafetyMCU_Bootloader application software using IAR compiler.
Having a problem with the Fapi_BlockErase() function, I have written a test code as follows:
Fapi_BlockErase(0, 0x06000, 0x02000); // Block #0, Sector #3
Fapi_BlockErase(0, 0x08000, 0x02000);
Fapi_BlockErase(0, 0x0A000, 0x02000);
Fapi_BlockErase(0, 0x0C000, 0x02000);
Fapi_BlockErase(0, 0x0E000, 0x02000); // Block #0,Sector #7
Fapi_BlockErase(0, 0x10000, 0x02000); // Block #0,Sector #8
Fapi_BlockErase(0, 0x12000, 0x02000);
Fapi_BlockErase(0, 0x14000, 0x02000);
Fapi_BlockErase(0, 0x16000, 0x02000);
Fapi_BlockErase(0, 0x18000, 0x08000); // Block #0,Sector #12
Fapi_BlockErase(1, 0x20000, 0x20000); // Block #1,Sector #13
Fapi_BlockErase() function erases all of the lower sectors 3 thru7 (skipping sectors 0 thru 2 that are reserved for the bootloader itself), but it cannot erase any of the remaining sectors above sector 7.
After execution of the Fapi_BlockErase() function for any of the sectors from 8 to 13, program loops forever at while(FAPI_GET_FSM_STATUS != Fapi_Status_Success) after issuing Fapi_issueAsyncCommandWithAddress(),because FAPI_GET_FSM_STATUS returns 0x11 instead of 0x00 what means Fapi_Status_Success.
I was trying to link-in tree F021_API_CortexR4_BE libraries including the latest v2.01.01 with the same results.
Please advice.
Best regards,
Marek