Skip to main content
HSing.5
Associate
July 24, 2024
Question

STM32G474RE ADC with DMA

  • July 24, 2024
  • 2 replies
  • 1796 views

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

 

This topic has been closed for replies.

2 replies

mƎALLEm
ST Technical Moderator
July 24, 2024

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 "Best answer" on the reply which solved your issue or answered your question.
HSing.5
HSing.5Author
Associate
July 24, 2024

Yes 3.3V (Logic 1).