diff options
Diffstat (limited to 'testhal/STM32/STM32F3xx/OPAMP')
-rw-r--r-- | testhal/STM32/STM32F3xx/OPAMP/main.c | 9 | ||||
-rw-r--r-- | testhal/STM32/STM32F3xx/OPAMP/mcuconf_community.h | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/testhal/STM32/STM32F3xx/OPAMP/main.c b/testhal/STM32/STM32F3xx/OPAMP/main.c index 2bdb755..39af13c 100644 --- a/testhal/STM32/STM32F3xx/OPAMP/main.c +++ b/testhal/STM32/STM32F3xx/OPAMP/main.c @@ -83,10 +83,10 @@ static const GPTConfig gpt6cfg1 = { * We will double the input voltage
*/
static const OPAMPConfig opamp1_conf = {
- 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
+ OPAMP1_CSR_VPSEL_PA01 | // INP connectd to PA1
+ OPAMP1_CSR_VMSEL_PGA | // INM connected to PGA
+ OPAMPx_CSR_PGAGAIN_x2 | // Gain of 2x
+ OPAMPx_CSR_PGACONNECT_GROUND // PGA connected to ground
};
/*
@@ -118,6 +118,7 @@ int main(void) { gptStartContinuous(&GPTD6, 2U);
opampEnable(&OPAMPD1);
+ opampCalibrate();
/*
* Normal main() thread activity.
diff --git a/testhal/STM32/STM32F3xx/OPAMP/mcuconf_community.h b/testhal/STM32/STM32F3xx/OPAMP/mcuconf_community.h index 76f9429..2f44dc1 100644 --- a/testhal/STM32/STM32F3xx/OPAMP/mcuconf_community.h +++ b/testhal/STM32/STM32F3xx/OPAMP/mcuconf_community.h @@ -92,6 +92,7 @@ #define STM32_OPAMP_USE_OPAMP2 TRUE #define STM32_OPAMP_USE_OPAMP3 TRUE #define STM32_OPAMP_USE_OPAMP4 TRUE +#define STM32_OPAMP_USER_TRIM_ENABLED TRUE /* * USBH driver system settings. |