Skip to main content
DTort.1
Associate III
August 3, 2021
Question

STM32G431 non-inverting opamp with internal connection to ADC without VINM0 ext IO

  • August 3, 2021
  • 2 replies
  • 2469 views

Hello, I want to connect the op-amp built into the microcontroller directly to the ADC input in a non-inverting mode, without outputting the negative input (VINM0) outside, but I cannot find this configuration in CubeIDE.

For some reason, in the mode I need, a negative input is also displayed. It is written that it is for filtering, but it is completely incomprehensible to me what is meant, despite the fact that VOPAMP_OUT does not come out on the pin.

This topic has been closed for replies.

2 replies

Bob S
Super User
August 3, 2021

Which version of CubeIDE? What about "Follower Internally Connected" mode? Or do you need the PGA function? You can always edit/override the code that CubeMX generates and write to the OPAMP config reg directly to force the mode you need.

DTort.1
DTort.1Author
Associate III
August 3, 2021

CubeIDE 1.7.0

Yes, I need the PGA mode.

Yes, I understand that it is possible to override the state of the configuration registers manually, but I want to understand why this simple mode is not already included in CubeIDE and what the phrase "for filtering" means in the pop-up tooltip.

Bob S
Super User
August 6, 2021

The "for filtering" means that, with the output and negative input signals brought out to pins, you can add an external capacitor for filtering (i.e. low-pass filter). This is shown in figure 174 of rev 6 of RM0440 (STM32G4xx reference manual).

DTort.1
DTort.1Author
Associate III
August 8, 2021

Thank you for your answer. I understood that I mean an external capacitor, it's just that this description about filtering is in the mode where the output signal is not output to the external pin. In general, I think this is a purely CubeIDE problem, not a microcontroller in general.

I found some typical configuration solutions in STM Motor SDK for G431CBU.

Thanks again for your help.