The first time that I enter a timer based interrupt it seems like I have a large stack. The interrupt is the Task1ms and my breakpoint is at the top of the function:
Here is the memory view:
This function is a timer based task (1ms) that is called when Timer A timeouts; this is all configured in InitTImers function:
// Timer 2 = 1ms SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER2); TimerConfigure (TIMER2_BASE,TIMER_CFG_32_BIT_PER); TimerLoadSet (TIMER2_BASE,TIMER_A,ONE_KHZ); TimerIntRegister(TIMER2_BASE,TIMER_A, Task1ms); TimerIntClear (TIMER2_BASE,TIMER_TIMA_TIMEOUT); TimerIntEnable (TIMER2_BASE,TIMER_TIMA_TIMEOUT); TimerEnable (TIMER2_BASE,TIMER_A);
So... why is this happening? Interestingly, the stack is only like this when in the context of the Task1ms... back in the main loop (or other interrupt handlers) the stack is not like this.