예제 #1
0
파일: board.c 프로젝트: Adilla/openwsn-fw
__interrupt void TIMERA0_ISR (void) {
   debugpins_isr_set();
   if (bsp_timer_isr()==KICK_SCHEDULER) {        // timer: 0
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
예제 #2
0
파일: board.c 프로젝트: Adilla/openwsn-fw
__interrupt void TIMERB1_ISR (void) {
   debugpins_isr_set();
   if (radiotimer_isr()==KICK_SCHEDULER) {       // radiotimer
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
예제 #3
0
파일: board.c 프로젝트: anemolif/openwsn-fw
__interrupt void USART1TX_ISR (void) {
   debugpins_isr_set();
   if (uart_isr_tx()==1) {                       // UART; TX
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
예제 #4
0
파일: board.c 프로젝트: Adilla/openwsn-fw
__interrupt void USART0RX_ISR (void) {
   debugpins_isr_set();
   if (spi_isr()==KICK_SCHEDULER) {              // SPI
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
예제 #5
0
파일: board.c 프로젝트: Adilla/openwsn-fw
__interrupt void USART1RX_ISR (void) {
   debugpins_isr_set();
   if (uart_rx_isr()==KICK_SCHEDULER) {          // UART: RX
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
예제 #6
0
/*******************************************************************************
* Function Name  : SPI1_IRQHandler
* Description    : This function handles SPI1 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void SPI1_IRQHandler(void)
{
  debugpins_isr_set();
  if(SPI_I2S_GetFlagStatus(SPI1,SPI_I2S_FLAG_RXNE) != RESET)
  {
    spi_isr();
  }
  debugpins_isr_clr();
}
예제 #7
0
/*
 * @brief tc4_cca1_callback  Timer module compare call back 
 *
 * @param module_instance stored timer module instance
 *
 */
void tc4_cca1_callback(void)
{
  debugpins_isr_set();
 if (radiotimer_vars.compare_cb != NULL) 
 {
	 radiotimer_vars.compare_cb();
 }	
 debugpins_isr_clr();
}
예제 #8
0
/*
 * @brief tc4_ovf_callback  Timer module overflow or 
 *        match frequency callback 
 *
 * @param module_instance stored timer module instance
 *
 */
void tc4_ovf_callback(void)
{
 debugpins_isr_set();
 if (radiotimer_vars.overflow_cb != NULL)
 {
  // call the callback
  radiotimer_vars.overflow_cb();
 }
 debugpins_isr_clr();
}
예제 #9
0
/*******************************************************************************
* Function Name  : RTCAlarm_IRQHandler
* Description    : This function handles RTC Alarm interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTCAlarm_IRQHandler(void)
{
  debugpins_isr_set();
  if(EXTI_GetITStatus(EXTI_Line17) != RESET)
  {
	EXTI_ClearITPendingBit(EXTI_Line17);
        radiotimer_isr();
  }
  debugpins_isr_clr();
}
예제 #10
0
/*******************************************************************************
* Function Name  : TIM2_IRQHandler
* Description    : This function handles TIM2 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void TIM2_IRQHandler(void)
{
  debugpins_isr_set();
  if(TIM_GetFlagStatus(TIM2,TIM_FLAG_CC1) != RESET)
  {
    TIM_ClearFlag(TIM2,TIM_FLAG_CC1);
    //leds_error_toggle();
    bsp_timer_isr();
  }
  debugpins_isr_clr();
}
예제 #11
0
/*******************************************************************************
* Function Name  : EXTI4_IRQHandler
* Description    : This function handles External interrupt Line 4 request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void EXTI4_IRQHandler(void)
{
  if(EXTI_GetITStatus(EXTI_Line4) != RESET){
    debugpins_isr_set();

    //leds_error_toggle();
    EXTI_ClearITPendingBit(EXTI_Line4);

    //RCC_Wakeup();
    radio_isr();

    debugpins_isr_clr();
  }
}
예제 #12
0
/*******************************************************************************
* Function Name  : EXTI15_10_IRQHandler
* Description    : This function handles External lines 15 to 10 interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void EXTI15_10_IRQHandler(void)
{
    debugpins_isr_set();
    if(EXTI_GetITStatus(EXTI_Line10) != RESET)
    {
      //leds_sync_toggle();
      EXTI_ClearITPendingBit(EXTI_Line10);
      //call RCC wake up here as we cannot include rcc at radio.c 
      //as brakes compatibility with other boards using atmel radio
      RCC_Wakeup();
      radio_isr();
    }
    debugpins_isr_clr();
}
예제 #13
0
/*******************************************************************************
* Function Name  : USART1_IRQHandler
* Description    : This function handles USART1 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USART1_IRQHandler(void)
{  
  debugpins_isr_set();
  if(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) != RESET)
  {
    USART_ClearFlag(USART1, USART_FLAG_RXNE);
    
    uart_rx_isr();
  }

  if(USART_GetFlagStatus(USART1, USART_FLAG_TXE) != RESET)
  { 
    uart_tx_isr(); 
  }
  debugpins_isr_clr();
}
예제 #14
0
파일: board.c 프로젝트: Babody/openwsn-fw
/*
 * This function is only called when the radio isr is executed and the MCU 
 * is either RUNNING or in WAIT state. 
 * In case that the MCU is in deep sleep (LLS mode), the LLWU is handling the
 * interrupt and consequently this function is not being call. For some reason,
 * the LLWU interrupt, does not trigger this interrupt function. In contrast the
 * LPTMR ISR is invoked right after the LLWU_isr in case the timer wake's up the MCU. 
 * 
 * So if you are working in LLS mode, then check LLWU_isr function in llwu.c file.
 * 
 */
void radio_external_port_c_isr(void) {
	uint32_t portc;
	debugpins_isr_set();
	portc=PORTC_ISFR;
	
	if ((PORTC_ISFR) & (RADIO_ISR_MASK)) {
		
		PORTC_ISFR |= RADIO_ISR_MASK; //clear isr flag
		PORTC_PCR5 |= PORT_PCR_ISF_MASK;    //clear flag
		radio_isr();
		//leds_debug_toggle();
	}else{
		while(1);
		//radio_isr();
	}		   
	debugpins_isr_clr();
}
예제 #15
0
/**
\brief The program starts executing here.
*/
int mote_main(void) {
   
   board_init();
   leds_error_on();
   
   debugpins_frame_set();    some_delay();
   debugpins_frame_toggle(); some_delay();
   debugpins_frame_toggle(); some_delay();
   debugpins_frame_clr();    some_delay();
   
   debugpins_slot_set();     some_delay();
   debugpins_slot_toggle();  some_delay();
   debugpins_slot_toggle();  some_delay();
   debugpins_slot_clr();     some_delay();
   
   debugpins_fsm_set();      some_delay();
   debugpins_fsm_toggle();   some_delay();
   debugpins_fsm_toggle();   some_delay();
   debugpins_fsm_clr();      some_delay();
   
   debugpins_task_set();     some_delay();
   debugpins_task_toggle();  some_delay();
   debugpins_task_toggle();  some_delay();
   debugpins_task_clr();     some_delay();
   
   debugpins_isr_set();      some_delay();
   debugpins_isr_toggle();   some_delay();
   debugpins_isr_toggle();   some_delay();
   debugpins_isr_clr();      some_delay();
   
   debugpins_radio_set();    some_delay();
   debugpins_radio_toggle(); some_delay();
   debugpins_radio_toggle(); some_delay();
   debugpins_radio_clr();    some_delay();
   
   board_reset();
   
   return 0;
}
예제 #16
0
파일: uart.c 프로젝트: iamecong/openwsn-fw
static void uart_isr_private(void){
	uint32_t reg;
	debugpins_isr_set();

	// Read interrupt source
	reg = UARTIntStatus(UART0_BASE, true);

	// Clear UART interrupt in the NVIC
	IntPendClear(INT_UART0);

	// Process TX interrupt
	if(reg & UART_INT_TX){
	     uart_tx_isr();
	}

	// Process RX interrupt
	if((reg & (UART_INT_RX)) || (reg & (UART_INT_RT))) {
		uart_rx_isr();
	}

	debugpins_isr_clr();
}
예제 #17
0
void bsp_timer_isr_private(void) {
	debugpins_isr_set();
	IntPendClear(INT_SMTIM);
	bsp_timer_isr();
	debugpins_isr_clr();
}
예제 #18
0
파일: board.c 프로젝트: Adilla/openwsn-fw
__interrupt void COMPARATORA_ISR (void) {
   debugpins_isr_set();
   __bic_SR_register_on_exit(CPUOFF);            // restart CPU
   debugpins_isr_clr();
}