Page 1 of 1

How to to drive an SPI DAC with DMA?

Posted: Sat Jun 11, 2022 1:11 am
by AutogolazzoJr
Hello, I am trying to drive an MCP4922 12-channel SPI DAC with an esp32 using DMA. I was previously able to do this with a teensy 3.2, and the spi output looks something like this:
Image

I am trying to do this using an esp32 and DMA, but the DAC requires the chip select line to pulse every time a 2-byte word is sent. I can of course do an spi_device_transmit() for each 2-byte word, but this is not nearly fast enough to reproduce the signal in the image above. Is there any way I can go about creating an SPI signal like the one in the image? Thanks.

Re: How to to drive an SPI DAC with DMA?

Posted: Thu Feb 02, 2023 9:05 am
by janlksrckts
Hi AutogolazzoJr
Did you ever figure out how to use DMA to MCP4922 SPI DAC and pulsing the CS of the DAC every 2 bytes?
I'm having the same issue now with an MCP4823 which is from the same DAC family. Thanks.