Hi, I'm working with flash, I've started with the example code from flash_storage, as I will need to use flash while using a SoftDevice.
I use NRF52 Dongle and SDK17.0.2 + S340.
I have fundamental problems I think, understanding how this is supposed to work.
1) Once I call nrf5_flash_end_addr_get and see the end address and the bootloader address = 0xFFFFFFFF. does it mean the last page is NRF_FICR->CODEPAGESIZE * (NRF_FICR->CODESIZE - 1)?
2) does this mean, than if NRF_FICR->CODESIZE is 256 then I can use all of them? say I can write 1 byt to address NRF_FICR->CODEPAGESIZE * (NRF_FICR->CODESIZE - 1) and 1 byte to address NRF_FICR->CODEPAGESIZE * (NRF_FICR->CODESIZE - 256)? In other words, is all flash area available to me and can write to address 0?
3) Do I always have to do nrf_fstorage_erase before nrf_fstorage_write and when don't I? Why don't you do nrf_fstorage_erase in the flash_storage example?
4) On my device When try to erase the page NRF_FICR->CODEPAGESIZE * (NRF_FICR->CODESIZE - 1) my program freezes. Before, like 2 days ago, it worked. What could have happened? Erasing the device doesn't help. The same code works on the address from the example: 0x3e000
I'm lost, please help. Thanks