Skip to main content
Visitor II
July 10, 2025
Solved

How to get PA0 connected to ADC on STM32H5?

  • July 10, 2025
  • 2 replies
  • 361 views

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.
    Best answer by NesrynELMK

    Hello @jeremierafin 

     

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

     

    Kind regards,

     

    2 replies

    ST Employee
    July 10, 2025

    Hello @jeremierafin 

     

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

     

    Kind regards,

     

    Visitor II
    July 10, 2025

    Actually, that was my missing configuration :)

    Thanks a lot!!!