2020-01-10 06:34 AM
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).
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
2020-01-10 09:33 AM
You can use the nice functionality of STM32G4: you can use the same pin for analog signals.
So I would do it this way:
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 ....
Best regards
Andrea
2020-01-12 11:56 PM
Hello Andrea,
thank you for the answer.
I'll try to apply this solution.
Best regards
Gianluca