2025-09-10 7:36 AM
Hi, i encountered the problem on my stm32 G474RE board, that when i use the adc in dma mode i can not use a dac. The dac simply does not work. As long as i dont start the adc in dma mode, my dac is generating the right waveform, but when i start the adc the dac_setValue function is stuck and wont update? Has anybody encountered that problem? Am i doing something wrong?
2025-09-10 7:39 AM
Your ADC interrupts are triggering so fast it prevents the code from doing anything else. Decrease ADC sample rate, increase DMA buffer size. Increasing the sample rate to max is generally beneficial.
2025-09-11 1:12 AM
But how can i then use the maximum sampling frequency of the adc? The MCU clock is set to 120MHz so it should be way faster than the ADC sampling frequency. Is there just too much overhead, with the HAL libraries? I basically want to compare consecutive adc values in real time to react on them. Measuring a ton of values and buffering them is not suitable for my application.