This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Overcoming Device Firmware Upgrade Size Limitation

Hi,

We have implemented FOTA on an nRF52dk (nRF52832) using nRF Connect SDK v1.8.0. That works fine. Now we have encountered a problem that we believe is due to a limitation on the image size to be uploaded to the flash. As we are trying to circumvent this issue, I have a few related queries related to possible solutions:

1. What's the maximum upgrade image size that can be upgraded via FOTA?

2. We believe that most of the upgrade image code is the softdevice library which is not changing. Is it possible to use FOTA to upgrade only the application code?

3. The previous DFU module will upgrade code blocks separately (bootloader, softdevice, and app). Is there a way to use the previous DFU module on the current zephyr implementation like v1.8.0?

4. I have seen that another option is to use external flash memory. Is that viable and reliable to implement? Are there any code samples for that?

Many thanks

Parents
  • Hi Armand

    1. What's the maximum upgrade image size that can be upgraded via FOTA?

    This depends on the size of your primary and secondary flash partition. Normally you need room for both the mcuboot bootloader itself, two code partitions (the primary and secondary one, also called slot 0 and slot 1), and any pages needed for data storage. 

    2. We believe that most of the upgrade image code is the softdevice library which is not changing. Is it possible to use FOTA to upgrade only the application code?

    Unfortunately not. Contrary to the older nRF5 SDK architecture it is no longer possible to update the Bluetooth stack and the application separately. 

    3. The previous DFU module will upgrade code blocks separately (bootloader, softdevice, and app). Is there a way to use the previous DFU module on the current zephyr implementation like v1.8.0?

    No, we don't have any examples for this. All the bootloader examples in the nRF Connect SDK are based on the mcuboot architecture. 

    4. I have seen that another option is to use external flash memory. Is that viable and reliable to implement? Are there any code samples for that?

    Yes, this is possible. Some of the development kits, including the nRF52840DK and the nRF52833DK, have an external flash device on the board, and for these devices it is relatively simple to declare the secondary image in the external flash memory. 

    Best regards
    Torbjørn

  • 1. What's the maximum application code for a nRF52832 512kb chip?

    2. When using the multirole softedevice. Does the softdevice flash size accordingly to the enabled features or is it a fix size= If fix, what's the flash size?

    Thanks

  • Ay help on the above questions? Thanks!

  • Hi Armand

    Sorry for the slow response, I was out in travel all last week.

    Ignacio said:
    1. What's the maximum application code for a nRF52832 512kb chip?

    When using mcuboot the application space is approximately (512kB - mcuboot size - settings page) / 2. 

    With default configurations this comes out to 232kB. 

    You can check this yourself by enabling mcuboot in your project, building it, and checking the partitions.yml file in the build folder.

    Ignacio said:
    2. When using the multirole softedevice. Does the softdevice flash size accordingly to the enabled features or is it a fix size= If fix, what's the flash size?

    The SoftDevice controller is a fixed size, but the Bluetooth host will change in size depending on the features you use. 

    I can't find the size anywhere, but I have asked the developers if this is available. 

    You can also check the flash usage in your project by running the following command in the build folder:

    west build -t rom_report

    This is the most accurate way of checking how much flash is used by the various modules in your project. 

    Best regards
    Torbjørn

Reply
  • Hi Armand

    Sorry for the slow response, I was out in travel all last week.

    Ignacio said:
    1. What's the maximum application code for a nRF52832 512kb chip?

    When using mcuboot the application space is approximately (512kB - mcuboot size - settings page) / 2. 

    With default configurations this comes out to 232kB. 

    You can check this yourself by enabling mcuboot in your project, building it, and checking the partitions.yml file in the build folder.

    Ignacio said:
    2. When using the multirole softedevice. Does the softdevice flash size accordingly to the enabled features or is it a fix size= If fix, what's the flash size?

    The SoftDevice controller is a fixed size, but the Bluetooth host will change in size depending on the features you use. 

    I can't find the size anywhere, but I have asked the developers if this is available. 

    You can also check the flash usage in your project by running the following command in the build folder:

    west build -t rom_report

    This is the most accurate way of checking how much flash is used by the various modules in your project. 

    Best regards
    Torbjørn

Children
No Data
Related