2024-05-27 02:40 AM
Hello, @SofLit
I would like to measure the voltage on analog pin A0 and A1 simultaneously, using ADC in DMA mode. I configured my ADC settings as SCAN, CONTINUOUS mode to measure continuously the whole group. The DMA is also configured and linked to the ADC1. However, the results that i am trying to display on the serial screen from UART communication, are all the same, even though with applying a sinewave evolving from 0V to 5V at 1Hz. Here are the .ioc and main.c files attached.
Thanks in advance for help.
2024-05-27 02:58 AM
You should not apply a voltage higher than VDDA voltage to the ADC input.
You should also enable the DMA Continuous Requests parameter. Below is the description of the relevant setting in CubeMX.
DMA Continuous Requests Parameter Description: This parameter is used only when a DMA Request is configured. Otherwise it is not relevant. When the DMA Request for this ADC instance this parameter specifies whether the DMA requests are performed in one shot mode (DMA transfer stops when number of conversions is reached) or are performed in continuous mode (DMA transfer unlimited, whatever number of conversions). Note: In continuous mode, DMA must be configured in circular mode. Otherwise an overrun will be triggered when DMA buffer maximum pointer is reached
2024-06-04 05:37 AM
I wan not able to make it work using DMA so i changed to interrupt mode without DMA, thanks