eDMA subsytem compatibility across Kinetis?

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

eDMA subsytem compatibility across Kinetis?

664 Views
davenadler
Senior Contributor I

Is the eDMA subsystem compatible across all Kinetis K parts?
What about all Kinetis parts?

By "compatible" I mean provides the same capabilities (TCD structure, major/minor loops, chaining, etc.).

Thanks in advance,
Best Regards, Dave

Tags (2)
0 Kudos
3 Replies

468 Views
mjbcswitzerland
Specialist V

David

The eDMA is basically compatible across all Kinetis parts with eDMA (including some newer KL parts like KL82 and KL28).

Slight differences (but same features on each channel) are that
- some have 2 groups
- some have 8 channels instead of 16

- devices with TRGMUX use a different method of connecting peripheral triggers

I don't know of any more from experience.

Regards

Mark

468 Views
davenadler
Senior Contributor I

Thanks Mark. We've used the K64F for a couple of products, and got the eDMA to do a number of tricks to avoid CPU processing until data is ready in RAM (via SPI, used DMA chaining, looping, timer interactions, etc). Hoping to do similar for another product, but need lower pin-count (and no Ethernet, no USB). Wondering if there's another Kinetis that would work, as many other vendor MCU (including LPC series) don't have adequate SPI (20-bit frame etc) and/or DMA capabilities... Thanks again,
Best Regards, Dave

0 Kudos

468 Views
mjbcswitzerland
Specialist V

David

Any part with eDMA will allow you to essentially use the same code (only the DMAMUX channels can change but if you do it with defines and not fixed number it will be portable.

I have used identical eDMA code in many projects/product development on over 50 different K/KM/KV/KW (and some KL) parts with eDMA.

In the uTasker project the DMA driver is in fact compatible also with KL parts that have a different DMA controller with reduced functionality (it emulates half buffer interrupts for example) so that the application layer doesn't need to know and such code essentially operate on any part with DMA (the simpler DMA controller needs modulo aligned buffers for free-running operation which is a bit of a pain in comparison to the much more able eDMA).

I have attached its DMA HAL layer as reference (DMA operation is simulated in the uTasker project so all is operational in VisualStudio, which removes guessing as most errors or incorrect usage is flagged immediately). It also includes memset() ,memcpy() and reverse copy routines using DMA (I tend to reserve 2 DMA channels for this - one that is used by user code and a second that is used by interrupt context code (so that two such MEM->MEM operations can work in parallel)). They also do alignment optimisation since this can make transfers MUCH faster if buffers are otherwise not on boundaries.

Regards

Mark

P.S. K1x series sounds best for you since it has eDMA without USB and Ethernet.

P.P.S. A further difference with some eDMA operation is that some processors share pairs of channel interrupts (but easy to handle in a compatible way)