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.

CC2650 disconnects and stops advertising, TI-RTOS clock stops also

Other Parts Discussed in Thread: CC2650, SYSBIOS, CC2541

Hi there,

I'm getting a bizarre issue and I'm not having much luck debugging the problem.

After a few minutes of connectivity (the time varies a lot), the Bluetooth connection drops out and the CC2650 stops advertising.

I've tried inspecting all the TI-RTOS modules through IAR, and strangely enough the ti.sysbios.knl.Clock ticks are not changing (after breaking and running). They do change when not in this hung state.

The ti.sysbios.knl.Task shows all tasks except the idle one blocked, waiting on a semaphore. I tried adding breakpoints to ICall_taskEntry and gapRole_taskFxn and they never get called.

In an attempt to get the clock running again, I managed to get the CC2650 unstuck by forcing HWI #20 (which calls ti_sysbios_family_arm_cc26xx_Timer_dynamicStub__E) by setting NVIC_ISPR0 bit 4 to 1. Unfortunately this hasn't gotten me much closer to fixing the issue...

Any suggestions on what to look out for?

  • What is the disconnection cause? i would recommend taking a sniffer capture and also inspecting the status of the link termination event received by the application.
  • I'm afraid I don't have access to a packet sniffer.

    Android reports GATT CONN TIMEOUT – the CC2650 just appears to stop sending packets.

    Not everything stops working though, PIN rising edge interrupts seem to still work. All TI-RTOS clocks stop working.

    After it disconnects, ti_sysbios_family_arm_cc26xx_Timer_dynamicStub__E is never called, but the HWI is supposedly enabled. osal_msg_receive is never called either, which suggests the stack isn't getting any events. 

    AON_RTC appears to be working though, as the SEC and SUBSEC registers still keep changing.

  • Are you using DMA/SPI?

    I had problems with using DMA and maintaining a connection on the CC2541. Apparently the BLE connections would use some of the same DMA interrupt channels as the SPI code that I had implemented. I would investigate your registers and see if any interrupt flags are being set before connection is lost.
  • I'm using SPI for external flash but I'm not reading/writing around the time that the CC2650 stops advertising & clocks stop working. I am using the ADC and TDC though.

    I'm not sure how I'd look at the registers right before the connection is lost, because I don't know when it will happen / what causes it.

    I've checked the HEAPMGR_METRICS and they all look fine. The TI-RTOS task stacks are also fine.

    I managed to get the clocks started up by forcing INT_AON_RTC_COMB again, but this time it didn't start advertising again, and the stack tasks remain blocked. Any ideas on what might be causing this? I have a feeling that the CC2650 thinks it is still connected, so it doesn't start advertising...

  • Just as I wrote that, it started advertising again (maybe 3-4 minutes after forcing the interrupt). I am using the general discoverable mode and my connection timeout is 10s.

    Another interesting thing found, when the disconnect occurs, the gapRoleStateCallback function is not called.

  • I have managed to narrow down the issue a bit further.

    When the clocks stop working, it appears that the AON_RTC CH0CMP is too low compared to SEC/SUBSEC, meaning that the INT_AON_RTC_COMB is never triggered.

    I have a feeling that this is due to "late servicing of the timer’s ISR", probably because of "a long period where interrupts are disabled, or due to a long-running ISR". (e2e.ti.com/.../325282 and processors.wiki.ti.com/.../BIOS_for_the_MSP430

    Does that sound plausible? Has anyone come across this issue, or is there any way I can validate that this is the problem?
  • Hello, David
    Did you solve your problem? I use an external flash memory, and I think I have the same problem.

  • Unfortunately not, and it does need to be fixed... haven't had a crack at fixing it for a while. Please let me know if you have any luck!

  • Any luck resolving the stopped clock problem? Thanks!
  • My problem was related to the priority of SPI
    I found a solution there: e2e.ti.com/.../1931928