FLASH memory footprint with Zephyr too large for 52810/20?

Considering nRF52810 for a new project with a dead-simple application. Background: 

- application is just data-pipe from mobile app to UART, both ways. No encryption/decryption needed. 
- we are told to use Zephyr since nRF5 is not recommended for new designs
- require DFU/FOTA from mobile app
- Production volumes are high enough that we need to optimize heavily for device cost.

The lowest FLASH footprint we manage to get is around 130 kB with the above data-pipe application (minimal config). Adding boot loader and a second binary for DFU/FOTA leave us well above 256 kB. This means the smallest device we can use is the 52832-AA (512 kB variant) which is too expensive. 

What can we do to reduce memory footprint? Can we go for nRF5 anyways - what would the downsides be? Could adding an external FLASH for double-banking the FOTA image be an option - is that supported in Zephyr? 

It feels like I am missing something obvious - or is there really a mis-match between your low-cost devices and Zephyr? 

Many thanks! 

  • Hi Johannes

    I think it is unfair to say that Zephyr is a bad fit for low cost devices. I would say it's more a case of low cost devices being a bad fit if you need to do DFU/FOTA, as you can't really do DFU without significant flash overhead (double the flash ideally). 

    With the nRF5 SDK I don't think you will get much lower than 130kB of flash usage, but it is true that the nRF5 DFU architecture allows you to do application update only, and supports single bank update, so that you can get limited DFU functionality (no SoftDevice update for instance) even on the nRF52810. 

    In other words, if being able to update the application over DFU is critical the nRF5 SDK might be a better choice for this application, as long as you can live with the limitation of not being able to update the SoftDevice. 

    - we are told to use Zephyr since nRF5 is not recommended for new designs

    For the nRF52 series you are free to choose. The nRF5 SDK/SoftDevice architecture will not get any significant new features, but as long as you are fine with the current feature set, and the Bluetooth SIG allows you to qualify new Bluetooth designs based on the Bluetooth 5.1 specification, there is nothing wrong with using the nRF5 SDK. 

    Could adding an external FLASH for double-banking the FOTA image be an option - is that supported in Zephyr? 

    Yes, this is supported in Zephyr. Obviously this will also have some cost implications, and the nRF52810 has a limited set of serial peripherals, so it's important to make sure you have a free SPI bus. 

    Best regards
    Torbjørn

Related