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