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

Mesh SDK - NRF52840 flash page issue

I am setting up a programming script for our devices.  
Memory layout is as follows:

Address Size
MBR+SoftDevice 0x00000 0x26000
Application 0x26000 0x66000
DFU Swap Space 0x8C000 0x66000
Persistent App Data 0xF2000 0x2000
Nordic Mesh Info 0xF4000 0x4000
Nordic Bootloader 0xF8000 0x6000
Bootloader Settings 0xFE000 0x2000

Programming the following items: SD, bootloader, our application, and device page produced by device_page_generator... The device functions as desired.
The issue is when I attempt to add the persistent app data pages, starting at 0xF2000.
It seems that something is using that page (and F3000):

J-Link>mem8 F2000 1024

000F2000 = 08 04 10 10 01 00 FF FF FF FF FF FF FF FF FF FF
...
000F2FF0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000F3000 = 08 04 10 10 01 00 FF FF FF FF FF FF FF FF FF FF

I thought I had properly accounted for the flash pages required by mesh.  
Calling the following functions shows that the DSM starts where I expect:
dsm_flash_area_get() = 0xF4000
net_state_flash_area_get() =  0xF5000
flash_manager_recovery_page_get() = 0xF6000

What have I missed?  What is using the flash pages at 0xF2000 and 0xF3000

Thanks.

Mesh SDK v3.1.0
nRF5 SDK v15.2.0

Parents Reply Children
  • Thanks, i was referencing a previous forum post, which is why i thought MBR was after the bootloader:
    "Yes the bootloader uses the space at the end for MBR and bootloader setting."

    Looking at the bootloader code, I see that it sets MBR in the UICR to the page before.
    The bootloader is using 2 pages at the end for info and bank info.

    You previously mentioned i was looking at outdated information.  Was that for the flash_manager.md?  
    Is the following equation outdated:

    x = 2 + ACCESS_FLASH_PAGE_COUNT + DSM_FLASH_PAGE_COUNT

    Where can i find the current documentation for configuring mesh flash usage?
    I understand that the mesh components are using 5 pages, starting at 0xF2000, but I would like to understand how my configuration is driving that.

    Thanks!

Related