I'm currently working on storing some data into flash on the K60D without FlexNVM, and I was hoping to get a clarification of the documentation for the FLASH1_Erase parameter. The documentation in Processor Expert 10.4 states:
- Size:LDD_FLASH_TDataSize - Size of the flash memory area (in bytes) to be erased. The flash memory is erased by the erase sectors. The first erased sector is a sector the address specified by the input parameter Address belongs to. The last erased sector is a sector the address calculated like an addition of the address specified by the input parameter Address and the size specified by the input parameter Size belongs to.
Breaking down into code, I notice that it will attempt to re-issue a sector erase if the size is greater than 4. In otherwords, If I made the following call:
FLASH1_Erase(FLASH1_DeviceDriver, SOME_ADDRESS, BLOCK1_ERASABLE_UNIT_SIZE);
On my setup, I then get a read collision error/read while write error (RWW) which confuses me as the code calling the erase is definitely safe and called with interrupts disabled. Any help would be greatly appreciated.