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.

RTOS/Launchxl-cc2650: .

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650

Tool/software: TI-RTOS

Hi ,

Iam Working on CC2650 spp_ble_server project.

Iam now stuck in periodic clock implementation.

Currently Iam starting periodic clock in initialization

part of spp_ble_server task as shown below.

 Util_constructClock(&periodicClock,         SPPBLEServer_clockHandler,SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT);

 Util_startClock(&periodicClock);

and Iam restarting the clock everytime in periodic task handler function.

ie in SPPBLEServer_clockHandler() function using

 Util_startClock(&periodicClock);

But My requirement is to stop this periodic clock

when connection happens successfully with the end device.

Iam doin this as shown below

   case GAPROLE_CONNECTED:

     {  

       Util_stopClock(&periodicClock);

Everything is fine till here.

But When the link is terminated I need to restart the periodic clock with the same timeout mentioned earlier.

I dont know how to do this.

Already tried following:

1.) I tried to restart clock using Util_startClock(&periodicClock);

   as soon as link is terminated.

2.) Also tried using Util_restartClock API

Am I missing out something. How can I set up a clock which I can startor stop whenever I want

  • Hi Kavan,

    Did you verify that upon connection termination you are calling Util_startClock or Util_restartClock api? (eg, place a breakpoint on the code, and see if you hit it upon connection term)

    You should be able to set up clocks and modify their behavior whenever you please using the API in Util.

    My best guess as to what's going on is that it's perhaps not executing. I'd follow the debugger in while keeping an eye on the RTOS ROV to see if the clock truly does get restarted.

    Regards,
    Rebel