In the nrf_drv_gpiote in SDK 11.0, I can only find a function to get the address of the out task for a gpiote channel. Shouldn't there be a similar function to get the addresses of the set and clear tasks, or am I missing something?
In the nrf_drv_gpiote in SDK 11.0, I can only find a function to get the address of the out task for a gpiote channel. Shouldn't there be a similar function to get the addresses of the set and clear tasks, or am I missing something?
Hi,
The function nrf_drv_gpiote_out_task_addr_get()
return the address of the task, which you can use to configure PPI or control the task manually. You can take a look at the function led_blinking_setup()
in the GPIOTE example. Here GPIOTE is used to connect a timer to a GPIO port, using PPI, to toggle a LED. Toggle is selected by configuring the GPIOTE pin using GPIOTE_CONFIG_OUT_TASK_TOGGLE
. It would also have been possible to set or clear the GPIO by configuring the pin using GPIOTE_CONFIG_OUT_TASK_LOW
or GPIOTE_CONFIG_OUT_TASK_HIGH
.
Best regards,
Jørgen
Hi,
as I understand these functions, nrf_drv_gpiote_out_task_addr_get() gives the address of the OUT task. And the OUT task can be configured to toggle, set or clear a pin. But there are also dedicated SET and CLR tasks with their own address for PPI usage. I need these addresses in PPI to configure different events triggering set and clear tasks through the same GPIOTE channel. This seems to work if I enter the addresses manually, but I could'nt find any function to get these addresses in the SDK.
Hi,
as I understand these functions, nrf_drv_gpiote_out_task_addr_get() gives the address of the OUT task. And the OUT task can be configured to toggle, set or clear a pin. But there are also dedicated SET and CLR tasks with their own address for PPI usage. I need these addresses in PPI to configure different events triggering set and clear tasks through the same GPIOTE channel. This seems to work if I enter the addresses manually, but I could'nt find any function to get these addresses in the SDK.