Hi,
Here is the my setup,
Hardware: EK-TM4C123GL
Objective: Want to Blink one of the LEDs(PF2) on the board with PWM capture compare mode(32Bit instead of 16 Bit). so that we can Load the high value in order to achieve 1 HZ.
Reference: Driver Library, Forum.
Code snippet:
ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0 );
GPIOPinConfigure(GPIO_PF2_T1CCP0);
GPIOPinTypeTimer(GPIO_PORTF_BASE, GPIO_PIN_2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
TimerConfigure(TIMER1_BASE, TIMER_CFG_A_PERIODIC|TIMER_CFG_A_PWM);
TimerLoadSet(TIMER1_BASE, TIMER_A, ROM_SysCtlClockGet());
TimerMatchSet(TIMER1_BASE, TIMER_A, ROM_SysCtlClockGet()/2);
TimerEnable(TIMER1_BASE, TIMER_A);
Problem:
I'm not seeing Blue color LED blink which is connected with PF2. Have probed this pin and not seeing pulse it just went high. If I configure the timer with TIMER_CFG_SPLIT_PAIR instead of TIMER_CFG_A_PERIODIC and different load value can see the frequency.
I assume CCP can support 32 bit mode and achieve 1 HZ time interval.
Am I wrong?
Really appreciate your help.
-Durai