nRF52805 Central not supported?

Hello,

We are evaluating MCU's for a low cost Central device that is extremely cost constrained. The nRF52805 and the nRF52810 both have the same RAM (24 KB) and FLASH (192 KB) size. Yet, the nRF52805 does not support the Central role but the nRF52810 does. With this in mind, I have a few questions:

1. Why does the nRF52805 not support the Central role even though the nRF52810 does?

I understand that the nRF52805 only supports SoftDevice S112 and S113, but what is stopping you from running S132 on the nRF52805?

2. If you can't run S132 on the nRF52805, does running nRF Connect SDK provide the use of the Central role on the nRF52805?

3. Do you have any Central role SDK examples running on the nRF52805? (nRF SDK or nRF Connect SDK)

4. If the nRF52805 can't run in Central mode, what is the lowest cost MCU that Nordic provides that supports the Central role?

Thanks,

Derek

Parents
  • Hello Derek,

    I tested compiling and running the central sample from Zephyr and saw these results when building:

    'west build -b nrf52dk/nrf52805'


    FLASH: 122052 B 192 KB 62.08%
    RAM: 23392 B 24 KB 95.18%
    IDT_LIST: 0 GB 32 KB 0.00%

    There is very little RAM remaining for the application. Of course this can be adjusted by changing TX/RX buffer lengths and stack sizes depending on your application requirements.

    The sample, when running on my nRF52-DK, was able to scan devices in the area.

    Thanks,

    Helmut Lord

  • Hello Helmut Lord,

    Thanks for the feedback! So it looks like the nRF52805 can indeed operate as a Central with the nRF Connect SDK.

    Question: Does the example you tested have optimizations for size enabled and nRF logging disabled, and what are the allocated task stack sizes?

    I am not familiar with nRF Connect SDK as all projects I have worked on until now use the old nRF SDK.

    Question: Why is the RAM consumption so high compared to the old nRF SDK?

    For example, when I compile nRF5_SDK_17.1.0_ddde560\examples\ble_central\ble_app_blinky_c\pca10040\s132\arm5_no_packs, with the following changes:

    • nRF logging disabled
    • Project optimization set to Level 3
    • Application stack set to 2048

    I get the following RAM footprint:

    • SoftDevice RAM (From SoftDevice S132 release notes): 7.35 kB
      • 7.35 kB = 5.6 kB + 1.75 kB worst-case stack usage
      • Note: I account for the SoftDevice stack usage here even though I know it is shared with the application stack.
    • Application RAM: 4.59 kB
      • Total RW  Size (RW Data + ZI Data)              4696 (   4.59kB) - Taken from .map file
    • Total = 11.94 kB

    22.84 kB (nRF Connect) vs 11.94 kB (nRF SDK) is quite a large difference.

    I realize nRF Connect SDK uses Zephyr RTOS, but I wasn't expecting this much of a jump.

    Question: Can the nRF52805 operate as Central using the old nRF SDK and SoftDevice S132?

    I ask because if I can get a smaller RAM footprint with the old SDK, the nRF52805 may be feasible.

    Thanks,

    Derek

  • Hi Derek,

    Maybde Helmut can say more later, but I will attempt to answer some of the questions.

    droberson said:
    Question: Why is the RAM consumption so high compared to the old nRF SDK?

    I am not sure what was tested here, but you can read a comparison of memory comsumption an dother parameters under Debunking misconceptions: A technical analysis of nRF5 SDK and nRF Connect SDK. Generally, the default configuration with nRF Connect SDK will be more memory consuming, but there is room for optimization. You can refer to Memory footprint optimization for details on that.

    droberson said:
    Question: Can the nRF52805 operate as Central using the old nRF SDK and SoftDevice S132?

    For testing and proof of conecpt it will probably work, but it is not supported, tester nor qualified. See SDKs and SoftDevices.

    Einar

Reply Children
  • Hey Einar,

    Thanks for the feedback! Sounds like it may work with the old SDK but we are on our own if we try it and run into issues, got it.

     Any feedback on how much the Zephyr example project you compiled can be optimized to reduce RAM footprint (Please see my comments above)?

    Is it possible you could make the following changes and recompile the example you have?

    • nRF logging disabled
    • Project optimization set to Level 3 (Or whatever the highest is in nRF Connect SDK in regard to optimizing for size)
    • Application stack set to 2048 bytes

    Just trying to get a ballpark minimum RAM and flash required for a Zephyr BLE Central device that scans (No connections).

    Thanks,

    Derek

  • Hi Derek,

    It is possible to to change a lot of parameters and if I build the sample same Central sample from nRF Connect SDK 2.7.0 with the configuration changes from here (starting at line 62), I get this memory usage:

    Memory region Used Size Region Size %age Used
    FLASH: 109004 B 192 KB 55.44%
    RAM: 17772 B 24 KB 72.31%
    IDT_LIST: 0 GB 32 KB 0.00%

    Note that this is with a main stack size of 1024 byte (you can also see other stack sizes in the linked config). Also please note that I did not test this config and it is from a very different sample, but it should give a good idea of what you can achieve with proper optimization.

    Einar

  • Hey Einar,

    Thanks for your reply. Do you have a similar prj_minimal.conf example for a Central device and the associated RAM and Flash usage? I imagine a Central example will use less resources since it doesn't have to allocate memory for characteristics, service, etc. Correct me if I am wrong.

    Thanks,

    Derek 

  • Hi Derek,

    The numbers in my previous post is for a central sample, but the stack sizes were adjusted based on the config I linked to. If I run thread analyzer on the sample I ran you can see that there is still some room for optimization:

    RX WQ : STACK: unused 424 usage 600 / 1024 (58 %); CPU: 6 %
    BT TX : STACK: unused 40 usage 600 / 640 (93 %); CPU: 0 %
    sysworkq : STACK: unused 1040 usage 496 / 1536 (32 %); CPU: 1 %
    MPSL Work : STACK: unused 344 usage 296 / 640 (46 %); CPU: 0 %
    idle : STACK: unused 64 usage 64 / 128 (50 %); CPU: 90 %
    ISR0 : STACK: unused 672 usage 352 / 1024 (34 %)

    But this depends on many factors and you normally want some margin, so I think the nubmer from my previous post is sensible (reasonable and not too optimistic).

  • Hey Einar,

    Perhaps I am missing something, but the example you referenced is 'sdk-nrf/samples/bluetooth/peripheral_lbs/prj_minimal.conf'.

    The project name is "Bluetooth: Peripheral LBS".

    https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_lbs 

    The usage / "Testing" section of the paged linked above says:

    "The device is advertising as 'Nordic_LBS'"

    What am I missing?

    Thanks,

    Derek

Related