Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: PIT and DMA

  1. #1

    PIT and DMA

    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?

  2. #2
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    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 (fails?)
    and works on T3.5/T3.6

    IntervalTimer and Tone use PIT
    Last edited by manitou; 05-04-2018 at 07:29 PM.

  3. #3
    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.

  4. #4
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Note, the github sketch explicity says the PIT DMA fails for the T3.1/T3.2

    I confirmed the sketch worked on T3.5 and failed on T3.2

  5. #5
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts