PIT and DMA

Status
Not open for further replies.

floating.

Well-known member
As per PIT documentation:
37.1.2 Features
The main features of this block are:
• Ability of timers to generate DMA trigger pulses
• Ability of timers to generate interrupts
• Maskable interrupts
• Independent timeout periods for each timer

However, reading further, there is no more mention of DMA anywhere in the PIT chapter, and I fail to see how the PIT is connected to the DMA.
Is that just OR-ing SIM_SCGC6 to SIM_SCGC6_PIT instead of SIM_SCGC6_DMAMUX?
 
in K66 ref manual:
23.1.1: The PIT module can trigger a DMA transfer on the first four DMA channels. The assignments are detailed at PIT/DMA Periodic Trigger Assignments. See periodic trigger mode in 23.2

Then see 46.1.1 for mapping and selection.

I haven't tried it, someone did https://forum.pjrc.com/threads/31658-Generating-digital-waveforms-via-DMA-and-PIT (fails?)
and https://github.com/pierremolinaro/eDMA-demo/blob/master/PIT-eDMA-demo/PIT-eDMA-demo.ino works on T3.5/T3.6

IntervalTimer and Tone use PIT
 
Last edited:
Sorry, forgot to mention that I'm using a Teensy 3.2, but I'll look in the K66 manual to see if I can find a comparable section in the K20 manual.

I already looked at the intervaltimer source, but that only uses the PIT timer's ability to generate an interrupt.

Reading the previous post on DMA and PIT, looks to me the poster may not had much success; as for the github code they OR-d SIM_SCGC6_PIT and SIM_SCGC6_DMAMUX. Which might very well be the way to go.
 
Thanks, I got it now. Initially, I just looked at the initialization code, not the comments. But after reading everything, including the errata, looks to me not using the PIT for DMA triggering is probably the best option. Which is a shame, but it is what it is.
 
Status
Not open for further replies.
Back
Top