cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474RE ADC with DMA

HSing.5
Associate II

When I configure ADC1 to read voltage input from PA0 and PA1 using DMA, then the behavior is as below in each condition

1) PA0 = 0 (GND) ; PA1 = variable pot (0-5V)

then PA1 provides values as per input from pot but max value displayed in 3022 instead of 4095 while PA0 shows value as 0

2) PA1 = 0 (GND) ; PA0 = variable pot (0-5V)

then PA0 provides values as per input from pot, max value displayed in 4095 while PA1 shows fluctuating values

3) PA0 = 1 (5V) ; PA1 = variable pot (0-5V)

then PA1 provides values as per input from pot but max value displayed in 3022 instead of 4095 while PA0 shows value as 4095

4) PA1 = 1 (5V) ; PA0 = variable pot (0-5V)

then PA0 provides values as per input from pot, max value displayed in 4095 while PA1 shows fluctuating values

 

Kindly suggest how to solve this issue? Configuration settings of ADC and DMA are attached for your reference.

HSing5_0-1721803815703.pngHSing5_1-1721803852289.pngHSing5_2-1721803923714.png

 

2 REPLIES 2
SofLit
ST Employee

Hello,


@HSing.5 wrote:

1) PA0 = 0 (GND) ; PA1 = variable pot (0-5V)

3) PA0 = 1 (5V) ; PA1 = variable pot (0-5V)

No 5V to be used with ADC. You mean 3.3V.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Yes 3.3V (Logic 1).