This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F-Q1: Available memory left for customer application for 4.2 and 5.0 stack configuration

Part Number: CC2640R2F-Q1
Other Parts Discussed in Thread: BLE-STACK

Dear Experts,


could You please help with the following request.

I would like to understand the remaining flash/RAM memory left, if configuring the stack with below assumptions

1) Full stack configuration for BT4.2 with all available features, so basically the worst case regarding BT4.2 stack size (Central and Peripheral, Secure Connections, extended Data Length...)

2) BT5 stack config with Long Range only

I have tried to edit the build_config.opt file, but could not see any effect on memory (checked the .map file) with settings for v41 vs. v42. I then tried to insert the BLE_V41_FEATURES or BLE_V42_FEATURES in pre-defined symbols, but depending on how I insert these defines I am getting unresolved symbols errors, when compiling application (multi_role example).

Could You please give me an overview of the flash/RAM memory usage for above scenarios or help me in extracting this information from the build?

Many thanks and best regards,

RogerG

  • Hi RogerG,

    As you know, the code size will depend on compilator so there's no final answer to your question.

    Generally, the Bluetooth 4.2 projects use the BLE-Stack stored in the device ROM. The Bluetooth 5 project stores the BLE5-Stack in the FLash, which is why BLE5-Stack projects use more Flash. (This is also why we don't have a BLE5 multirole project, it would be too large.)

    I just did a quick attempt on simple peripheral: "vanilla" Bluetooth 4.2 version uses 65000 bytes of flash and 8200 bytes of RAM.

    The "vanilla" BLE5-Stack simple speripheral uses 95000 bytes of Flash and 9300 bytes of RAM.

    My guess is that when comparing projects with the same GAPRoles the Bluetooth 4.2 version will always use the most flash.

    I'm not sure what you want to achieve by inserting BLE_V41_FEATURES or BLE_V42_FEATURES in the predefined symbols? Can you be a bit more specific?
  • Hi Marie,

    thanks for checking the simple peripheral example - BTW, what is meant by "vanilla"?

    As mentioned in the initial post my customer would like to understand the available application memory left for customer usage after including the stack (v4.2 and v5) and the major features of each BLE stack version

    e.g. for v4.1/v4.2:
    - supported roles: peripheral and central
    - secure connections
    - data length extension
    - V41_CTRL_CFG
    - PRIVACY_1_2_CFG

    e.g. for v5
    - supported roles: peripheral and central
    - all of above features for v4.1/4.2
    - plus long-range mode from v5

    I tried to follow the instructions in the BLE-Stack User Guide for BT4.2 --> "Stack Configuration" and include/exclude the above mentioned features and check their impact on the used memory, but could not really see any difference in the flash usage.

    Would it be possible to estimate the remaining flash for customer application for above configurations?

    Many thanks and best regards,
    RogerG
  • Hi RogerG,

    Vanilla means the example project found in the stack with no code changes. I should have been clearer, I apologize.

    I'm not sure a Bluetooth 5 project with both peripheral and central would fit in the flash. We'll check on the available options and get back to you.

  • Hi Marie H.,

    do You have any updates on this topic?

    Many thanks and best regards,
    RogerG
  • Hi Gregor,

    Did you see the BLE5-Stack multi_role project? (In the 1.40 SDK release.) It takes up 93% of flash.
  • Hi Marie,

    thanks, I checked both multi_role examples v4.2 and v5 by just adapting the build_config.opt file and check the memory usage in the generated .map file.

    The results are

    Seems to be in line with Your findings.

    Thank You very much and best regards,

    Gregor