Part Number: TM4C1233H6PM
Tool/software: TI-RTOS
It's a very consistent every other time I compile and debug that I run into the problem where the IntDefaultHandler function is called.
First Run: Timers Trigger interrupts as expected
Second Run: IntDefaulHandler is called
Third Run: Timers Trigger Interrupts as expected
Fourth Run: IntDefaultHandler is called
I'm not sure what could cause this behavior but it doesn't begin happening until I had a fourth and fifth timer interrupt. Here is the code that I am seeing the above stated problems with:
///**************************************************************************************
// * Setup TIMERS
// ***************************************************************************************/
//Enable processor interrupts.
IntMasterEnable();
//Enable peripheral TIMER0
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER3);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER4);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
//Configure Timers to be split for two 16-bit periodic timers
TimerConfigure(TIMER0_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
TimerConfigure(TIMER1_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
TimerConfigure(TIMER2_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
TimerConfigure(TIMER3_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
TimerConfigure(TIMER4_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
TimerConfigure(TIMER5_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODIC | TIMER_CFG_B_PERIODIC);
//Enable Wait For Trigger
//TimerControlWaitOnTrigger(TIMER0_BASE, TIMER_B, true);
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER0_BASE, TIMER_A, 13000);
TimerLoadSet(TIMER0_BASE, TIMER_B, 10000); // 0.5 SEC
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER1_BASE, TIMER_A, 7000);
TimerLoadSet(TIMER1_BASE, TIMER_B, 4000); // 0.5 SEC
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER2_BASE, TIMER_A, 8000);
TimerLoadSet(TIMER2_BASE, TIMER_B, 5000); // 0.5 SEC
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER3_BASE, TIMER_A, 13000);
TimerLoadSet(TIMER3_BASE, TIMER_B, 10000); // 0.5 SEC
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER4_BASE, TIMER_A, 7000);
TimerLoadSet(TIMER4_BASE, TIMER_B, 4000); // 0.5 SEC
//Set Time Delays for Periodic Timers
TimerLoadSet(TIMER5_BASE, TIMER_A, 8000);
TimerLoadSet(TIMER5_BASE, TIMER_B, 5000); // 0.5 SEC
//Enable the TIMER0A AND TIMER0B interrupt on the processor (NVIC).
IntEnable(INT_TIMER0A);
IntEnable(INT_TIMER0B);
IntEnable(INT_TIMER1A);
IntEnable(INT_TIMER1B);
IntEnable(INT_TIMER2A);
IntEnable(INT_TIMER2B);
IntEnable(INT_TIMER3A);
IntEnable(INT_TIMER3B);
IntEnable(INT_TIMER4A);
IntEnable(INT_TIMER4B);
IntEnable(INT_TIMER5A);
IntEnable(INT_TIMER5B);
//Register Timer Interrupts
TimerIntRegister(TIMER0_BASE, TIMER_A, Timer0AIntHandler);
TimerIntRegister(TIMER0_BASE, TIMER_B, Timer0BIntHandler);
TimerIntRegister(TIMER1_BASE, TIMER_A, Timer1AIntHandler);
TimerIntRegister(TIMER1_BASE, TIMER_B, Timer1BIntHandler);
TimerIntRegister(TIMER2_BASE, TIMER_A, Timer2AIntHandler);
TimerIntRegister(TIMER2_BASE, TIMER_B, Timer2BIntHandler);
TimerIntRegister(TIMER3_BASE, TIMER_A, Timer3AIntHandler);
TimerIntRegister(TIMER3_BASE, TIMER_B, Timer3BIntHandler);
TimerIntRegister(TIMER4_BASE, TIMER_A, Timer4AIntHandler);
TimerIntRegister(TIMER4_BASE, TIMER_B, Timer4BIntHandler);
TimerIntRegister(TIMER5_BASE, TIMER_A, Timer5AIntHandler);
TimerIntRegister(TIMER5_BASE, TIMER_B, Timer5BIntHandler);
//Enable Timer Interrupts
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER1_BASE, TIMER_TIMB_TIMEOUT);
TimerIntEnable(TIMER2_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER2_BASE, TIMER_TIMB_TIMEOUT);
TimerIntEnable(TIMER3_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER3_BASE, TIMER_TIMB_TIMEOUT);
TimerIntEnable(TIMER4_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER4_BASE, TIMER_TIMB_TIMEOUT);
TimerIntEnable(TIMER5_BASE, TIMER_TIMA_TIMEOUT);
TimerIntEnable(TIMER5_BASE, TIMER_TIMB_TIMEOUT);
//Enable Timers
TimerEnable(TIMER0_BASE, TIMER_A);
Any suggestion as to what could be causing this behavior would be appreciated, thanks!
Peyton