Hi,
I'm trying to use to gpio pins in order to wake up a system from sleep mode.(PIN1= P0.24 PIN2 =P1.1 )
If I use the GPIOTEs separately in my project, it works and sytem wakes up, but if I use both GPIOTEs at the same time, it doesnt work.
below is my code:
void bma400_int_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { NRF_LOG_INFO("Activity detected"); } void check_pod_handle(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { NRF_LOG_INFO("check pod detected"); } void gpiote_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_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true); in_config.pull = NRF_GPIO_PIN_NOPULL; err_code = nrf_drv_gpiote_in_init(BMA400_INT, &in_config, bma400_int_handler); APP_ERROR_CHECK(err_code); err_code = nrf_drv_gpiote_in_init(CHECK_POD_PIN, &in_config, check_pod_handle); APP_ERROR_CHECK(err_code); nrf_drv_gpiote_in_event_enable(BMA400_INT, true); nrf_drv_gpiote_in_event_enable(CHECK_POD_PIN, true); nrf_gpio_cfg_sense_input(BMA400_INT, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW); nrf_gpio_cfg_sense_input(CHECK_POD_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW); }
i am using nrf52840, sdk 17.02, custom board,segger embedded studio
Can you help with setting up those pins for wake-up?
Thanks
Emrah