DMA on kinetis k64

Discussion created by stefanobizzari on Oct 11, 2016
Latest reply on Oct 19, 2016 by isaacavila

I'm using a kinetis k64 microcontroller. In particular a MK64FN1M0VLQ12 part.

I need to transfer a lot of datas from memory to a peripheral (a video controller).

The videocontroller just need a simple initialization in order to specify the video area and then just a write pin to confirm the data.

So what I'm trying to do is to use a pwm in order to toggle a pin and, this pwm, is an hw trigger for a DMA channel that fetch the data and put it on the desired port.

The data size is of 2 bytes so the transaction count for the minor loop is 1 (2 bytes per request).
It works correctly except the fact that the major loop (as far as I have seen) is limited to 32767 transitions. What can I do if I need to transfer more datas?

I can try to re-iterate 32k transfer controlling the video size accordingly. But, in this way, the speed is reduced (every time I need to set the video size to 32767 pixels, start a new transfer etc etc).


I've seen that I can link one or more channels each other. However I've not understand how the linked channel can start "automatically"... I mean, in processor expert I've seen that there an option to link another channel at the end of a complete transfer which is great except the fact that it seems that it doesn't start the second channel.


I've attached a picture of my dma linking configuration.. What I miss in your opinion?


And, a part of this, is there an easier way to do what I need? Maybe I'm trying to do all in a very complicated way and there is an easier solution. I'm a very newbie regarding DMA transfer so I'm afraid that I'm trying an overcomplicated solution for my problem.