Skip to main content
Bertrand1
Senior
May 19, 2020
Question

STM32CubeMX 5.6.1 STM32G4 OPAMP/ PGA configuration issue?

  • May 19, 2020
  • 2 replies
  • 1443 views

Hello,

Fully new with OPAMP, configuration, I made some tries, and for me ther is an issue on the CubeMX code generator. If I want use an OPAMP with PGA with positive gain, I only need non inverting input and output. There is no way to specify this configuration and the generate code is always with inverting input conected to I/O :

hopampX.Init.PgaConnect = OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0.

then the right configuration in my case is PAMP_PGA_CONNECT_INVERTINGINPUT_NO.

and I found no way to configure with this define.

I need to modify by hand after code generation to have the expected behavior.

May be I missed something but for me, there is a small mistake on the Opamp mode selection on CubeMX

This topic has been closed for replies.

2 replies

Khouloud ZEMMELI
ST Employee
May 21, 2020

​Hello @Bertrand​ ,

You need to select the PGA Not Connected Mode in this case.

Best Regards,

Khouloud

Bertrand1
Bertrand1Author
Senior
May 21, 2020

But, If I want use PGA gain, I have to chose "PGA not connected"?!

Ok, I dont understand the mean of not connected in this case.

Thanks for your reply.

Regards

Bertrand