I'm using 4 different timers but they are all initialized in the same manner. In the code below, I only included one of the Case statements that shows how the peripheral is enabled. (The other 3 are the same). The bottom part of the code shows the actual initialization. Looking at the screen shots I sent you, the TAILD bit is set to 0 so I would expect to see the clock being reset on the next timing cycle. As I mentioned in my last post, I tried keeping the timer enabled but I still didn't see the count value reset as I would expect. The only method I have found that has worked somewhat effective is by writing the TIMER_O_TAV value to 0x00000001 and looping until it changes. For the timer reset code, I'd like to implement the best practices for this processor so the timer can remain enabled or disabled. Thanks again for the help, Joe //== Measurement Timer [TIMER3 A] == //This timer is used to indicate when the ISO_SPARE1 line should be toggled. //This timer sets the measurement duty cycle of the sensors. case MEASUREMENT_TIMER: ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER3); //-- Make sure the Timer3 peripheral is Ready while ( !(ROM_SysCtlPeripheralReady(SYSCTL_PERIPH_TIMER3) || g_dwEventHandler. s_dwEventHandler . ERROR_TimeoutOp ) ) { } break ; default : return ; } // Configure Timer A as a 32-bit periodic timer. TimerConfigure (dwBaseAddress, TIMER_CFG_PERIODIC_UP); //Set Timer to run off of the Precision Internal Oscillator (16MHz) TimerClockSourceSet (dwBaseAddress, 0x00000000 | TIMER_CLOCK_PIOSC ); //Set Timer A interval TimerLoadSet (dwBaseAddress, TIMER_A, dwTimerValue); //Ensure the Timer Interrupt Flag is cleared. TimerIntClear (dwBaseAddress, TIMER_TIMA_TIMEOUT); #if DIRECTIVE_REMOVE_MSG_TIMER == TIMER_ON HWREG(dwBaseAddress + TIMER_O_CTL) |= TASTALL; #endif //Configure Timer A interrupt for timer timeout. TimerIntEnable (dwBaseAddress,TIMER_TIMA_TIMEOUT);
↧