Part Number: TM4C1294NCPDT
Tool/software: Code Composer Studio
Dear all
I am working on a project that requires pulses very long, so far everything was working perfect with my old friend TM4C123, but now I need to move on my code to the 129 because I need its Ethernet capabilities. I used the Wide Timers on 123 and I am aware that TM4C129 does not have, but I read is possible to configure them as 32 bit so I could achieve a very low frequency. Does anyone have experience on this matter or could give a look to my code in case I am missing something.
Thanks in advance
void timer1 (){ //SH
uint32_t ulPeriod, dutyCycle1;
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER2);
GPIOPinConfigure(GPIO_PA5_T2CCP1);
GPIOPinTypeTimer(GPIO_PORTA_BASE, GPIO_PIN_5);
ulPeriod = g_ui32SysClock/0.5;
dutyCycle1 = (unsigned long)(ulPeriod-1)*0.33;
TimerConfigure(TIMER2_BASE, TIMER_CFG_SPLIT_PAIR|TIMER_CFG_B_PWM);
TimerControlLevel(TIMER2_BASE, TIMER_B, 1);
TimerLoadSet(TIMER2_BASE, TIMER_B, ulPeriod-1);
TimerMatchSet(TIMER2_BASE, TIMER_B, dutyCycle1);
TimerEnable(TIMER2_BASE, TIMER_B);
}
and my system clock
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);