Hello,
I'm using the PWM peripheral to generate a waveform. The waveform is loaded into RAM and then I use the SEQ[n].PTR and SEQ[n].CNT registers to set up the DMA. The output is working quite nicely.
In my application, though, there has arose the need to determine where in the particular sequence based on actions happening outside of the PWM. Is there a way to read the values of COMP[N] and/or COUNTERTOP from figure 141 of nRF52832_PS v1.4 or to figure out where the DMA is currently pointing?
Let me demonstrate with some generic example. Assume I want to generate the following waveform with the PWM:
I configure the DMA to point to the waveform:
And start the PWM
Let's say that while the PWM is outputting COMP0[3], my application wants to know the current state of the PWM. Is there a way to read what values are loaded into the DMA or where the DMA is currently pointed?