Skip to main content
Associate II
Jul 10, 2025 9:57 AM UTC
Solved

How to get PA0 connected to ADC on STM32H5?

First of all, I am not using CUBE IDE, this is a bare metal.
Second: STM32H523. ADC (continuous mode; DMA). ADC is configured on PA0 (i.e. INP1, single-ended), GPIO configuration is analog mode.

On the pin I can probe (oscilloscope) my signal (correct amplitude): a sinus. But the data (from DMA) is noise.

Configured with PA1, all works fine (so my soft is ok). Using ADC1 or ADC2 does not change anything.

Second observation: with PA0, the DC is not fixed (floating pin), but configured on PA1, the pin is DC-driven (about VDDA/2, high impedance).

=> For these reasons, I have the feeling PA0 is not connected to ADC. I can't find anything in registers/documentation/erratas explaining this (on H7 there is some analog switches, but nothing for H5).

Any clue? Thanks!

 

This topic has been closed for replies.
NesrynELMKBest answer
ST Employee
Jul 10, 2025 10:21 AM UTC

Hello @jeremierafin 

 

Please verify that the OP0 bit in the ADC_OR register is actually set to 1 after initialization.

 

Kind regards,

 

2 replies

NesrynELMKBest answer
ST Employee
Jul 10, 2025 10:21 AM UTC

Hello @jeremierafin 

 

Please verify that the OP0 bit in the ADC_OR register is actually set to 1 after initialization.

 

Kind regards,

 

Associate II
Jul 10, 2025 10:37 AM UTC

Actually, that was my missing configuration :)

Thanks a lot!!!