Other Parts Discussed in Thread: SYSBIOS
Hello,
I'm using the following code to set a periodic pulse on a pin which works fine, but seems that my timerFn handler is being called, is there a way to disable interrupts for this timer? If I provide NULL instead of timerFn for the Timer_create does it mean SYS/BIOS will instead call a dummy handler? Also I was hoping to use this timer as a 64bit timer, not 32bit, but there's no way to configure that through program? Using TimerSettings I don't think anything was changed.
extern "C" void timerFn();
static void timerFn(uint32_t arg)
{
Assert_isTrue(1, NULL);//shouldn't reach here
}
Timer_Params timerParams;
Timer_Params_init(&timerParams);
Error_Block eb;
Error_init(&eb);
// timerParams.extFreq.lo = 24000000;
// timerParams.extFreq.hi = 0;
timerParams.period = 750; //=24Mhz/32kHz
timerParams.gpioDatDir.gpio_diro12 = 1;//set TOUT12 as timer output
timerParams.startMode = Timer_StartMode_USER; //so that the user calls SetPeriod to start the timer
timerParams.runMode = Timer_RunMode_CONTINUOUS; //periodic timer
timerParams.periodType = Timer_PeriodType_COUNTS;
timerParams.controlInit.tien = 0;
timerParams.controlInit.cp = 0; //pulse mode
timerParams.controlInit.invout = 1; //inverted tstat drives pin tout
timerParams.controlInit.pwid = 0; //TSTATx goes inactive after 1 clock cycle
timerParams.controlInit.invin = 0; //no input
timerParams.half = Timer_Half_LOWER;
Timer_timerSettings[TIMER0].mode = Timer_Mode_64BITGPTIMER;
Timer_timerSettings[TIMER0].master = true;
Timer_timerSettings[TIMER0].ownerCoreId = 0;
Timer_handle s_hTimer = Timer_create(TIMER0, timerFn, &timerParams, &eb);//timer 0 set to T64P0_OUT12
Thank you and best regards,
David.