GPIO port input in low power mode [closed]

asked 2017-09-24 20:25:18 +0100

Hello, I'm new to the Nordic SDK and I would like to ask you for help with implementation of PORT events for revision < 3 in "low power" mode instead of "high power" mode. I have following implementation to check the gpio input button:

void init_gpio_button()
  nrf_gpio_cfg_input(GPIO_BUTTON, NRF_GPIO_PIN_PULLUP);

  uint32_t err_code = nrf_drv_gpiote_init();

  nrf_drv_gpiote_in_config_t btn = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
  btn.pull = NRF_GPIO_PIN_PULLUP;

  err_code = nrf_drv_gpiote_in_init(GPIO_BUTTON, &btn, btn_handler_isr);

  nrf_drv_gpiote_in_event_enable(GPIO_BUTTON, true);

Please, how to convert this code to "low power"? Is it enough to configure GPIOTE_CONFIG_IN_SENSE_HITOLO.hi_accuracy = false?

Thank you for any help.

edit retag flag offensive reopen delete report spam

Closed as "duplicate question" by Sigurd at 2017-09-25 10:54:46 +0100