I tried to use pin_change_example in SDK to catch Interrupts (at first line) but I'm missing lots of them, I don't want to use PPI mechanism I just want to run my ISR in time.
Is it possible? I spent my 3 weeks to find a solution but there is nothing.. Please help me .
Thanks
Source code:
#include <stdbool.h> #include "nrf.h" #include "nrf_drv_gpiote.h" #include "app_error.h" #include "nrf_delay.h" #include "boards.h" #define PIN_SCL 26 #define PIN_OUT2 28 void in_pin_scl_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { nrf_gpio_pin_set(PIN_OUT2); nrf_gpio_pin_clear(PIN_OUT2); } static void gpio_init(void) { ret_code_t err_code; if(!nrf_drv_gpiote_is_init()) { err_code = nrf_drv_gpiote_init(); APP_ERROR_CHECK(err_code); } nrf_drv_gpiote_in_config_t in_config2 = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true); in_config2.pull = NRF_GPIO_PIN_PULLUP; err_code = nrf_drv_gpiote_in_init(PIN_SCL, &in_config2, in_pin_scl_handler); APP_ERROR_CHECK(err_code); nrf_drv_gpiote_in_event_enable(PIN_SCL, true); nrf_gpio_cfg_output(PIN_OUT2); } /** * @brief Function for application main entry. */ int main(void) { gpio_init(); while (true) { } } /** @} */
Config file is almost the same with pin_change_int. I tried changing
It wasn't successful.