ArduinoOTA icon indicating copy to clipboard operation
ArduinoOTA copied to clipboard

Grand Central M4 (SAMD51) writing to flash corrupted

Open hydrofoor opened this issue 2 years ago • 0 comments

It appears the eraseFlash() function for SAMD51 is not correct. When trying to flash sketches to an Adafruit Grand Cental M4 Express board (through WifiEspAt) the data written to flash was corrupted. After some searching I found in the SAM D5x datasheet 'The NVM <...> is organized into blocks, where each block contains sixteen pages' and as the memory is to be erased in blocks before writing the the attached patch was applied. Then upload and flash was successful.

InternalStorage.cpp.patch

hydrofoor avatar May 01 '23 13:05 hydrofoor