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.

CC3220SF: Cant get to timer's callback

Part Number: CC3220SF


Hello Everyone!

I am trying to use timer in callback-mode to organize 1-ms delay function (using NoRTOS)

having global variable

volatile bool lock = false;

calling from main:

Board_init();

Timer_init();

Timer_Handle timer = station_ms_timer_config();

lock = false;
if (Timer_start(timer) == TIMER_STATUS_ERROR)
{
while(1);
}

while(!lock);

/* smth */

defenition:

Timer_Handle station_ms_timer_config(void)
{
Timer_Params timerParams;
Timer_Params_init(&timerParams);
timerParams.period = 1000;
timerParams.periodUnits = Timer_PERIOD_US;
timerParams.timerMode = Timer_ONESHOT_CALLBACK;
timerParams.timerCallback = timer_callback;
Timer_Handle local_timer = Timer_open(Board_TIMER0, &timerParams);
if (local_timer == NULL)
{
while(1);
}
return local_timer;
}

this is callback:

void timer_callback(Timer_Handle myHandle)
{
lock = true;
}

Via debugger I can see I never go to callback, what could be the reason?

Regards, Boris