I was developing an app on the EKS-LM4F232 board (part number ends in A1).
I tried to setup Port K pin4 as a GPIO output. I ended up in the FaultISR when I ran the executable. I soon realized the Port K has some special setup requirements and switched to using Port J.
So now I can execute the program but I never get the SysTickIntHandler().
I loaded an earlier version of my program (where the SysTick did work) and it no longer works. So I went back to the qs-logger app. I can load it but still no SysTick.
I've cycled power on the board and loaded several applications, everything seems to work but the SysTick. I can not find any NV registers related to the SysTick.
There is errata 4.2 related to SysTick, but it does not seem to be the problem here.
Below are the related code segments...
--- Start snippet
// Derived from qs-logger.c - Data logger Quickstart application for EK-LM4F232.
//*****************************************************************************
#define CLOCK_RATE 100
#define MS_PER_SYSTICK (1000 / CLOCK_RATE)
static volatile unsigned long g_ulTickCount;
// Handles the SysTick timeout interrupt.
void SysTickIntHandler(void)
{
// Increment the tick count.
g_ulTickCount++;
}
--- End snippet
--- Start snippet
int main(void)
{
unsigned long ulSysClock;
// Set the clocking to run at 50 MHz.
ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ |
SYSCTL_OSC_MAIN);
ulSysClock = ROM_SysCtlClockGet();
--- End snippet
...
--- Start snippet
// Configure SysTick to periodically interrupt.
g_ulTickCount = 0;
ROM_SysTickPeriodSet(ulSysClock / CLOCK_RATE);
ulSysClock = ROM_SysTickPeriodGet();
if( ulSysClock != ROM_SysCtlClockGet()/100 )
while(1);
ROM_SysTickIntEnable();
ROM_SysTickEnable();
ROM_IntMasterEnable();
--- End snippet
...
--- Start snippet
// Forever loop to run the application
while(1)
{
static unsigned long ulLastTickCount = 0;
// Each time the timer tick occurs, process any button events.
if(g_ulTickCount != ulLastTickCount)
{
--- End snippet
...
--- Start snippet
}
}
}