Part Number: CC2640R2F
Tool/software: Code Composer Studio
I have a CC2640r2 with the stack simplelink_cc2640r2_sdk_1_40_00_45 communicating with an android application.
When my android app go from android 9 to android 10, the heap of my CC2640r2 overflow.
I used "HEAPMGR_METRICS" predefined symbols to found that this is a heap problem. With Android 10 application, the "heapmgrMemFail" flag go to 1.
As I understand, my system use auto-heap.
If I reduce the SBP_TASK_STACK_SIZE from 1024 to 924, the heap take now 100 bytes more and it's solving my problem.
With this patch, my HEAPMGR_SIZE = 4004 and the heapmgrMemUB = 3952.
This project was started from simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral example.
What is the minimum heap needed by the stack?
How can I be sure that the system will not run out of heap memory?
Can it be a memory fragmentation problem and it will occur again later?