/** * This is the timer interrupt service routine. * */ void rt_hw_timer_handler(void) { /* enter interrupt */ rt_interrupt_enter(); #if 0 //USE_STM32_IWDG /* Reloads IWDG counter with value defined in the reload register */ /* #define KR_KEY_Reload ((uint16_t)0xAAAA) */ IWDG->KR = 0xAAAA; #endif #if USE_STM32_WWDG extern volatile int is_need_fed_wwdg; if (0 != is_need_fed_wwdg) WWDG->CR = WWDG_RELOAD_VALUE; #endif rt_tick_increase(); #ifdef RT_USING_LWIP extern void snmp_inc_sysuptime(void); snmp_inc_sysuptime(); #endif /* leave interrupt */ rt_interrupt_leave(); }
/** * This is the OST timer interrupt service routine. */ void rt_hw_ost_handler(void) { /* increase a OS tick */ rt_tick_increase(); /* clear flag */ REG_OSTFR = 0; }
void DecrementerPITException(struct pt_regs *regs) { /* reset PIT interrupt */ set_tsr(0x08000000); /* increase a OS Tick */ rt_tick_increase(); }
/** * This is the timer interrupt service routine. * */ interrupt void cpu_timer2_isr(void) { CpuTimer2Regs.TCR.all = 0xC000; /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); }
void rt_timer_handler(int vector) { #ifdef BOARD_DEBUG rt_kprintf("timer handler, increase a tick\n"); #endif T0IR |= 0x01; /* clear interrupt flag */ rt_tick_increase(); VICVectAddr = 0; /* Acknowledge Interrupt */ }
/** * This is the timer interrupt service routine. * */ void SysTick_Handler(void) { /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); }
/** * This is the timer interrupt service routine. */ void rt_hw_timer_handler() { /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); }
/** * This is the timer interrupt service routine. * */ void rt_hw_timer_handler(void) { /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); rt_hw_interrupt_thread_switch(); }
/** * This is the timer interrupt service routine. */ void rt_hw_timer_handler() { unsigned int count; count = read_c0_compare(); write_c0_compare(count); write_c0_count(0); /* increase a OS tick */ rt_tick_increase(); }
/** * This is the timer interrupt service routine. * */ void SysTick_Handler(void) { /* clean timer device pending*/ hal_timer_irq_clear(1); /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); }
/** * This is the timer interrupt service routine. * */ void SysTick_Handler(void) { /* enter interrupt */ rt_interrupt_enter(); /* tick for HAL Library */ HAL_IncTick(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); }
/* isr return value: 1, should not be masked, if 0, can be masked */ static int tick_interrupt_isr(void) { TRACE("isr: systick enter!\n"); /* enter interrupt */ rt_interrupt_enter(); rt_tick_increase(); /* leave interrupt */ rt_interrupt_leave(); TRACE("isr: systick leave!\n"); return 0; }
/** * This function will handle rtos timer */ void rt_timer_handler(int vector) { #ifdef USE_DBGU if (at91_sys_read(AT91_DBGU + AT91_US_CSR) & 0x1) { //rt_kprintf("DBGU interrupt occur\n"); rt_serial_handler(1); } #endif if (at91_sys_read(AT91_PIT_SR) & AT91_PIT_PITS) { unsigned nr_ticks; /* Get number of ticks performed before irq, and ack it */ nr_ticks = PIT_PICNT(at91_sys_read(AT91_PIT_PIVR)); rt_tick_increase(); } }
void do_irq(void) { unsigned short peri_int_sts; peri_int_sts = rCPU.periIntrStatus.all; /* clear peripheral interrupt */ rCPU.periIntrStatus.all |= peri_int_sts; if (peri_int_sts & 0x0100) { /* timer0 interrupt */ rt_tick_increase(); } }
/** * This is the timer interrupt service routine. * @param vector the irq number for timer */ void rt_hw_timer_handler(int vector, void* param) { if (AT91C_BASE_PITC->PITC_PISR & 0x01) { /* increase a tick */ rt_tick_increase(); /* ack interrupt */ AT91C_BASE_AIC->AIC_EOICR = AT91C_BASE_PITC->PITC_PIVR; } else { /* end of interrupt */ AT91C_BASE_AIC->AIC_EOICR = 0; } }
void rt_systick_handler(void) { clear_csr(mie, MIP_MTIP); // Reset the timer for 3s in the future. // This also clears the existing timer interrupt. volatile uint64_t * mtime = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIME); volatile uint64_t * mtimecmp = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIMECMP); uint64_t now = *mtime; uint64_t then = now + 2 * RTC_FREQ/RT_TICK_PER_SECOND; *mtimecmp = then; rt_tick_increase(); // read the current value of the LEDS and invert them. /* GPIO_REG(GPIO_OUTPUT_VAL) ^= ((0x1 << RED_LED_OFFSET) | (0x1 << GREEN_LED_OFFSET) | (0x1 << BLUE_LED_OFFSET)); */ // Re-enable the timer interrupt. set_csr(mie, MIP_MTIP); }
void rt_timer_handler(int vector, void* param) { T0IR |= 0x01; /* clear interrupt flag */ rt_tick_increase(); VICVectAddr = 0; /* Acknowledge Interrupt */ }
static void rt_hw_timer_isr(int vector, void *param) { rt_tick_increase(); epit_get_compare_event(HW_EPIT1); }
static void rt_timer_handler(int vector, void *param) { rt_tick_increase(); }
static void rt_hw_timer_isr(int vector, void *param) { arc_timer_int_clear(BOARD_OS_TIMER_ID); rt_tick_increase(); }