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.

CC2640 stops advertising after a while

Other Parts Discussed in Thread: CC2640

Hi,

I'm using a LSR CC2640 module on our custom board together with the BLE SDK 2.2.1. The project is based on the latest multi role example project from the TI github repository. Everything is running fine, except that the system stops with BLE advertising after a random period of time. This problem seems not be occurs when debugging and connected by jtag (or is does take a much longer time).

The discoverable mode is set to general to enable advertising indefinitely. The application task controls a 2G/GPRS module using the UART and posts every 30 seconds data to the internet. All the control calls over uart are non-blocking calls. We use the the UART in callback mode. This periodically process is scheduled by a RTOS timer which posts an application event. Every step of this periodically process is asynchronously executed to be sure the application task does not take a lot of time of the RTOS system. Because we have to wait for results from the 2G module over the UART we reschedule the same RTOS timer for a short time every step. After it is finished it schedules the timer to the next 30 seconds to start it all over again. This process is running stable and does not stop.

No BLE connection is made during this test and the application task stays running after the BLE advertisement stops. Al tasks remain within their stack size defined bounds and the same for the maximum heap size. No exceptions occur.  

The stack size of the gaprole task is increased to 512 (it seems the default size is too tide for multi role) and the application task size has 1104.

May the event GAP_END_DISCOVERABLE_DONE_EVENT occur, advertisement is enabled again. The same applies when external BLE connections are established or terminated (but for the test no external BLE connections are made). 

We have tested the system for a long time and everything is running stable except for the advertisement part. Even when we check periodically if the advertisement is enabled, and enable it again when not, it still stops after a while.  

Does somebody know why this problem may occur and which options we could check to resolve this problem?

Thanks for helping.

Peter