From 05faf884a41470970fd9638a1be6a0b76bfb71e2 Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Tue, 8 Jan 2019 20:15:28 +0100 Subject: Updated opamp example --- testhal/STM32/STM32F3xx/OPAMP/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'testhal') diff --git a/testhal/STM32/STM32F3xx/OPAMP/main.c b/testhal/STM32/STM32F3xx/OPAMP/main.c index 0345f12..2bdb755 100644 --- a/testhal/STM32/STM32F3xx/OPAMP/main.c +++ b/testhal/STM32/STM32F3xx/OPAMP/main.c @@ -78,8 +78,15 @@ static const GPTConfig gpt6cfg1 = { .dier = 0U }; +/* + * OpAmp configuration. + * We will double the input voltage + */ static const OPAMPConfig opamp1_conf = { - 0 + STM32_OPAMP_NonInvertingInput_IO4 | // INP connectd to PA1 + STM32_OPAMP_InvertingInput_PGA | // INM connected to PGA + STM32_OPAMP_PGAGain_2 | // Gain of 2x + STM32_OPAMP_PGAConnect_No // PGA connected to ground }; /* -- cgit v1.2.3