This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Writing to Flash on specific address on 52811

Hi, 

I'm trying to write data to flash as shown in example under nrf5_sdk/examples/peripheral/flash_fstorage, with identical steps. 

However every time I call the nrf_fstorage_write, example nrf_fstorage_write(&fstorage, 0x1C000, &m_data, sizeof(m_data), NULL); the control stops and 

in disassembly it shows as <_reserved_flash_start>.

My FLASH_START=0x19000;FLASH_SIZE=0x6000; in my project.

Are there any specific addresses to which this address writes? Or on NRF52811 are there any specific pages with special permissions?

Thanks,

Mukunda

  • Your math seems off: 0x19000 + 0x6000 = 0x1F000. Normally, the storage modules check for stuff like that and will refuse to write in the application flash area (IIRC - did not verify source code).

    Also, fstorage has 2 modi: With softdevice enabled and without. We don't know which one is active in your project.

    • Did nrf_fstorage_write() return any error or is it a hard fault? If an error was returned, what error code do you see?
    • Same question as : Are you using the SoftDevice in your application?
    • Could you share your application, then I can try to reproduce your error

    Best regards,

    Simon