Part Number: CC2640R2F
Tool/software: TI-RTOS
Hi!
I have some problem with my SimpleLink application based on simple_peripheral example of SimpleLink CC2640R2 SDK Version 1.35.0.33.
Compiler version TI v16.9.1.LTS with optimization level off (for debugging).
Firmware runs on custom hardware with CC2640R2, without 32kHz crystal.
I created one additional Task (Task B) with stack size of 600 Bytes.
Within this task I communicate with a I2C device so I added I2C driver. The size of the application framework for this I2C device is impressive
(sorry I can't tell you what type of I2C device I am using here because this is confidential), if I look at Code Composer's Memory Allocation window I get this result:
simple_peripheral_cc2640r2lp_app: SRAM 15721 Bytes (96%) out of 16368 Bytes
simple_peripheral_cc2640r2lp_stack: SRAM 1040 Bytes (5%) out of 17408 Bytes
The problem is that this complete big firmware image doesn't work as expected, though it seems there is some memory left free.
If I run the code without making any calls to the large I2C device framework (but the additional task for it is still there), nothing is being
linked in from it, code und data size is reduzed and remaining functionality (Bluetooth advertising, pairing connections etc.) works as expected.
Same if I uncomment the call to SimpleBLEPeripheral_createTask() but call the big I2C device framework. Now the I2C device works as expected, but of course without Bluetooth functionality.
So I guess this has something to do with data size used by the firmware image.
I am confused by the output of Code Composer's Memory Allocation window. It shows 100% SRAM with 16368 Bytes respectively 17408 Bytes while from
the datasheet the overall physical SRAM memory of the CC2640R2 is 20kBytes.
Perhaps some data memory gets overwritten? How to interpret these SRAM data readings? Where is the rest of the 20kBytes gone?
ROV output with suspicious stack peak sizes:
Thank you for help!
Andreas
