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

Maximum possible application size for DFU on the nRF52810

Hi,

I'm trying to add the secure BLE bootloader(non debug, modified to run with S113, SDK 17.0.2) on a custom board with a nRF52810. I tried to DFU my main application(APP only, application uses S113) but I noticed that I got an insufficient resources error. My application size if around 45k. This post mentions that the maximum application size can be 60 kB and my app is well within that. 

Can you please provide the following details:

1. Maximum possible application size which can be used with the nRF52810

2. Maximum DFU app only package size(if it is significantly different from the 1st answer)

Also, does the bootloader program the new app directly to the Flash or is it first loaded in the RAM. Asking this because I'm curious if the RAM is the bottleneck here.

Thanks

Gowtham

  • Hi Gowtham,

    The limited flash space on the nRF52810 means that it is not possible to update the SoftDevice over OTA DFU, as that has to be done dual bank and there is not enough space in flash for that. You can however update the application over DFU, as that can be done single bank. In that case, the new application will be copied directly in place, and the maximum application size is the space between the end of the SoftDevice and start of the bootloader, less any flash pages used to store application data immediately below the bootloader. See Memory layout.

    With S113 version 7.2.0 the SoftDevice size is 112 kB, so the application starts at address 0x1C000. The secure BLE bootloader project typically is 24 kB, and you also need 4 kB for bootloader settings. You can skip the MBR parameter page as you will not do bootloader and/or SoftDevice update.This leaves you with 192 kB - 24 kB - 4 kB - 112 kB  = 52 kB if you do not have any persistent application data. If you do, then it will be less.

    Also note that unless you have changed the bootloader project, the default configuration reserves 3 pages (12 kB) for application data (such as bonding information). If so, you will not be able to fit your app and a bootloader. In the bootloader  this is configured by the NRF_DFU_APP_DATA_AREA_SIZE in it's sdk_config.h file. This should correspond to the configuration of your application, and this matches the default configuration of most applications which use 3 pages for FDS.

    Br,

    Einar

  • Hi Einar,

    Thanks for the quick reply and clearing this up. I was able to reduce the size of my application by disabling the logging module and then was able to DFU it. 

    I would like to clarify one more thing. Are the 3 reserved pages used for anything vital to BLE operation? I am not using bonding in my application. I would like to use 1 page for storing some application data in real time but would like to use only fstorage and not FDS.

    Thank

    Gowtham

  • Hi Gowtham,

    The BLE SDK examples only use FDS for storing bonding information in the peer manager. If you do not use bonding or pairin and thus do not use the peer manger, then there is no need to include FDS for the sake of any BLE functionality.

    (If you use one page for persistent storage using storage then you should make sure to use the page immediately below the bootloader for that, and set NRF_DFU_APP_DATA_AREA_SIZE in the bootloader's sdk_config.h accordingly to only reserve one page.)

    Br,

    Einar

  • I'm also trying to get some more space, and I only need DFU update for the application and not the bootloader/SD.

    How do I go about disabling the MBR parameter page?

Related