Hi everyone, I have the Arduino Nano 33 BLE Sense, which mounts a nRF 52840 microcontroller.
Give that it has a generous amount of flash memory (definitely more than what my program needs), I w as wondering if there was a way to write data directly into it, instead of having to rely on external SPI flash (the currently are no libraries usable with the nRF 52840). Any ideas?
in my ArduinoOTA library I have code which works for nRF51. it compiles for nRF52, but I it doesn't work for 33 BLE. I work on it.
a flash to flash copy function
static void copyFlashAndReset(int dest, int src, int length, int pageSize)
{
uint32_t* d = (uint32_t*)dest;
uint32_t* s = (uint32_t*)src;
eraseFlash(dest, length, pageSize);
for (int i = 0; i < length; i += 4) {
*d++ = *s++;
waitForReady();
}
NVIC_SystemReset();
}
}
warning. you risk erasing of the bootloader