how to use nRF5340 GPIO capture a rising edge or high event
how to use nRF5340 GPIO capture a rising edge or high event
Take a look at the sample <ncs location>/zephyr/sample/basic/button how this can be achieved. The third argument of gpio_pin_interrupt_configure(..) configures how the GPIO interrupt should be triggered. Take a look at zephyr/include/drivers/gpio.h to see the different trigger options, and use any of the options starting with GPIO_INT.
The button sample will use the gpio_nrfx.c driver under the hood, which will use the GPIOTE peripheral to generate events on GPIO changes.
If you would like to use GPIOTE in combination with PPI, you could check out the following sample:
https://github.com/nrfconnect/sdk-zephyr/tree/v2.4.99-ncs2/samples/boards/nrf/nrfx
Best regards,
Simon