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

nrf52840 BLE Mesh Bootloader with or without external Flash?

Reagrding the BLE Mesh Bootloader, is an external flash necessary? And if yes, are there any recommendations?

Like I saw in the Mesh User Guide the nRF can store the received application over Mesh in the area after the active application, but is the same size of free flash for the new application needed or will the transfer be in parts? I think there has to be a dual page bootloader to ensure a rollback in case of a broken transfer or application, am I right?

-> if the nRF has 1M flash and the application has 400kb, we need 800kb for the apllication + bootloader.

Regards, Dominik

  • Hi,

    You won't need an external flash as long there is enough memory.

    Yes, you are right. You will need to have the same size of free flash for the new application. 

    Under Transfer banking in the document you are referring to:

    Devices receiving background transfers have to store the incoming transfer in a bank in an unused area of flash, to avoid overwriting themselves while they're running. While in progress, the DFU transfer data gets stored in the bank, and once finished, the application can tell the bootloader to copy the bank to the application area, effectively finalizing the update.

    Note that the bank must be placed in a flash area that is both large enough to fit the entire incoming application during the transfer, and that doesn't overlap with the new application or old application. To ensure maximum space for the incoming transfer, both as a bank and as a finished application, it's generally recommended to place the start of the bank right in the middle of the application section of the device. If the transfer is not able to fit both as a bank or as an application after the transfer is finalized, the device must fall back to the bootloader, and perform the transfer in the bootloader mode.

  • I will implement an external SPI Flash beacuse my code is too big and doesn't fit in 512kb - Bootloader size, and I like to have the 2-Image version in case of a corrupt file or power-loss...

    SPI Flash datasheet

Related