Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Upgrade SDK11 to SDK15 - MBR

Hi, I'm using this post to upgrade from SDK 11.0 to SDK 15.3.

All goes well, until I uploaded an application: then I get a hardfault somewhere at fds_init().

I found that I can "fix" this by copying the SDK 15.3 MBR to the updated device. However, there is no way to update the MBR via DFU.

Any suggestions as to what can cause this, and how to solve it?

Using: nRF52832, SDK 15.3, s132-6.1.1

Parents
  • Hi Bart, 

    I assume the hardfault inside fds_init() is with the application, not related to the bootloader code. 

    I don't think the MBR would affect the fds, however it could be the issue with where the fds/fstorage flash area should be located. The fstorage flash area usually located right under the bootloader as calculated with flash_end_addr(). 

    You may want to step into the code and check what flash_end_addr() return. 

    Also if the area that the fstorage located has some data from the previous application that doesn't fit with fds it will throw some error, most likely FDS_ERR_NO_PAGES, you may want to double check. 

  • Seems you're at the right track: m_fs.end_addr = 0, so m_fs.start_addr becomes a very large number.

    The reason end_addr is 0, is because BOOTLOADER_ADDRESS = 0

    Which is 0, because the old MBR ends with all 00s instead of FFs, so MBR_BOOTLOADER_ADDR = 0

    Is that correct?

  • I think something went wrong when i uploaded the SDK11 softdevice, if I use nrfjprog, the end of the page are all FF instead of 00, so then my whole problem is gone.

    Thanks for the help!

Reply Children
Related