Hi,
I have three Pins which are used as Port event interrupt source.(low-accuracy)
In some cases If I generate some interrupts (maybe 2 every second but random on at least two of the pins) something happens and then no interrpt handler is called any more.
nrfx_gpiote_irq_handler which is the default handler is called until this error happens. Then there are no further calls.. The main loop still is running and can log to RTT Viewer. I wasn't able to get this error while debugging with Keil uVision.
I have also seen, that additional traffic on SPI can produce this faster.
If I try to enable the interrupt again I got INVALID_STATE from nrfx_gpiote_in_init ( because pin_in_use_by_gpiote is true) (Code below)
I also tried to ignore this and re-enable the interrupt anyway but that didn't work.
I read on the DevZone and manual, that if the pin is pulled during handler routine it may get lost or something. But I did not understand, that this means all following interrupts are lost too.
My Softdevice/SDK is 15.3
Any Ideas how to get around this?
nrfx_gpiote_in_config_t gpiote_in_config; memset(&gpiote_in_config, 0, sizeof(gpiote_in_config)); gpiote_in_config.hi_accuracy = false; gpiote_in_config.is_watcher = false; gpiote_in_config.pull = NRF_GPIO_PIN_PULLDOWN; gpiote_in_config.sense = NRF_GPIOTE_POLARITY_LOTOHI; err_code = nrfx_gpiote_in_init(LIS2DH_INT2, &gpiote_in_config, lis2dh_INT2_gpiote_evt_handler_shake); APP_ERROR_CHECK(err_code); nrfx_gpiote_in_event_enable(LIS2DH_INT2, true);