Here is a simple program on the EK-TM4C1294XL. The timer 4A ISR fires and I can halt in the ISR.
When I stop the program, the registers show exception 4F. What does this mean?
Thanks,
Priya
uint32_t g_ui32SysClock;
int main(void)
{
int main(void)
{
g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
CommandCheckTimerInit();
while(1);
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
CommandCheckTimerInit();
while(1);
}
void CommandCheckTimerInit(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER4);
IntMasterEnable();
TimerConfigure(TIMER4_BASE, TIMER_CFG_A_PERIODIC);
void CommandCheckTimerInit(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER4);
IntMasterEnable();
TimerConfigure(TIMER4_BASE, TIMER_CFG_A_PERIODIC);
//Initialise the Timer
TimerLoadSet(TIMER4_BASE, TIMER_A, g_ui32SysClock/40); //PN 25 ms timer
TimerLoadSet(TIMER4_BASE, TIMER_A, g_ui32SysClock/40); //PN 25 ms timer
//Setup the interrupts for the timer timeouts.
IntEnable(INT_TIMER4A);
TimerIntEnable(TIMER4_BASE, TIMER_TIMA_TIMEOUT);
IntEnable(INT_TIMER4A);
TimerIntEnable(TIMER4_BASE, TIMER_TIMA_TIMEOUT);
//Enable the timers.
TimerEnable(TIMER4_BASE, TIMER_A);
}
TimerEnable(TIMER4_BASE, TIMER_A);
}
void CommandCheckTimer_ISR (void)
{
static uint8_t countMotor = 0;
static uint8_t countTherm = 0;
{
static uint8_t countMotor = 0;
static uint8_t countTherm = 0;
TimerIntClear(TIMER4_BASE, TIMER_TIMB_TIMEOUT);
countMotor++;
countTherm++;
if (countMotor == 3){
countMotor = 0;
}
if (countTherm == 40){
countTherm = 0;
}
countTherm++;
if (countMotor == 3){
countMotor = 0;
}
if (countTherm == 40){
countTherm = 0;
}
}