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.

RTC clock in RTOS breaking scheduler

Other Parts Discussed in Thread: CC3200, CC2650

In RTOS, I am initializing a periodic clock event as follows:

Clock_Params_init(&clkParams);
clkParams.period = 1000000;
clkParams.startFlag = TRUE;
Clock_construct(&clk0Struct, (Clock_FuncPtr)clk0Fxn, 60, &clkParams);

With the clk0Fxn simply being:

void clk0Fxn(){
//Semaphore_post(Clk0Sem);
System_printf("Clock Semaphore posted...\n");
System_flush();
}

Eventually I want to enable the Clk0Sem post to activate another task periodically, like a clock tick. Presently, however, I am stuck with the following.

While the clock function did seem to activate, in the method where the clock was initialized, I have the following:

System_printf("Core clock initialized, entering wait mode...\n");
System_flush();

but when I run the code, I see this output on a line:

"Core clock initialized, enClock Semaphore posted..."

So the clocked function is interrupting the current task, which is fine, but afterwards, it doesn't return to finish the "Core clock initialized" line. In fact, it doesnt do anything, and the program gets lost somewhere in disassembly. How can I set up the clocked function to work without disrupting RTOS?

  • Hi Harsha,
    What device are you running on, CC2650, CC3200? Are you using SysMin as your system support proxy? It looks like your task was interrupted before the call to System_flush(). Can you set a breakpoint at the System_flush() in your task and see if you reach it?
    Best regards,
    Janet