- The initialized struct "nrf_fstorage_t" for use in nrf_fstorage_init( ) temporarily includes the application and bootloader (just for this test)
- start address is 0x2'600
- end address is 0xF'DFFF.
- Bootloader test page address (last page of Bootloader partition) 0xF'D000 - 0xF'DFFF
- Bootloader layer partition 0xF'8000 - 0xF'DFFF
- Application layer partition 0x2'600 - 0xF'7FFF
The bootloader sets the write protection, but I need to test the write protection (WRP) from the application layer, by writing to the last page in the bootloader with WRP turned off, then writing to it with WRP turned on.
I'm using nrf_fstorage_write( ) API (and nrf_fstorage_read( ) and nrf_fstorage_erase( ) as well), it encounters a hard fault when attempting to erase or write to the last page of the bootloader (Bootloader test page ) from the application layer with WRP turned OFF. What would cause this?
Is there a better API set for erasing, writing, reading flash memory across partitions like this? Perhaps a better way to test the WRP from the application layer?