Hi,
I've got an Ethernet bootloader based on TIDM-ETHERNET_BOOTLOADER that can download an application that then runs with Flash ECC enabled.
This all works fine if the bootloader does not enable Flash ECC. The bootloader correctly programs the application into Flash, the application can then start running and enables Flash ECC at startup.
I would like to have the bootloader also run with ECC enabled, but with Flash ECC enabled the bootloader fails the erase check and program verify (which I understand).
I have tried disabling Flash ECC while doing the erase check, but it still fails because one memory location reads as 0xFFFBFFFF (my application is programmed starting at 0x020000, location 0x020004 reads 0xFFFBFFFF, but all the other words appear to be 0xFFFFFFFF as expected when Flash ECC is disabled).
Here's the code I am using to disable the Flash ECC while doing the erase check -
// Disable Flash ECC while doing the erase check
_coreDisableFlashEcc_();
flashWREG->FEDACCTRL1 = 0x00000005U;
status = Fapi_doBlankCheck((uint32_t *)Flash_Start_Address, (Size_In_Bytes >> 3), &erase_status);
if (status != Fapi_Status_Success)
{
DebugPrintf("Erase failed!\r\n");
}
// Re-enable Flash ECC
flashWREG->FEDACCTRL1 = 0x000A060AU;
_coreEnableFlashEcc_();
From what I've read this should work. Any ideas on why it doesn't?
regards,
Charles