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.

Util_constructionClock CC2640 BLE Stack 2.1

Other Parts Discussed in Thread: SYSBIOS

Hi All,

Is there a problem that anyone has encountered with reconfiguring a clock using the Uitl_constructionClock function. The program seems to allow me to call this function after initially configuring it once with no problem, but when the function is called a second time the periodic evt is never triggered.

When I took the reconfiguration of the periodicClock out of my program the periodic event behavior was a expected.

Below is my code:

    if (events & SBP_PERIODIC_EVT)
    {
    	events &= ~SBP_PERIODIC_EVT;


		//Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler,
		//					SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT);

		initialAdvertEnable ^= 1;


		//Sends new Advertisement Status to BLE Stack
	    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
	                         &initialAdvertEnable);

		//start clock here in order to test tamper/battery/light sensor logic
		Util_startClock(&periodicClock);
     }

When the Util_constructClock function is commented out I see the unexpected behavior of no returning trigger events as explained above. I know that I can just create two separate clocks to accomplish the task I am  attempting with this method, but I just wanted to see if there was something I was missing in order to dynamically configure a clock during run time, so that I could use a single clock but with multiple configurations throughout the program run time.

Thanks,

Peyton Davari