Hi folks,
I need to generate a short single pulse of ~10us with interrupt generated at TIME_OUT after 1ms every time i enable the TIMER5 on TM4C1294NCPDT (connected launchpad)
The problem is that at TIMER_MACTH occur the CCP pin not clear as desired. Whats wrong?
There are any other solution to this problem?
I need to control the behaviours of CCP pin at MATCH in ONE_SHOT mode, because this is the only mode that generate a single count and stop the TIMER automatically.
tks
Tales Amorim
My solution is to configure a timer in the following way:
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5); SysCtlDelay(2);// wait 6 cycles GPIOPinConfigure(GPIO_PB3_T5CCP1); GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_3); TimerConfigure(TIMER5_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_ONE_SHOT | TIMER_CFG_B_ACT_SETCLRTO); TimerPrescaleSet(TIMER5_BASE, TIMER_B, (256) - 1); TimerLoadSet(TIMER5_BASE, TIMER_B, (456) - 1);//1028us TimerPrescaleMatchSet(TIMER5_BASE, TIMER_B, (256) - 1);//1028us to time-out TimerMatchSet(TIMER5_BASE, TIMER_B, (451) - 1);//(~10us) to match TimerIntClear(TIMER5_BASE, TIMER_TIMB_TIMEOUT); TimerIntEnable(TIMER5_BASE, TIMER_TIMB_TIMEOUT); IntEnable(INT_TIMER5B); IntMasterEnable(); TimerEnable(TIMER5_BASE, TIMER_B);