cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble in getting the DMA interrupt for full buffer

NKupe
Associate II

Hi all, I have some issues getting my DMA to interrupt correctly on my STM32F411RE. I recall that I previously had this working correctly, but even with my old code and solutions offered on this forum I cannot figure out what I am doing wrong at the moment.

I have initialized my code through CubeMX and am trying to sample 2048 samples from 3 channels in total (A0, A1, A4 on the Arduino pins). I have thus setup the DMA in ciruclar mode for this buffer within the ADC.

However when running my program (link to pastebin for program source code) it appears that this DMA buffer called adc_buffer is never filled with any data, and as a result the IT HAL_ADC_ConvCpltCallback appears to never be triggered for a full buffer. Resulting in my entire program not working.

Does anyone know where the issues lie in my program? I have considered my adc_buffer being too long, incorrect / missing inits for the DMA or ADC, or maybe my code is just plain bad with a ton of cascading errors. Could I be using the wrong intercept maybe?

EDIT: I have been following this youtube video to set it up, it appears I have the exact same steps in my code. Yet mine does not appear to work?

0 REPLIES 0