External DAC with SPI + DMA
Hi
I am trying to make an analog synthesizer, and for this is using a STM32G431 with some 8-channel DAC’s (connected via SPI) for generating control-voltages for the VCA’s and other circuits.
I would like to use the SPI with DMA, and have looked at the RM chapters, understood some of it, but feel I need some working code example to lean against to move forward.
When looking I only have found examples using either the internal DAC + DMA (without SPI), or SPI DAC but without DMA.
The F4 Discovery boards (e.g STM32F407G-DISC1) does have an audio playback & recorder example using a CS32L22 stereo codec with I2S and DMA, but uses I2C instead of SPI for sending initialization settings to the codec.
F4 or F3 examples could also be useful. I mostly chose G4 since it’s newer than F4, and hopefully some DMA and SPI quirks have been corrected in the new silicon (I may be naive though). At least it seems the errata mentions fewer ‘specialties’.
Anything using an external DAC (no matter which) with SPI+DMA or I2S+DMA will be very helpful. If some has a link to an example, or would share a piece of such code, it will be much appreciated.
Thanks