Skip to main content
Explorer
June 13, 2025
Solved

Opamp on STM32U545 is impossible to read with ADC_IN8

  • June 13, 2025
  • 3 replies
  • 357 views

Hello.

I am finishing a project where I measure voltage with an ADC using the STM32L431 and, for greater accuracy, I am using the OPAMP (PA0 = ADC1_IN0_VINP and PA3 = ADC1_IN_VOUT). For the STM32L431 on the STM32CubeMX, when activating the OPAMP in "Follower" mode, it is possible to select the "OPAMP1 Output Single-ended" option on the ADC1 to internally connect the OPAMP1_VOUT to the ADC1_IN8, and I can read it perfectly on the PA3 (ADC1_IN8). Knowing more about the ST family of microcontrollers, I realized that the STM32U545 has more features in terms of safety and lower power consumption, so I decided to change the microcontroller of the project and start using the STM32U545. However, on the STM32U545, when activating the OPAMP in "Follower" mode or any other mode, the ADC options do not show the "OPAMP1 Output Single-ended" option and, so far, I have not found out what to do to be able to use the OPAMP and read PA3=ADC1_IN8 as I do on the STM32L431.

I have already looked in several manuals and also here in the community and I have not found out how to do it.

Could someone help me?

Thanks.

    This topic has been closed for replies.
    Best answer by TDK

    Right click on PA3 and enable pin stacking, then enable both the OPAMP and ADC function of it.

    TDK_0-1749820792817.png

     

    3 replies

    EBAuthor
    Explorer
    June 13, 2025

    Sorry, I saw that I posted with an error and I couldn't find how to edit it, so I'm putting the correct part here. Where I wrote "OPAMP (PA0 = ADC1_IN0_VINP and PA3 = ADC1_IN_VOUT)", the correct one is "OPAMP (PA0 = OPAMP1_VINP and PA3 = OPAMP1_VOUT)".

    Thank you.

    TDKAnswer
    Super User
    June 13, 2025

    Right click on PA3 and enable pin stacking, then enable both the OPAMP and ADC function of it.

    TDK_0-1749820792817.png

     

    EBAuthor
    Explorer
    June 14, 2025
    TDK, I really appreciate your reply.

    Thank you very much.