cancel
Showing results for 
Search instead for 
Did you mean: 

Opamp on STM32U545 is impossible to read with ADC_IN8

EB
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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

TDK_0-1749820792817.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
EB
Associate

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.

TDK
Super User

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

TDK_0-1749820792817.png

 

If you feel a post has answered your question, please click "Accept as Solution".
EB
Associate
TDK, I really appreciate your reply.

Thank you very much.