Skip to main content
Rragh
Associate
June 2, 2020
Question

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 i

  • June 2, 2020
  • 2 replies
  • 936 views

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);

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
June 15, 2020

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

JW

Rragh
RraghAuthor
Associate
June 16, 2020

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