Skip to main content
Scotty55
Associate III
June 13, 2021
Solved

STM32G474 OPAMP configuration Bug

  • June 13, 2021
  • 11 replies
  • 3296 views

Are there any plans to repair the CubeMX system and to re-enable the configurations of STM32G4 firmware version 1.2.0? I tried version 1.3.0 and 1.4.0, and both don't allow to configure an OPAMP as follows:

 hopamp5.Instance = OPAMP5;

 hopamp5.Init.PowerMode = OPAMP_POWERMODE_NORMAL;

 hopamp5.Init.Mode = OPAMP_PGA_MODE;

 hopamp5.Init.NonInvertingInput = OPAMP_NONINVERTINGINPUT_IO2;

 hopamp5.Init.InternalOutput = ENABLE;

 hopamp5.Init.TimerControlledMuxmode = OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE;

 hopamp5.Init.PgaConnect = OPAMP_PGA_CONNECT_INVERTINGINPUT_NO;

 hopamp5.Init.PgaGain = OPAMP_PGA_GAIN_32_OR_MINUS_31;

 hopamp5.Init.UserTrimming = OPAMP_TRIMMING_FACTORY;

This was generated with CubeMX version 5.6.1 and STM32G4 firmware version 1.2.0. I am using this in an actual project and because of the bugs in 1.3.0 and 1.4.0 can't change to newer versions.

This topic has been closed for replies.
Best answer by Sara BEN HADJ YAHYA

Hello @Rüdiger Becker​ , @Community member​ 

This issue is fixed in STM32CubeMX latest release.

V6.6.0 is now available under this Link.

Thanks for your contribution.

Sara.

11 replies

Houda GHABRI
ST Employee
June 16, 2021

Hi @Rüdiger Becker​ ,

Let me be sure that I understand the issue, CubeMX doesn't allow you to downgrading  to STM32G4 1.2.0 version? If yes you can select any  STM32G4 firmware version available in your repository by unselect "Use Default Firmware Location" in Project Manager TAB and select the 1.2.0 version :

0693W00000Bb7ebQAB.png 

Or may be you mean that the code generated by CubeMX for OPAMP5 is not correct? If yes can you please tell me which parameter or is wrong ?

Houda

Scotty55
Scotty55Author
Associate III
June 16, 2021

No, that is not the problem.

CubeMX 5.6.1 with firmware 1.2.0 allows to generate the configuration I showed in my bug report. This configuration is correct, and I use it in 2 projects which are actually under development. The STM32G4 reference manual declares this as a valid configuration, too.

If you try to reproduce this correct configuration with more recent CubeMX and firmware versions, the CubeMX software tells you that this configuration is invalid and refuses to generate code for the MCU.

That is for sure a bug and should be fixed asap.

Houda GHABRI
ST Employee
June 16, 2021

Ok @Rüdiger Becker​ I understand more now.

Can you please share your ioc created with STM32CubeMX 5.6.1?

Houda

Scotty55
Scotty55Author
Associate III
June 16, 2021

One more detail: The refused configuration details are:

hopamp5.Init.InternalOutput = ENABLE;

hopamp5.Init.PgaConnect = OPAMP_PGA_CONNECT_INVERTINGINPUT_NO;

According to reference manual it is possible to use the OPAMP without externally connected negative input and output, so that the only external pin is the positive input.

Scotty55
Scotty55Author
Associate III
June 16, 2021

OK, I send it now, but of course it contains much more than the OPAMP configuration...

best regards - Rüdiger Becker

Houda GHABRI
ST Employee
June 17, 2021

Hello @Rüdiger Becker​ ,

I reproduce this behavior and raised this question internally .

I will come back with answers one I have updates.

Houda

Aurelian Lazarut
Associate II
July 20, 2021

I think the original poster question is very clear (let me try)

None of the versions 1.2.0, 1.3.0 and 1.4.0 are generating the correct configurations for OPAMP.

does ST has any plans to fix this issue? if yes when?

Regards,

Aurelian

Scotty55
Scotty55Author
Associate III
December 13, 2021

I have just checked Stm32CubeMX version 6.4 with G4 Firmware version 1.5.0. The configuration bug is still present!

When will ST fix this issue? Never?

Sara BEN HADJ YAHYA
ST Technical Moderator
June 29, 2022

Hello @Rüdiger Becker​ , @Community member​ 

This issue is fixed in STM32CubeMX latest release.

V6.6.0 is now available under this Link.

Thanks for your contribution.

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Scotty55
Scotty55Author
Associate III
June 29, 2022

Thank you for your reply. By the way, is it possible to speed up your bug fixing procedure so that it doesn't take two years to remove a software fault and to go back to a working solution which existed before?