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: Include observer role with simple_peripheral example in ble5stack (SDK : 4_30_00_08)

Part Number: CC2640R2F

When enable observer role with existing simple_peripheral example code build error occurs (Insufficient flash memory)

Objective:

Use ble chip in meter as peripheral device.As a feature addition in meter TPMS need to be implemented.For TPMS implementation if configure observer + peripheral issue occurs.

Queries

1.Expecting guidance and step by step procedure to integrated observer role with peripheral

2.Is there any limitation in ble5stack along with cc2640r2 ble chip.When tried the same integrating observer role with simple_peripheral example no memory overflow issue observed. 

1.Please check the configuration what I have done in code given below,

9fd8dfe2-0f9b-41ec-90af-313ee852e511.png

Previous configuration,

-DHOST_CONFIG=PERIPHERAL_CFG

2.The snap of the build error given below

image.png

image.png

Software Details:

SDK - simplelink_cc2640r2_sdk_4_30_00_08

Stack - ble5stack

Example - Simple_peripheral

Note : Please ask if any clarification required

Thank you

  • Hi,

    Thank you for reaching out. The ble5stack on the CC2640R2 device does not support multirole configurations due to flash/ram contraints. If multirole is required for your application, then I would recommend using the blestack multirole example as a starting point and making the modifications you shared. If BLE5 is required for your project along with multirole, then I would suggest evaluating the CC23XX family of devices as these support ble5 and multirole.

    Best Regards,

    Jan

  • Hi Jan,

    Thank you for your response.

    1.I need to confirm one thing. If need to add observer role with peripheral(simple_peripheral example code), the below configuration what i have done is correct ?, Is it necessary ?, Config done in build_config.opt in library

    2.If yes, why this configuration is necessary?

    3.Even after configuring like this, observer.c and observer.h files not included in the project, But flash memory getting increse.Why?

    4.Is there any other possible way to use peripheral + observer with same stack and sdk.

    SDK - simplelink_cc2640r2_sdk_4_30_00_08

    Stack  - ble5stack

    Example - simple_peripheral

  • Hi,

    Happy to help

    1.I need to confirm one thing. If need to add observer role with peripheral(simple_peripheral example code), the below configuration what i have done is correct ?, Is it necessary ?, Config done in build_config.opt in library

    Yes, that is correct.

    2.If yes, why this configuration is necessary?

    This configures the stack to enable the features and functionality required to enable the specified roles.

    3.Even after configuring like this, observer.c and observer.h files not included in the project, But flash memory getting increse.Why?

    Due to the previously mention config, changing the features enabled, this will trigger some #ifdef blocks which will cause more code to be flashed to the device.

    4.Is there any other possible way to use peripheral + observer with same stack and sdk.

    As mentioned previously, multirole is not officially supported in the CC2640R2 BLE5Stack. If this is necessary, please consider using the blestack or the CC23XX family of devices. It may be possible to get enough flash savings by making custom modifications to the example to get both roles tow in the ble5stack but you will be extremely limited in application space.

    Best Regards,

    Jan