This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Read gpio state on event

Hi,

I'm implementing quadrature encoder to read motor speed/position. So far I configured a gpio pin where A channel of the quadrature encoder is connected to capture timer value on toggle using gpiote, ppi and timer.

Now I would like also to capture state of gpio pin where B channel of the quadrature encoder is connected on same event (toggle of A channel) to be able to resolve direction of the motor. I can't simply read the state of the B channel using nrf_gpio_pin_read in an event or interrupt routine as this is not guaranteed to be real time (softdevice is running).

Is that possible, using e.g. gpiote, ppi, dma ... ?

Parents Reply Children
No Data
Related