Tuesday, September 27

PIC32 DMA SPI

[Mike] wanted to drive several SPI peripheral from a PIC32. He shows how much latency his conventional interrupt handlers were taking away from his main task. He needed something more efficient. So he created the SPI channels using DMA. He also made a video (see below) with a very clear explanation about why he did it and shows oscilloscope traces about how it all works.

Although the project is specific to the PIC32, the discussion about DMA applies to any computer with direct memory access. The only thing missing is the code. However, there are plenty of examples on the web you can look at, including a Microchip webinar.

DMA is a powerful technique, although it can be tricky to debug. Big computers have used it for ages for high performance I/O, like disk drives or displays. We’ve covered DMA for the ARM before. Not surprisingly around here, driving LEDs seems to be a common use case for DMA.


Filed under: Microcontrollers

No comments:

Post a Comment