Hi
I have a problem with EK-TM4C1294 TIVA LAUNCHPAD.
I am configuring the timer0 as periodic, 32 bits of 1s and I want polling not by interruption, but I haven´t the period correct.
This is my code
TIMER_A = 120000000;
void Conf_timer_periodico(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); //Enable the peripheral
ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC); //Configure 32-bit periodic timer (down count)
ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, g_ui32SysClock);
ROM_TimerEnable(TIMER0_BASE, TIMER_A); // Enable the timer
return;
}
main
{
// Run from the PLL at 120 MHz.
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
while(1)
{
if ((TimerValueGet (TIMER0_BASE, TIMER_TIMA_TIMEOUT)) == 0x00)
{
TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT)
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, GPIO_PIN_1); //ON LED1
}
}
}
Please help me.