I’ve read loads of tutorials, and tried loads of sample code but I can’t get anything to compile.
I’m fairly good with arduino, but new to STM32. I’ve never done DMA before on either.
I’m using STM32F411CE with ArduinoIDE and https://github.com/stm32duino/BoardManagerFiles
A lot of the example I’ve found require libmaple, which I considered switching to, but after some reading seems it is deprecated and maybe not the best idea to use it for a new project?
I’ve tried generating the code using STM32CubeMX but the files it generates seem to clash with the internals of stm32duino core. One example I think was redeclaration errors for things like SystemClock_Config.
I would post some code but I’ve tried so many things that I’ve kind of lost track of what code gave which errors, but what I can say is that I found nothing that worked. So I think its time to start again from the beginning.
My aim is to use one ADC pin to fill a continuous DMA buffer ( float32_t[4096] ) at a sample rate suitable for FFT.
I have the FFT code working sampling with analogRead() but the docs say it’s best with DMA.
I will also need to use some other analog pins for some other reading, but they can be done with normal analogRead no problem. I did see some people struggling to get both DMA and analogRead to work together, so that may be a requirement consideration too.
Any thoughts? Why am I finding this so difficult? What is the correct way to go about this? A link to a nice tutorial that actually works on stm32duino core would be brilliant!
Thanks
