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: CC2640R2F,when user occupies a large amount of RAM, there will be a problem that ble-stack throw HCI_BLE_HARDWARE_ERROR_EVENT_CODE Error code duiring ble connection.

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

My project is based on Ti demo simple_peripheral_cc2640r2lp_app,  my code occupies  nearly 3.5K sram. After compiled by CCS,you can see the .map file below. It remain 4978 byte.

When i start a BLE connection by phone, ble-stack throw HCI_BLE_HARDWARE_ERROR_EVENT_CODE Error code. My watch dog reset at that time. 

I check my code many many times and debug but the problem happen every time.  Finally, i connect to my device successfully until I try to reduce the size of the my array. My sram remain 5012 byte.

Here is my .map after reducing memory using:

i have 2 doubt below:

1.The stack and ble application need at least 5K ram for working in project simple_peripheral_cc2640r2lp_app. 

2. The heap memory will not show in .map file, and user can't know how many heap memory used by stack.

Is my doubt correct? Hope for your  answer to Identify the problem.My SDK version is simplelink_cc2640r2_sdk_3_30_00_20 with blestack not ble5stack.

Best wish!

  • Hi Maple,

    We have a section in our debugging guide on how to debug HW exceptions. Please see the BLE-Stack User's Guide:

     

    1. As you point out, the ICall heap is not shown in the map file. I would say 5 kB sounds a little small for Simple Peripheral, but you should profile your application to see how much heap you need.

    2. You can use the Heap Manager to check the heap size and occupation. Please see the BLE-Stack User's Guide: