Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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/CC2640R2F: RTOS: How to set up code for multi peroid Clock (or Timer) driving to same LED (or GPIO-OUT)

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hi

I'm have a working clock code that flash LED every 1 second (see below). I like to modify the code that generate Pattern based LED

Every 1 second

Period = 200mSec ON

Period = 400mSec OFF

Period = 500mSec ON

Period = 1000mSec OFF

repeat above every 1 second forever (include sleep to save power).Each Peroid has it own fxn interrupt function code that set/clear the LED (and also do another purpose). 

I like to use static implementation, how to do that?

// Example code

Clock_HB_Counter = 1000;
Clock_State=0;
Clock_Params_init(&clkParams_HB);
clkParams_HB.period = 1000000/Clock_tickPeriod; // Set to 1Sec
clkParams_HB.startFlag = TRUE;

/* Construct a periodic Clock Instance */
Clock_construct(&clkStruct_HB, (Clock_FuncPtr)LED_Clock_HeartBeat_Fxn, 1000000/Clock_tickPeriod, &clkParams_HB);
clkParams_HB.period = 0;
clkParams_HB.startFlag = TRUE;
clkHandle_HB = Clock_handle(&clkStruct_HB);

Clock_start(clkHandle_HB);