//Stop the timer, update the frequency, and turn it back on void throttle_timer(unsigned int freq) { timer_off(); init_time_chip(freq); //Full throttle is 596591 timer_on(); installInterrupt(TIMER_INT_NUM, &_handle_timerInt, 3); //Make sure the normal handler is installed }
u32 CDUT_MBIST_IF::WaitForDone_WithTimeOut(u32 nus) { timer_on_us(nus); volatile u32 timeOutFlag = 0; do { timeOutFlag = is_timeout(); } while(!done.Read() && !timeOutFlag); timer_off(); return timeOutFlag; }
void timerZero(int aigInt) { cntResets++; // Do not interfere with functioncall! if(theDebugCodeClass.state == debugCode::DST_FUNCTIONEXECUTE) { // Retart timeout to postpone the hard stop timer_set(TIMER_MAT_DEBUG, TIMER_MAT_DEBUG); timer_on(); } else { theDebugCodeClass.setBack(); timer_off(); } }
void ISR_timer (void) { timer_off(); Count++; signal = (float)Receiver_Signal(); if (aux_led == 0) { aux_led = 1; //encender_led(LED_RGB_v); } else if (aux_led ==1) { aux_led = 0; //apagar_led(LED_RGB_v); } aux_led; }
u32 CTest::WaitForRFIRQ_WithTimeOut(u32 nus) { timer_on_us(nus); volatile u32 timeOutFlag = 0; do { timeOutFlag = is_timeout(); } while((m_dut.rf.flag.data_received == RESET) && (m_dut.rf.flag.data_lost == RESET) && (m_dut.rf.flag.data_sent == RESET) && !timeOutFlag); timer_off(); if (timeOutFlag) m_test_res = TEST_RES_FAIL; else if (m_dut.rf.flag.data_lost == SET) m_test_res = TEST_RES_FAIL; else m_test_res = TEST_RES_PASS; return 0; }
// ----------------------------------------------------------------------- int timer_init(struct cfg_em400 *cfg) { timer_step = cfg->timer_step; if ((timer_step < 2) || (timer_step > 100)) { return E_TIMER_VALUE; } LOG(L_CPU, 1, "Timer cycle: %i ms", timer_step); if (cfg->timer_start) { timer_on(); } else { timer_off(); } sem_init(&timer_quit, 0, 0); if (pthread_create(&timer_th, NULL, timer_thread, NULL)) { return E_THREAD; } return E_OK; }
void ISR_timer (void) { timer_off(); Count++; }