Part Number: TM4C1294NCPDT
The code snippets below
// set up the Timer3 for Edge count
void setupT3CCP0(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER3);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_GPIOPinTypeTimer(GPIO_PORTA_BASE, GPIO_PIN_6);
GPIOPinConfigure(GPIO_PA6_T3CCP0);
MAP_GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_6,
GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
ROM_TimerControlEvent(TIMER3_BASE, TIMER_A, TIMER_EVENT_POS_EDGE);
ROM_TimerPrescaleSet(TIMER3_BASE, TIMER_A, 0);
ROM_TimerLoadSet(TIMER3_BASE, TIMER_A,60000);
ROM_TimerMatchSet(TIMER3_BASE, TIMER_A, 0);
ROM_TimerEnable(TIMER3_BASE, TIMER_A);
}
initSystick(uint32_t ui32SysClock)
{
g_ui32sysCounter = 0;
SysTickPeriodSet(ui32SysClock/100); n
psysTimerTick=false;
toggle=false;
}
void FreqMeasTTask(void)
{
uint32_t FreqVal;
FreqCount = ROM_TimerValueGet(TIMER3_BASE, TIMER_A);
ROM_TimerLoadSet(TIMER3_BASE, TIMER_A,60000);
ROM_TimerMatchSet(TIMER3_BASE, TIMER_A, 0);
FreqVal = 60000 - FreqCount;
}