2026-04-10 5:33 AM - edited 2026-04-10 5:34 AM
Hello,
According to Table 246 in section 27.3.3 Signal Routing of the STM32U3 Reference Manual, I should be able to configure ADC1_IN6 as an ADC input when using OPAMP1, or ADC1_IN13/ADC2_IN9 when using OPAMP2 such that the output of the opamps are routed internally to the input of the ADC.
However, in CubeMX configuration for this device, enabling the Opamp in any capacity "red's out" the option to use the corresponding ADC input for any of these combinations. In this example, OPAMP1 is set to PGA Not Connected, and I am unable to configure the ADC input on IN6.
Am I doing something wrong here, or is this simply a bug related to the recent release of this product?
Thanks!
CubeMX version: 6.17.0
OS: Ubuntu 24.04.4
Device: STM32U3C5CIUxQ
Solved! Go to Solution.
2026-04-13 3:58 AM
Hello @AQB
You are absolutely correct. This behavior appears to be a STM32CubeMX limitation.
CubeMX should allow the ADC to select the OPAMP output channel, exactly as it does on STM32F3 where the OPAMP output is available in the ADC channel list as a selectable input source. The expected behavior on STM32U3 should be the same: once the OPAMP is enabled, the ADC channel corresponding to the OPAMP output should remain selectable so that the amplified signal can be converted by the ADC.
A ticket # 0061629 has been escalated to dev team to correct this behavior.
BR,
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-04-10 5:39 AM - edited 2026-04-10 7:55 AM
Hello @AQB
In STM32U3 OPAMP PGA mode, “PGA not connected” means only that the inverting input not used. For OPAMP1, the external signal still enters through VINP on PA0(ADC1_IN3) and the amplified result appears on PA3 (ADC1_IN6)
So CubeMX behavior is correct.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-04-10 10:03 AM
Thanks for looking into this @Ghofrane GSOURI.
My confusion is that I am unable to enable the ADC to read from input channel 6 in CubeMX. I am less concerned about the particular operating mode of the Opamp, that was just an example to illustrate my issue.
Per this screenshot, I am unable to activate IN6 on ADC1 when OPAMP1 is enabled in any operating mode. At the very least, this means I cannot configure the other ADC parameters without enabling a second, unused channel.
If this is intended behaviour, how do I then enable the ADC peripheral to use the opamp output?
Thanks!
2026-04-13 3:58 AM
Hello @AQB
You are absolutely correct. This behavior appears to be a STM32CubeMX limitation.
CubeMX should allow the ADC to select the OPAMP output channel, exactly as it does on STM32F3 where the OPAMP output is available in the ADC channel list as a selectable input source. The expected behavior on STM32U3 should be the same: once the OPAMP is enabled, the ADC channel corresponding to the OPAMP output should remain selectable so that the amplified signal can be converted by the ADC.
A ticket # 0061629 has been escalated to dev team to correct this behavior.
BR,
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.