cancel
Showing results for 
Search instead for 
Did you mean: 

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

MMatj.1
Associate II

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.

8 REPLIES 8
Andrea Canepa
Senior

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

​Hello,

Could you please provide the ioc file for check.

Regards

MMatj.1
Associate II

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

Thanks for sharing your .ioc file.

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

OGhis
Associate III

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

​Hello all

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

Best Regards,

Khouloud

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

​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