developer.nordicsemi.com/.../a00935.html
The doc seems to provide only write functions. And, the flashwrite example doesn't show how to read from flash even after device rebooted. How can I read something later that has been stored in flash?
developer.nordicsemi.com/.../a00935.html
The doc seems to provide only write functions. And, the flashwrite example doesn't show how to read from flash even after device rebooted. How can I read something later that has been stored in flash?
You do not need NVMC hardware or API to read the flash memory. Just read it like any other memory.
for example, if you want to read 2 bytes of flash located at 0x21000 then the below code will do it
#define STORAGE_ADR 0x21000
uint16_t value = *(uint16_t *)ptr;
or If you want to compare it with some thing then better would be to do like below
if(*((uint16_t *)STORAGE_ADR) == 0xff)
{
do something;
}
Thanks for coming back and updating this thread.
Thanks for coming back and updating this thread.