STM32F example for opamp follower mode


Does anyone have an STM32F example for opamp follower mode (ideally STM32F3 Discovery)? I can get the PGA working but cannot find out how to connect it in simple follower mode.

Best Answer

Got it (I am using OPAMP3):

    //OPAMP_NonInvertingInput_IO4 < IO4 (PA1 for OPAMP1, PA7 for OPAMP2, PB0 for OPAMP3, PB13 for OPAMP4)
    //OPAMP3 config 

OPAMP_DeInit( OPAMP_Selection_OPAMP3 );
OPAMP_InitStructure.OPAMP_NonInvertingInput = OPAMP_NonInvertingInput_IO4;
OPAMP_InitStructure.OPAMP_InvertingInput = OPAMP_InvertingInput_Vout;
OPAMP_Init( OPAMP_Selection_OPAMP3, &OPAMP_InitStructure );