Is it possible to have a NRF52 GPIO pin that set/cleared using two GPIOTE tasks respectivly

300 views Asked by At

I would like to have an nrf52832 GPIO pin that has two GPIOTE tasks, one that sets it and one that clears it. Is it possible or is each GPIO pin restricted to a single GPIOTE controlling task (which doesn't make sense to me).

Motivation, having a timer with two compare registers, cc1=5 and cc2=20 such that cc1 clears the GPIO pin and cc2 sets the same GPIO pin and reset the timer.

1

There are 1 answers

0
zapta On

Answering my own question. Yes, it's possible. I tried to achieve that with two GPIOTE channels, one for setting and one for clearing the pin but only a single channel can be used for each pin.

Instead, use a single channel and use the predefined SET/CLR tasks in that