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: Is there a way to reduce FLASH size used by BLE stack library? Is there a plan to release a version of the chip with larger FLASH?

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2541, CC2640, BLE-STACK

Hello.

I've compiled the BLE 5 multi-role example for the CC2640R2F, taken from simplelink_cc2640r2_sdk_1_35_00_33 examples.

The code size is 114KB, leaving 10KB of free space for new code... 

That is quite low, even if I consider that parts of this demo application shall be removed.

  1. Is there a way to reduce the code size used by the stack library?
  2. Is there a plan to release a flavor of the CC2640R2F with 256KB ? (similar to CC2541, which has 2 available FLASH sizes)

Btw, the BLE 4 multi-role example code size is 84KB (30KB less than BLE 5.0).

Thanks

  • More info - the main difference in code size between BLE 4 and BLE 5 binaries is this :

    BLE 5

        C:\ti\simplelink_cc2640r2_sdk_1_35_00_33\source\ti\ble5stack\blelib\ctrl\cc2640_ll_pcxx.a
           ll.o                              12314    8         286    
           ll_common.o                       8694     0         12     
           ble.o                             4600     0         392    
           ll_isr.o                          3122     0         0      
           ll_slave_end_causes.o             2876     0         2      
           ll_scheduler.o                    2264     0         12     
           ll_master_end_causes.o            2192     0         0      
           ll_adv_end_causes.o               1784     0         0      
           ll_privacy.o                      752      0         632    
           ll_init_end_causes.o              1068     0         0      
           ll_scan_end_causes.o              604      0         40     
           ll_enc.o                          496      0         0      
           ll_access_address.o               382      0         0      
           ll_config.o                       0        102       60     
           ll_data.o                         20       0         8      
           ll_wl.o                           28       0         0      
           ll_error_end_causes.o             6        0         0      
        +--+---------------------------------+--------+---------+---------+
           Total:                            41202    110       1444   

    BLE 4

     

        C:\ti\simplelink_cc2640r2_sdk_1_35_00_33\source\ti\blestack\blelib\ctrl\cc2640_ll_pcxx.a
           ll.o                              2736    0         200    
           ll_isr.o                          2552    0         0      
           ll_scheduler.o                    2108    0         12     
           ll_master_end_causes.o            1812    0         0      
           ble.o                             1440    0         0      
           ll_init_end_causes.o              940     0         0      
           ll_common.o                       700     0         0      
           ll_scan_end_causes.o              540     0         40     
           ll_access_address.o               382     0         0      
           ll_config.o                       0       102       32     
           ll_data.o                         20      0         8      
           ll_error_end_causes.o             2       0         0      
        +--+---------------------------------+-------+---------+---------+
           Total:                            13232   102       292 

        C:\ti\simplelink_cc2640r2_sdk_1_35_00_33\source\ti\ble5stack\blelib\ctrl\cc2640_ll_pcxx.a       ll.o                              12314    8         286           ll_common.o                       8694     0         12            ble.o                             4600     0         392           ll_isr.o                          3122     0         0             ll_slave_end_causes.o             2876     0         2             ll_scheduler.o                    2264     0         12            ll_master_end_causes.o            2192     0         0             ll_adv_end_causes.o               1784     0         0             ll_privacy.o                      752      0         632           ll_init_end_causes.o              1068     0         0             ll_scan_end_causes.o              604      0         40            ll_enc.o                          496      0         0             ll_access_address.o               382      0         0             ll_config.o                       0        102       60            ll_data.o                         20       0         8             ll_wl.o                           28       0         0             ll_error_end_causes.o             6        0         0          +--+---------------------------------+--------+---------+---------+       Total:                            41202    110       1444   

  • Actually, CC2640R2 has 275KB of Nonvolatile Memory Including 128KB of In-System Programmable Flash. Isn't it enough for your application? Which BLE example is your application based on?
  • Hello Koby,

    The protocol stack library configuration for multi-role is larger than peripheral-only due to the need to support master and slave configurations. Additionally, the BLE5 configuration is larger than BLE3 (Bluetooth 4.2) due to additional memory requirements for Bluetooth 5 features. If Bluetooth 4.2 is adequate for your design I suggest using BLE-Stack v3.0.1 to achieve maximum application flash memory availability. The multi_role.c and related menu system for supporting the demo can be removed to save up to 5 kB of flash space.

    Unfortunately we are not able to provide product roadmap details through E2E. I suggest registering for Wireless Connectivity product updates in your myTI account to get the latest device announcements.

    Best wishes
  • See table 3.2 in the data sheet.

    Out of the 275KB, 147KB are ROM. Can't program ROM...

    Still only 10KB left for my application code.