Teensy 3.6 Synchronized Dual DAC DMA Possible ?

TomKatt

New member
Hello - long time Teensy user and forum lurker who just gained the confidence to post a question here ;-)

I am creating (yet another) oscilloscope vector display controller based upon the Teensy 3.6 using the onboard DACS to generate the XY vector signals. This requires that both DAC channels are updated simultaneously. I have been investigating the possibility of using DMA to offload some of the cpu burden, but it is unclear to me if DMA can be assigned to update both DAC channels at the same time. I have done quite a bit of Googling and forum searching, and while I have discovered several discussions on using DMA to update a single DAC channel, I do not believe that any of those discussions have targeted BOTH DAC's in a synchronized manner.

I apologize if I missed something in my searching and this has been addressed previously. Can anyone confirm this is possible, or would the DMA need to alternate between DAC channels (in which case DMA will not work for my issue).

Thanks very much in advance!

Tom
 
DMA alone can't do this, but I believe a way might exist.

Must admit, it's been quite a while since I've looked at Teensy 3.6 DACs. Reviewed the reference manual just now. Please take this only a vague tip towards the info, not any sort of authoritative answer.

The key ingredient is probably the DAC buffer and hardware trigger, mentioned on page 1046. To get both DACs to output new data at the exact same moment, you probably need to enable the buffer on both and use the same hardware trigger to cause both to update to the previously written buffer data at the exact same moment.

How exactly you would do all that, I'm not sure. Sadly, I just can't spend much time on discontinued Teensy 3.6. But hopefully this info from the reference manual at least helps you find a way.

1788368269479.png
 
Thanks for taking the time to look into this for me! Especially on an obsolete product ;-)

Yes, I did see the references to the DAC buffers needing to be enabled for synchronous updating (I haven't developed working code yet, but at least I understand the requirement). And while I suspected that DMA as implemented in the MK66FX1M0 on the 3.6 would not be capable of updating the pair in a single operation, it was definitely worth the inquiry ;-)

I'm sure I will come up with something - initial tests demonstrate that even manual updating will be sufficient for my needs, so DMA is a luxury and not a necessity for my project.

Thanks again and a belated thank you as well for creating these awesome boards!

Tom
 
Last edited:
Back
Top