Showing results for 
Search instead for 
Did you mean: 

How to get correct ADC values in STM32MP157C-DK2

Miguel Olivan

I was trying to test the ADC of a STM32MP157C-DK2. I downloaded a basic example program to perform the data acquisition in the M4 processor (

The results that I'm having in the DMA buffer don't correspond with de DAC configuration guided by the USER1 button, getting values such as 0xfff or 0x800 instead of the values I'm expecting ( from 0 to maximum range in 4 steps as stated in the documentation)

Should I connect some input to some output?

The documentation doesn’t seem clear to me. It states that "If same pin is used no connection is required, it is done internally. Otherwise, user need to connect a wire between PA4 and PA4". I searched PA4 in the DK2 schematics with no luck.

What could be the source of this behavior?

ST Employee


is the VDDA enabled ? By default this supply is disabled if ADC is not used in Linux and not declared in DT as M4 ressource.

See how to run examples

See also


In order 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.