aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testhal/STM32/STM32F3xx/OPAMP/main.c9
1 files changed, 8 insertions, 1 deletions
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
};
/*