Wednesday, July 11, 2018

DMA ADC

To try and speed things up a bit and spend less time fiddling around in interrupt service routines I have managed to get the DMA controller to do most of the hard lifting for collecting the ADC values. It has been a bit of a journey as the STM32 will only transfer 16 bits at once via the SPI and the whole chip enable output is plain messy... I ended up having multiple DMA channels and using a clock to generate the CE pin in the end. Checking it on a logic analyser it looks good. I am able to collect the PITCH 4 times interleaved with the FM, Timbre and Colour values in an attempt to get a little bit more resolution. I am also able to run the whole thing a fair bit faster than the original.

No comments: