This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[nRF51422] Sense mechanism - detect more than one pin

Is there any possibility to detect active state on the more than one pin using sense mechanism? GPIOTE_IRQHandler is blocked when it detect active state on the one of the used pins. How to deal with it?

Parents
  • It's not clear for me. Could you modify example code in attached file?

    
    void GPIOTE_IRQHandler(void)
    {
        if ((NRF_GPIOTE->EVENTS_PORT != 0) && (NRF_GPIOTE->INTENSET &         GPIOTE_INTENSET_PORT_Msk))
        {
    	NRF_GPIOTE->EVENTS_PORT = 0;		
    
    	if(nrf_gpio_pin_read(PIN_1)==1)
    	{
    		flag_1=true;													
    	}	 
    	
     	if(nrf_gpio_pin_read(PIN_2)==1)					
     	{
     		flag_2=true;
    	}		
    	
    	if(nrf_gpio_pin_read(PIN_3)==1)			 		
    	{
    		flag_3=true;
    	}
        }
    }
    
    
    
    
Reply
  • It's not clear for me. Could you modify example code in attached file?

    
    void GPIOTE_IRQHandler(void)
    {
        if ((NRF_GPIOTE->EVENTS_PORT != 0) && (NRF_GPIOTE->INTENSET &         GPIOTE_INTENSET_PORT_Msk))
        {
    	NRF_GPIOTE->EVENTS_PORT = 0;		
    
    	if(nrf_gpio_pin_read(PIN_1)==1)
    	{
    		flag_1=true;													
    	}	 
    	
     	if(nrf_gpio_pin_read(PIN_2)==1)					
     	{
     		flag_2=true;
    	}		
    	
    	if(nrf_gpio_pin_read(PIN_3)==1)			 		
    	{
    		flag_3=true;
    	}
        }
    }
    
    
    
    
Children
Related