Hi Devzone:
It's really hard to piece together all the informations so I guess I will seek help here.
I need help choosing the location of one page flash storage for my project.
I'm working on nRF52840, I need one page of persistent flash storage for application use, referencing fstorage example.
And this project has a bootloader through USB for DFU firmware update, the code resides at
FLASH_START=0xf4000
FLASH_SIZE=0xa000
So is it safe to take 0xf3000~0xf4000 as my flash storage and then set the application code boundary from 0x01000~0xf2000 (leaving first page as MBR)?
The reason I ask this is I vaguely remember reading somewhere says the bootloader use some little space somewhere (?) to store some weird settings/temporary space(?) and all that weird stuff, so I am quite uncertain if I can claim this one page of space immediately below BL for my own use without causing issues.
Below is my 1MB of flash layout, Could you verify if it's OK?
0xFE000
BL code
0xF4000
One page of flash storage for my application
0xF3000
Code + Softdevice(haven't added in, maybe in the future)
0x01000
MBR
Also on the page that describe fstorage example,
https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/fstorage_example.html
there's a picture showing the memory map
How come in this image, the bootloader stopped at 0x80000 which is half of the 1MB flash?
In the example secure bootloader project as I mentioned earlier, if you open up the section placement Macros, the code address is
FLASH_START=0xf4000
FLASH_SIZE=0xa000
It's not what's shown in the image above! What's the matter here?
And what is that UCIR.NRFFW[0] anyway? I checked the spec it's a 32bit value! It's not even an address.
Thanks!