Hi,
I am working on ble_app_template.
I am trying to save a value in the flash memory of nRF52840.
I am using the following 2 functions to write/read in flash memory but getting this error.
SOFTDEVICE: INVALID MEMORY ACCESS
I am using this memory as a starting memory to save values.(As mentioned in this link: Flash - Non-volatile memory)
uint32_t f_addr = 0x4001E001;
Any solution for this error?
Thanks
uint32_t f_addr = 0x4001E001; // Create a pointer to that address uint32_t * p_addr = &f_addr; uint32_t val = 123456; void write_T() { nrf_nvmc_write_word(f_addr, val); } void read_T() { NRF_LOG_INFO("The Data read from flash is: %d", *(p_addr)); }