cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 5.6.1 STM32G4 OPAMP/ PGA configuration issue?

Bertrand1
Senior

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

2 REPLIES 2
Khouloud ZEMMELI
ST Employee

​Hello @Bertrand​ ,

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

Best Regards,

Khouloud

Bertrand1
Senior

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