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

gpio interrupt not work in nRF52832 + freertos

 My work need to use 4 gpio interrupt, but it not work when use freertos on nRF52832 ,sdk version 15.0.0. My code is like below:

err_code = nrf_drv_gpiote_init();

nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
in_config.pull = NRF_GPIO_PIN_PULLDOWN;
err_code = nrf_drv_gpiote_in_init(D_KEY, &in_config, pin_event_handler);
nrf_drv_gpiote_in_event_enable(D_KEY, true);

It never excutes function pin_event_handler, but this code can generate interrupt.  

nrf_gpio_cfg_sense_input(D_KEY, NRF_GPIO_PIN_PULLDOWN, NRF_GPIO_PIN_SENSE_HIGH);

So what error in my config? Or does it matters with freertos about interrupt config? 

Parents Reply Children
No Data
Related