I am starting a new project with the 1294 Launchpad XL. I have a program that I want to use the Systick as my system timer, with a 1 ms time slice. I have set up the code to enable the systick as follows:
// Set the clocking to run directly from the crystal at 120MHz.
//
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
//
// Set up and enable the SysTick timer. It will be used as a reference
// for delay loops in the interrupt handlers. The SysTick timer period
// will be set up for one second.
//
ROM_SysTickPeriodSet(g_ui32SysClock/1000);
ROM_SysTickEnable();
ROM_SysTickIntEnable();
...
//
// Enable processor interrupts.
//
ROM_IntMasterEnable();
I have created a systick handler::
void SysTickHandler(void)
{
// Increment the count
Increment_ms();
}
And I have added the handler to the interrupt table in the startup.c
SysTickHandler, // The SysTick handler
IntDefaultHandler, // GPIO Port A
When I run the code I can see the part initialize, and I get to a loop where I read the Sistick value. I can see the value is changing and that it seems to be limited by the bounds from my set, so I know the counter is actually counting. For some reason I am not getting the interrupt to occur. It never stops at the breakpoint in the interrupt where I increment my system count.
I have looked at all the other Systick posts I could find and could not find the answer to my problem. Can someone tell me what I am missing, or point me to an example where the SysTick interrupt is being used and not just where the timer is started and read. I am sure I left out something stupid, but I am not having luck figuring it out.
Sincerely,
Mike Fontes