HAL OPAMP Overview ¶
Introducing OPAMP ¶
- group OPAMP_Introduction
-
The OPAMP (Operational Amplifier) hardware abstraction layer provides a set of APIs to interface with the STM32 operational amplifier peripheral.
It simplifies the initialization, configuration and process of peripheral features
This abstraction layer ensures portability and ease of use across different STM32 series.
The HAL OPAMP driver includes the following features:
Support for multiple OPAMP modes: stand-alone, follower, inverting and non-inverting PGA
Programmable gain settings with internal or external filtering/bias
Timer-controlled operation for dynamic reconfiguration
Module and files ¶
The following diagram illustrates the OPAMP module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the OPAMP module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL OPAMP module, specifying their locations, default values, and descriptions:
- group OPAMP_Configuration_Table
-
Configuration inside the OPAMP driver ¶
Config defines
Description
Default value
Note
USE_HAL_OPAMP_MODULE
from hal_conf.h
1
When set, HAL OPAMP module is enabled
USE_HAL_OPAMP_CALIBRATE_PARALLEL
from hal_conf.h
0
Enable the parallel calibration
USE_HAL_OPAMP_USER_DATA
from hal_conf.h
0
Enable the user data
USE_HAL_OPAMP_CLK_ENABLE_MODEL
from hal_conf.h
HAL_CLK_ENABLE_NO
Periph. clock gating in HAL_OPAMP_Init()
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Parameters (pointers or sizes) are checked in runtime
USE_HAL_CHECK_PROCESS_STATE
from hal_conf.h
0
When set, enable atomic access to process state check
USE_ASSERT_DBG_PARAM
from PreProcessor env
None
When defined, enable the params assert
USE_ASSERT_DBG_STATE
from PreProcessor env
None
When defined, enable the state assert