Hello,
I currently have a T4.1 project that communicates to a device over SPI using DMA, freeing up the uC to other tasks during SPI transfers, using the following from the standard Teensy SPI library:
This works well, but I'm looking to upgrade the device (a rather esoteric medical part) to the next model in the device family.
However, this next model uses a non-standard SPI protocol: it features a "double data rate" by making data available on both the rising edge and the falling edge of SCLK. The last data bit is then made available on the rising edge of CS. All the other timings (MOSI, CS, and SCLK) remain standard.
This feels like it should be in the realm of possibility to implement with DMA, but I'm not really sure where to start -- any pointers? I've been reading through DMAChannel.h but I feel a little out of my depth with some of it.
Thanks in advance!
I currently have a T4.1 project that communicates to a device over SPI using DMA, freeing up the uC to other tasks during SPI transfers, using the following from the standard Teensy SPI library:
Code:
SPI.transfer(outBuf, returnBuffer, count, event);
This works well, but I'm looking to upgrade the device (a rather esoteric medical part) to the next model in the device family.
However, this next model uses a non-standard SPI protocol: it features a "double data rate" by making data available on both the rising edge and the falling edge of SCLK. The last data bit is then made available on the rising edge of CS. All the other timings (MOSI, CS, and SCLK) remain standard.
This feels like it should be in the realm of possibility to implement with DMA, but I'm not really sure where to start -- any pointers? I've been reading through DMAChannel.h but I feel a little out of my depth with some of it.
Thanks in advance!