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

nRF51822: Zephyr OS vs SoftDevice

Hello, guys.

We have nRF51822 SoC with 256KB of Flash and 32KB of RAM memories at our disposal. For our application, we would need to use the BLE stack + over-the-air DFU.

What would be less demanding from the memory point of view:

  1. Using SDK and SoftDevice (S130, S120)  + Nordic's secure DFU bootloader
  2. Using Zephyr OS with built-in BLE stack +  MCU Boot

Can you point me to some places where I can read about how the nRF memory is partitioned and where the Zephyr OS, SoftDevice, bootloaders are stored?

Thanks in advance for your time and efforts.

Cheers,

Bojan.

Parents Reply
  • Hey, .

    Can we suppose that SoftDevice S130 v2.0.1 and DFU bootloader are stable enough so that there will be no need to update them in the future (we don't need anything exotic from the BLE)?

    That way, there will be no need to update SoftDevice and bootoloader. We would only need to update our application from time to time by using Dual-bank Updates.

    Other than that, can you tell me what amount of memory is taken by SoftDevice S130 and DFU bootloader. This would help me a lot visualize the space we have for the application.

    Cheers Beers,

    Bojan.

Children
  • Hi,

    • SDK + SoftDevice + Single-Bank Updates
    • Zephyr OS + MCUBoot

    The first option, since there is no single-bank OTA DFU option with Zephyr/MCUBoot.

    Can we suppose that SoftDevice S130 v2.0.1 and DFU bootloader are stable enough so that there will be no need to update them in the future (we don't need anything exotic from the BLE)?

    No guarantees, but likely yes, there have not been any new updates to S130 since 2016.

    For a single bank application update, I believe you would be able to fit a 120kB application:
    256 kB - 24 kB(Nordic Secure Bootloader) - 4kB(Bootloder settings page) - 108 kB SD(S130) = 120 kB

  • Thanks for the detailed explanation, .

    120kB will be at our disposal for the application. This would mean we can apply a dual-bank DFU update if the app size is less than 60kB or only a single-bank update if the app size is more than 60kB in size?

    Regards!

  • bojan said:
    120kB will be at our disposal for the application. This would mean we can apply a dual-bank DFU update if the app size is less than 60kB or only a single-bank update if the app size is more than 60kB in size?

    Yes, correct, ref "The DFU bootloader checks if a dual-bank update is possible. Only if it is not (because the free memory is not sufficient), it will revert to a single-bank update." ref, mentioned at the page I linked to. https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_bootloader_dfu_banks.html

    PS: I didn't account for "App data" in my calculation, so you would need to take that into account as well. I.e. check how much space you reserve for e.g. storing bonding information in your application.

  • Yeah, that's clear. We have 120kB of flash space for Application + App Data at our disposal.

    thanks for your assistance. You've been of great help! I will close this ticket now.

Related