cancel
Showing results for 
Search instead for 
Did you mean: 

Hi guys, I'm using STM32G431 board and trying to use the internal OpAmp in standalone mode using Low Level Drivers (LL Drivers). The Opamp works fine in follower mode, but not in standalone mode. Can anyone suggest what might be the problem? Thanks in adv

Rragh
Associate

Please find the code here,

SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SYSCFGEN);

LL_OPAMP_SetMode (OPAMP2, LL_OPAMP_MODE_FUNCTIONAL);

LL_OPAMP_SetFunctionalMode (OPAMP2,LL_OPAMP_MODE_STANDALONE);

LL_OPAMP_SetInputNonInverting (OPAMP2, LL_OPAMP_INPUT_NONINVERT_IO0); //PA7

LL_OPAMP_SetInputInverting (OPAMP2, LL_OPAMP_INPUT_INVERT_IO0); //PA5

LL_OPAMP_SetInternalOutput (OPAMP2, LL_OPAMP_INTERNAL_OUPUT_DISABLED); //PA6

LL_OPAMP_Enable (OPAMP2);

2 REPLIES 2

Post schematics of the connection. What is the expected behaviour and what is the observed one?

JW

Rragh
Associate

Hi,

Please find the attached schematic.

Pins OPAMP2_VINP and OPAMP2_VINM are being connected to input pins of MCU Opamp, and I'm trying to measure the output at OPAMP2_VOUT (MCU OPAMP output pin). Also, voltage of around 1.2V (half of VRef of DAC) is being supplied from DAC.

Expected output - Voltage based on diffrential input (I have shunt based currrent measurement circuit preceding this, hence actual input depends on value of current)

Observed output - zero voltage at all cases

Thanks,

Rhushabh