static i32 hwt32_stop(struct hw_timer32* hwt) { u32 status = 0; MAP_TimerDisable(hwt->base_addr, TIMER_A); MAP_TimerIntDisable(hwt->base_addr, hwt->irq_mask); status = MAP_TimerIntStatus(hwt->base_addr, true); MAP_TimerIntClear(hwt->base_addr, status); TimerValueSet(hwt->base_addr,TIMER_A,0x0); hwt32_set_op_mode(hwt, HW_TIMER_NOT_USED); hwt->irq_mask = 0; hwt->n_rollovers = 0; hwt->sw_early_ro = false; hwt->mtone_expy.hi_32 = 0; hwt->mtone_expy.lo_32 = 0; return 0; }
//***************************************************************************** // //! \PerformIntTest //! //! Performs the repeated steps in running each test scenario. //! //! \param ucPriorityA0 is the interrupt priority to be used for Timer A0 //! \param ucPriorityA1 is the interrupt priority to be used for Timer A1 //! \param ucPriorityA2 is the interrupt priority to be used for Timer A2 //! //! This function performs all the steps which are common to each test scenario //! inside function InterruptTest. //! //! \return None. // //***************************************************************************** tBoolean PerformIntTest(unsigned long ulPriBits, unsigned char ucPriorityA0, unsigned char ucPriorityA1,unsigned char ucPriorityA2) { tBoolean bRetcode; unsigned long ulStatus; // // Set the appropriate interrupt priorities. // MAP_IntPriorityGroupingSet(ulPriBits); MAP_IntPrioritySet(INT_TIMERA0A, ucPriorityA0); MAP_IntPrioritySet(INT_TIMERA1A, ucPriorityA1); MAP_IntPrioritySet(INT_TIMERA2A, ucPriorityA2); // // Clear any pending timer interrupts // ulStatus = MAP_TimerIntStatus(TIMERA0_BASE, false); MAP_TimerIntClear(TIMERA0_BASE, ulStatus); ulStatus = MAP_TimerIntStatus(TIMERA1_BASE, false); MAP_TimerIntClear(TIMERA1_BASE, ulStatus); ulStatus = MAP_TimerIntStatus(TIMERA2_BASE, false); MAP_TimerIntClear(TIMERA2_BASE, ulStatus); // // Clear all the counters and flags used by the interrupt handlers. // g_ulA0IntCount = 0; g_ulA1IntCount = 0; g_ulA2IntCount=0; g_bA1CountChanged = false; // // Enable three timer interrupts // MAP_TimerIntEnable(TIMERA0_BASE, TIMER_TIMA_TIMEOUT); MAP_TimerIntEnable(TIMERA1_BASE, TIMER_TIMA_TIMEOUT); MAP_TimerIntEnable(TIMERA2_BASE, TIMER_TIMA_TIMEOUT); // // Enable Timer A0 // MAP_TimerEnable(TIMERA0_BASE, TIMER_A); // // Wait for Timer 0/A to fire. // bRetcode = UTUtilsWaitForCount(&g_ulA0IntCount, 1, ((SLOW_TIMER_DELAY_uS*3)/1000)); // // Stop All timers and disable their interrupts // MAP_TimerDisable(TIMERA2_BASE, TIMER_A); MAP_TimerDisable(TIMERA1_BASE, TIMER_A); MAP_TimerDisable(TIMERA0_BASE, TIMER_A); MAP_TimerIntDisable(TIMERA2_BASE, TIMER_TIMA_TIMEOUT); MAP_TimerIntDisable(TIMERA1_BASE, TIMER_TIMA_TIMEOUT); MAP_TimerIntDisable(TIMERA0_BASE, TIMER_TIMA_TIMEOUT); return(bRetcode); }
static void EmitStop(void) { // Disable GPT MAP_TimerDisable(s_ulTimerEmitCtrl,TIMER_A); }
// turn off the interrupts but don't turn of the timer because may // be in use for pwm. void OneMsTaskTimer::stop() { // disable interrupt MAP_TimerIntDisable(g_ulBase, TIMER_TIMA_TIMEOUT); MAP_TimerDisable(g_ulBase, TIMER_A); }
void hw_timer0a_stop() { MAP_TimerDisable(TIMER0_BASE, TIMER_A); }