Other Parts Discussed in Thread: SYSBIOS,
Tool/software: TI-RTOS
Hello!
I have a slightly problem with the timer. I tried to configure it but it seems it doesn't call the function associated. I need to use one shot. Below is a snippit about the code I used. I tried also a breakpoint into the callback but it doesn't even enter there.
What am I doing wrong?
#include <ti/sysbios/family/arm/cc26xx/Timer.h> static Timer_Handle timerHandle; static Timer_Params timerParams; void timerCallback(UArg arg){ UART_write(uart, "a", 1); // System_printf("timerCallback"); // System_flush(); Timer_start(timerHandle); //restart the timer } Timer_Params_init(&timerParams); timerParams.periodType=Timer_PeriodType_MICROSECS; timerParams.period=1000000; // 1s timerParams.arg=1; timerHandle = Timer_create(Timer_ANY, timerCallback, &timerParams, NULL); // timerHandle = Timer_create(Timer_ANY, &timerCallback, &timerParams, NULL); if (timerHandle == NULL){ System_printf("Error"); System_flush(); while(1); } Timer_start(timerHandle);
Thank you very much!