Non-blocking SPI/SPI via DMA

andnate

Member
I'm working on a project involving a Teensy 4.1 connected to a dsPIC micro, with the dsPIC being used for some of its IO peripherals (such as SENT). My plan is to connect the two via SPI, with the two using DMA to output data buffers with no overhead. This was fairly easy to accomplish on the dsPIC but I'm discovering that the Teensy's DMA hardware isn't particularly user friendly. My goal is to have some timer triggering SPI messages to transmit periodically, with DMA moving data between the SPI buffer and arrays that could be accessed by code.
I found the TsyDMASPI library which can handle sending large buffers of data but requires code to start the transmission and seems to be blocking while the message transmits.

Before I get too into the weeds of DMA, does anyone know of examples of this being done? Or if this is actually possible on the Teensy?
 
Back
Top