Skip to main content
GIabi.1
Associate II
January 10, 2020
Question

config OPAMP in non-inverting configuration with the output of opamp connected to ADC: is it possible?

  • January 10, 2020
  • 2 replies
  • 2850 views

Good morning,

i' m working with stm32g4 and for

my application i need use internal opamp in non- inverting configuration with

external resistor how show the figure below (figure form AN5306).

0690X00000BvquYQAR.png

I don’t understand if is possible connect the output of opamp to ADC when i use external resistors to set the gain. Reading AN5306 seems that i can choose only one option:

 OPAINTOEN = 0 connect the output of opamp to Vout.

Or OPAINTOEN = 1 connect the output of opamp to ADC.

How  can i connect the output of opamp to ADC and use it in non-inverting configuration with external resistor?

Thanks in advance

This topic has been closed for replies.

2 replies

Andrea Canepa
Senior
January 10, 2020

You can use the nice functionality of STM32G4: you can use the same pin for analog signals.

So I would do it this way:

  • I set the OPAMP to STANDALONE mode: so externally you can make the circuit you want.
  • Then I set the OPAMP output pin to share the signal with an ADC input: so you can send the OPAMP signal to the ADC input saving an additional pin.

For example: with STM32G431RBT6 I see that pin PA2 is shared by OPAMP1_VOUT and ADC1_IN3, therefore I will go to use OPAMP1 for my purpose and the ADC1_IN3 input will be the one used to convert the analog signal.

To share the pin between OPAMP and ADC you can use CUBE_MX or CubeIDE: look at the following image ....

0690X00000BvriiQAB.png

Best regards

Andrea

GIabi.1
GIabi.1Author
Associate II
January 13, 2020

Hello Andrea,

thank you for the answer.

I'll try to apply this solution.

Best regards

Gianluca