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.

Single pulse width in One-Shot mode with clear CCP on MATCH and INT at TIME_OUT

Other Parts Discussed in Thread: TM4C1294NCPDT

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);