Skip to main content
MMatj.1
Associate II
February 4, 2020
Question

OPAMP's of STM32G474 reserve not needed output pin when using internal output connection ? (probably BUG or incorrect CubeMX behavior/ no correct option).

  • February 4, 2020
  • 8 replies
  • 1983 views

Hello ST community,

When I use OpAmp's of STM32G474 and configure all of them to internal ADC connection, all of them still reserve external output pins as analog .

I'm using :

OpAmp's in Inverting mode, with PGA enabled, positive input internal connection to DAC, output internal connection to ADC.

So only one analog pin have external connection, it's VINM0 which is going to PGA on OpAmp inverting input.

Please tell which OpAmp mode need be used for my need ?

This behavior can be seen in CubeMx when selecting OpAmp mode to:

"PGA Connected-INVERTINGINPUT_IO0_BIAS-DACx_OUTy-INP"

Generated code reserve not needed pit too.

This topic has been closed for replies.

8 replies

Andrea Canepa
Senior
February 4, 2020

Yes, it is a bug in CubeMX: it does not allow you to select whether you want to use the OPAMP output on pin or internally. I have already reported this problem to technical support several months ago, but apparently it has not yet been implemented.

The only way is to accept the waste of an output pin, or you have to configure the device using HAL or LL libraries.

Regards

Andrea

Imen GH
ST Employee
February 7, 2020

​Hello,

Could you please provide the ioc file for check.

Regards

MMatj.1
MMatj.1Author
Associate II
February 7, 2020

Yes, sure.

Here will be IOC file quickly prepared for this example.

In this example PA2, PA6, PB1, PB12, PA8 and PB11 are defined as external analog output (OPAMPx_VOUT, x=1/2/3/4/5/6 respectively).

But, I use OPAMPx_VOUT internal connection to ADC's , and need the defined pins for another purposes.

There is another problem, than all OPAMPs except one have enabled internal output in generated code, but one (OPAMP6) have disabled. I have wrote this in another thread.

Imen GH
ST Employee
February 10, 2020

Thanks for sharing your .ioc file.

The issue is reported internally and will be fixed by our STM32CubeMX team

OGhis
Senior
February 10, 2020

Thanks for this issue,

i had also reported this issue 6 months ago, but having never an answers.

btw there are many other issues with the configuration in the CUBEMX for the OPAMP / COMPARATOR and the HRTIMER

Khouloud ZEMMELI
ST Employee
March 19, 2020

​Hello all

Issue fixed, the fix will be available for the next CubeMX release,

Best Regards,

Khouloud

Andrea Canepa
Senior
March 19, 2020

Well.

I'd like to know if to report BUGs (or presumed ones) it is better to report here on this community, or if it is better to send the report directly to STM through the online support service.

Best regards

Andrea

Khouloud ZEMMELI
ST Employee
March 19, 2020

​You can report them on community , just you need to add topics like "bug-report" , "stm32cubeMX" if you have faced on problem on MX, or others topics according to the bug reported and then we will be involved depending on this tagging.

Best Regards,

Khouloud