cancel
Showing results for 
Search instead for 
Did you mean: 

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

DTort.1
Associate III

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.

4 REPLIES 4
Bob S
Principal

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.

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
Principal

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).

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.