Generating precise non periodic digital waveform using MCF52235 MPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generating precise non periodic digital waveform using MCF52235 MPU

1,105 Views
ariaveta
Contributor I
Hello,

I need to generate a digital non periodic waveform on an output pin of the MCF 52235 MPU and CW 6.3.

First, I tried using QSPI, but i discovered that I cannot generate burst longer than 16 pulses without delays between them; then I tried disabling interrupts and using GPIO driven from assembler instructions... but, again, no luck because the GPIO module clock is not correlated with main processor clock, so there is a random skew in the generated waveform (2 or 4 CPU clock skew).

Now, I'm trying using DMA timer.. I plan to store the waveform in RAM as a buffer of delays, then start the timer and allow it to read  the counter register from the buffer using DMA. This way, maybe, I'll get the waveform. But there's no code example showing how to use DMA timers. I searched the documentation and the forum and I found nothing.

Could someone please help me, maybe posting some code fragment?

Any suggestion will be appreciated,
Thanks,
Marco
Labels (1)
0 Kudos
1 Reply

274 Views
bkatt
Contributor IV
It seems that the General Purpose Timer (GPT) is designed to do this sort of thing, not the DMA timer. I don't have any code for you, but I think you would set it up to toggle on output compare, then go into a loop or interrupt sequence that waits for the timer compare event, then adds the next delay interval to the compare register.
0 Kudos