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

about GPIOTE event

I'm developing a fingerprint-related project.
When the finger touches, the fingerprint sensor generates a pulse signal.
NRF52810 will triggers a GPIOTE callback, then wakeup and start BLE advertisement.

When finger touches, the problem is,
a. The oscilloscope always can display the pulse waveforms
b. But the GPIOTE callback has the probability of being locked up
c. Once locked up, the GPIOTE callback event never happen again, until reset

A lot of testing work shows that, this problem is easy to occur when UART/UARTE is used.

What I want to ask is, how to configure it to ensure that GPIOTE event will happen? Thanks!

Parents Reply
  • Only one pin using GPIOTE,

    static void _wakeup_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
    {
    
    	_pin_flag = true;
    	
    }
    
    	
    void init(void)
    {
    	
    	nrf_drv_gpiote_in_config_t cfg = GPIOTE_CONFIG_IN_SENSE_HITOLO(false);
    	
    	nrf_drv_gpiote_init();
    	cfg.pull = NRF_GPIO_PIN_PULLUP;
    	nrf_drv_gpiote_in_init(_WAKEUP_PIN, &cfg, _wakeup_pin_handler);
    	nrf_drv_gpiote_in_event_enable(_WAKEUP_PIN, true);
    
    }	
    	
    
    void proc(void)
    {
    
    	if(_pin_flag){
    		wakeup();
    		_pin_flag = false;
    	}
    	
    }

Children
Related