Tool/software:
Hi,
I have a program where I want to write a 32-byte buffer to flash bank 7 starting at 0xF0200000. I am initializing and erasing the bank, then writing 4 consecutive 8-byte buffers with no errors from Fapi commands:
- Fapi_setActiveFlashBank(Fapi_FlashBank7) = Fapi_Status_Success
- Fapi_enableEepromBankSectors(0xFFFF, 0x0000) = Fapi_Status_Success
- Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, 0xF0200000) = Fapi_Status_Success
- Fapi_issueProgrammingCommand((uint32_t *)0xF0200000, srcAddr, 8, 0, 0, Fapi_AutoEccGeneration) returns Fapi_Status_Success. I increment the dst and srcAddr addresses 8 bytes and repeat another 3 times to flash the entire 32-byte buffer.
But then when my application tries to read what was written to flash memory using memcpy, random bytes are sticky. Here is an example of trying to write 32 consecutive 0s to bank 7, starting at 0xF0200000, then reading them back using memcpy:
Everything should be 0, but addresses 0xF0200000 + 4, 8, 11, & 16 are not 0. Rerunning the erase and write and/or rebooting the board and rerunning show the same addresses as sticky. The only solution I have found using Fapi_DataOnly instead of Fapi_AutoEccGeneration in the Fapi_issueProgrammingCommand() calls, but I still want to use ECC in these writes/reads.
How can I fix this? I want a seamless way to write configuration data to bank 7, then read it as a data struct on future startups.