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: cc2640r2f Stops advertising Randomly.

Part Number: CC2640

Hello,

I am using simple_peripheral (without OAD) from the SDK simplelink_cc2640r2_sdk_1_30_00_25  on cc2640r2f. I am facing a problem. I want to make it advertising forever.

But cc2640r2f stops advertising suddenly without any clue. I have tried to investigate the memory problem. But there is not heap fail etc. 

I have also checked for the clocks but they all look ok.

Sometimes it keeps on advertising for 30 minutes and sometimes just stop in 2-3 minutes. 

The simple_peripheral with OAD looks little better it advertising for about 4-5 hours and stops very rarely.

What can be the possible reason for to stop advertising? So I can investigate for that?

I will be really thankful for your help.

  • Hi mabbas,

    Are you able to tell if there is a central that is connecting to the peripheral when it does this? That could stop it advertising in the default simple_peripheral example I believe.

    Regards,
    Katie
  • Hi Katie, Thanks for your reply. No there is no master that connects to peripheral. It stops and does advertise again at all .
  • Hi Mabbas,

    Can you try putting a periodic pin toggle, printf, or other "heartbeat" function for debugging to ensure that other tasks are still able to continue to run when the device is in this non-advertising state?

    Maybe you could also try to connect to the device without a reset when this happens (search for "connect to running target") so you can see what state the code is in during the behavior? e2e.ti.com/.../432770

    Regards,
    Katie
  • Hi Katie,

    Can you tell me how o can use heartbeat function in task ?

    I have already tried connect to running target and It shows strange vales for variables.
    I set a variable for advertising but when it’s advertising gets it goes to zero.

    But I don’t why it is going to zero although I am not clearing it.
  • An example could be to add a pin toggle or printf triggered off of, say the SimpleBLEPeripheral_performPeriodicTask that's already in the example project. Basically put it in a task in your project that should be running even without advertising or connections happening. You may want to do this for a few different tasks, with different pinToggles or different printf statements, so you can see which tasks are still running or not.

    Regards,
    Katie
  • Hi MAbbas,

    It's been a while, so hopefully you have found a solution. I'm going to close the thread due to inactivity but you can post back if you are still needing some help.

    Regards,
    Katie