Part Number: RM48L952
Hello team,
I cannot find in the forum an answer to my problem so there it is,
In my RM48 I have the bootloader software and the application software in the same bank 0 so that I can disable the bank 1 to save power. The bootloader shall update the application and so the flash API must run from RAM. I follow the TI examples which uses the _copyAPI2RAM_() function to do that. Another point is that the application image file must have the ECC data, which requires the modification of the linker file accordingly, to avoid problems when running the application. The current application image file type is intel hex, rather than binary due to the file size (gigabytes).
In my first approach I erased the whole application area before programming and everything worked as expected. However, to update a small part of the application I cannot use this approach because the Fapi erase function cannot erase less than a sector (128K). So, I tried to program only without erase and in here I found a problem that I cannot fix or understand.
/* Program bytes to Flash and wait until ready */
status = Fapi_issueProgrammingCommand((uint32_t*)dst, (uint8_t *)src, WIDTH_MAIN_BANK, 0, 0, Fapi_AutoEccGeneration);
if(status != Fapi_Status_Success)
{
return status;
}
while(FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy);
status = (Fapi_StatusType)FAPI_GET_FSM_STATUS;
if(status != Fapi_Status_Success)
{
return Fapi_Error_Fail;
}
The status variable after get the FAPI_GET_FSM_STATUS has the vale 0x30. From the Flash API reference guide the error is INVDAT.
I do not know where I can find information to fix the problem or at least understand. I must erase first before programming?