Hi,
I need to enable the ADC read and GPIO pin toggling to happen simultaneously at high precision, without using the MCU resources, approximately 15 us interval. After searching through this forum, I realized the only way to achieve this precision is to use DPPI in the nrfx drivers directly, instead of using the Zephyr drivers.
I successfully enabled the timer1 that triggers the ADC read configured in the DPPI, and another set of code to use the same timer that toggles the GPIO pin also configured in the DPPI but I cannot set them together. Here are snippets of my code for configuring DPPI:
In the API reference, DPPI does not allow one task or event to associate with more than one channel. In my case, ideally, I would like to toggle the GPIO pin based on the timer1 and also triggers the ADC read every time the GPIO toggles, at the rising edge and falling edge.
Can you suggest a method to seamlessly enable the ADC read and GPIO pin toggling with the timer1 configured in DPPI? Maybe there is a way to set a GPIO pin to the PWM based on the timer1 while triggering the ADC read in DPPI?
Thanks!