cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 OPAMP configuration Bug

Scotty55
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

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.

View solution in original post

11 REPLIES 11
Houda GHABRI
ST Employee

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
Associate III

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

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

Can you please share your ioc created with STM32CubeMX 5.6.1?

Houda

Scotty55
Associate III

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
Associate III

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

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 III

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
Associate III

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 Employee

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.