Thanks for the quick response, I appreciate any help I can get.
question is, am I performing the right method to initiate the one shot timer.
TIMER0_CTL_R |= TIMER_CTL_TAEN;
I have single stepped through the app it runs but not sure if the timer is actually counting.
1. After the code if you put a breakpoint on the Interrupt Handler, does the Breakpoint get reached
I put a RED LED to turn on, if the interrupt is serviced, never does
2. Does the GPIO if after all the configuration turn the LED's as expected.
if ((GPIO_PORTF_DATA_R & GPIO_0)== 0)
{
TIMER0_CTL_R |= TIMER_CTL_TAEN;
GPIO_PORTF_DATA_R |= green;
}
GPIO_PORTF_DATA_R &= ~(red); // reset off LEDS
GPIO_PORTF_DATA_R &= ~(green);
GPIO_PORTF_DATA_R &= ~(blue);
// delay_sec(1000);
}
the Green LED comes on when the SW0 is pressed so I know it gets there
One thing here is that while the Interrupt has been enabled and NVIC configured, you have to map the interrupt handler in the Interrupt Vector table as well.
IntDefaultHandler, // ADC Sequence 2 16
IntDefaultHandler, // ADC Sequence 3 17
IntDefaultHandler, // Watchdog timer 18
Timer0IntHandler, // Timer 0 subtimer A 19
IntDefaultHandler, // Timer 0 subtimer B 20
IntDefaultHandler, // Timer 1 subtimer A 21
IntDefaultHandler, // Timer 1 subtimer B 22
IntDefaultHandler, // Timer 2 subtimer A 23
As Kel mentioned it would be simpler doing it by using the examples and TIVAWare API's.
I prefer to do this method as I have more control over the processor, in addition it's more direct as opposed to being a bit cryptic when using API's. Also it reduces memory used, when the final version is compiled I can remove many of the header files and unnecessary " #define" files to reduce memory usage .
Regards
Roman