2019-05-09 08:52 AM
Hey,
I like to build a STM32F4 ADC DMA demo for the ZephyrOS project. The goal of the demo is to write a simple ADC driver, that inits its self and the ADC & DMA. Additional a thread triggers every 10sec a conversation.
Currently I am struggling to setup the ADC and maybe DMA in the right way. Any idea is appreciated.
My demo setup :
Idea setup uint16[3] vector that received the result of the conversation. Start conversation and wait for interrupt(ISR handler). the DMA runs in a circular mode, so we do not need to reset the DMA memory pointer before every conversation. At the end of the conversation we are getting the DMA TC interrupt. Inside of the ISR handler a semaphore is set that.
MCU: stm32f412
ADC1:
DMA2:
I setup this setup at cubeMX and let it generate the code for me. I attached the file.
When running my code. I am calling the function in that order:
The DMA or ADC iSR is never called. Think I have some error at my setup.
2019-10-03 05:26 AM
the LL_DMA_EnableStream function must be called to enable the DMA streaming. That solves that problem