libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
libopencm3 Defined Constants and Types for the STM32F3xx Operational Amplifier module More...
Functions | |
void | opamp_enable (uint32_t base) |
void | opamp_disable (uint32_t base) |
void | opamp_lock (uint32_t base) |
void | opamp_set_calsel (uint32_t base, uint32_t calsel) |
void | opamp_tstref_enable (uint32_t base) |
void | opamp_tstref_disable (uint32_t base) |
void | opamp_force_vp_enable (uint32_t base) |
void | opamp_force_vp_disable (uint32_t base) |
void | opamp_cal_enable (uint32_t base) |
void | opamp_cal_disable (uint32_t base) |
void | opamp_trimoffsetn_set (uint32_t base, uint32_t trim) |
void | opamp_trimoffsetp_set (uint32_t base, uint32_t trim) |
void | opamp_user_trim_enable (uint32_t base) |
void | opamp_user_trim_disable (uint32_t base) |
void | opamp_pga_gain_select (uint32_t base, uint32_t gain) |
void | opamp_vp_select (uint32_t base, uint32_t vp) |
void | opamp_vm_select (uint32_t base, uint32_t vm) |
bool | opamp_read_outcal (uint32_t base) |
void | opamp_vps_select (uint32_t base, uint32_t vps) |
void | opamp_vms_select (uint32_t base, uint32_t vms) |
void | opamp_tcm_enable (uint32_t base) |
void | opamp_tcm_disable (uint32_t base) |
libopencm3 Defined Constants and Types for the STM32F3xx Operational Amplifier module
LGPL License Terms libopencm3 License
LGPL License Terms libopencm3 License
#define OPAMP1 (OPAMP_BASE + 0x38) |
Definition at line 37 of file f3/opamp.h.
Definition at line 45 of file f3/opamp.h.
#define OPAMP1_CSR_VM_SEL_PA3 (0x1) |
Definition at line 79 of file f3/opamp.h.
#define OPAMP1_CSR_VM_SEL_PC5 (0x0) |
Definition at line 78 of file f3/opamp.h.
#define OPAMP1_CSR_VMS_SEL_PA3 (0x1) |
Definition at line 70 of file f3/opamp.h.
#define OPAMP1_CSR_VMS_SEL_PC5 (0x0) |
Definition at line 69 of file f3/opamp.h.
#define OPAMP1_CSR_VP_SEL_PA1 (0x3) |
Definition at line 90 of file f3/opamp.h.
#define OPAMP1_CSR_VP_SEL_PA3 (0x2) |
Definition at line 89 of file f3/opamp.h.
#define OPAMP1_CSR_VP_SEL_PA5 (0x1) |
Definition at line 88 of file f3/opamp.h.
#define OPAMP1_CSR_VP_SEL_PA7 (0x0) |
Definition at line 87 of file f3/opamp.h.
#define OPAMP1_CSR_VPS_SEL_PA1 (0x3) |
Definition at line 55 of file f3/opamp.h.
#define OPAMP1_CSR_VPS_SEL_PA3 (0x2) |
Definition at line 54 of file f3/opamp.h.
#define OPAMP1_CSR_VPS_SEL_PA5 (0x1) |
Definition at line 53 of file f3/opamp.h.
#define OPAMP1_CSR_VPS_SEL_PA7 (0x0) |
Definition at line 52 of file f3/opamp.h.
#define OPAMP2 (OPAMP_BASE + 0x3C) |
Definition at line 38 of file f3/opamp.h.
Definition at line 46 of file f3/opamp.h.
#define OPAMP2_CSR_VM_SEL_PA5 (0x1) |
Definition at line 81 of file f3/opamp.h.
#define OPAMP2_CSR_VM_SEL_PC5 (0x0) |
Definition at line 80 of file f3/opamp.h.
#define OPAMP2_CSR_VMS_SEL_PA5 (0x1) |
Definition at line 72 of file f3/opamp.h.
#define OPAMP2_CSR_VMS_SEL_PC5 (0x0) |
Definition at line 71 of file f3/opamp.h.
#define OPAMP2_CSR_VP_SEL_PA7 (0x3) |
Definition at line 94 of file f3/opamp.h.
#define OPAMP2_CSR_VP_SEL_PB0 (0x2) |
Definition at line 93 of file f3/opamp.h.
#define OPAMP2_CSR_VP_SEL_PB14 (0x1) |
Definition at line 92 of file f3/opamp.h.
#define OPAMP2_CSR_VP_SEL_PD14 (0x0) |
Definition at line 91 of file f3/opamp.h.
#define OPAMP2_CSR_VPS_SEL_PA7 (0x3) |
Definition at line 59 of file f3/opamp.h.
#define OPAMP2_CSR_VPS_SEL_PB0 (0x2) |
Definition at line 58 of file f3/opamp.h.
#define OPAMP2_CSR_VPS_SEL_PB14 (0x1) |
Definition at line 57 of file f3/opamp.h.
#define OPAMP2_CSR_VPS_SEL_PD14 (0x0) |
Definition at line 56 of file f3/opamp.h.
#define OPAMP3 (OPAMP_BASE + 0x40) |
Definition at line 39 of file f3/opamp.h.
Definition at line 47 of file f3/opamp.h.
#define OPAMP3_CSR_VM_SEL_PB10 (0x0) |
Definition at line 82 of file f3/opamp.h.
#define OPAMP3_CSR_VM_SEL_PB2 (0x1) |
Definition at line 83 of file f3/opamp.h.
#define OPAMP3_CSR_VMS_SEL_PB10 (0x0) |
Definition at line 73 of file f3/opamp.h.
#define OPAMP3_CSR_VMS_SEL_PB2 (0x1) |
Definition at line 74 of file f3/opamp.h.
#define OPAMP3_CSR_VP_SEL_PA1 (0x2) |
Definition at line 97 of file f3/opamp.h.
#define OPAMP3_CSR_VP_SEL_PA5 (0x1) |
Definition at line 96 of file f3/opamp.h.
#define OPAMP3_CSR_VP_SEL_PB0 (0x3) |
Definition at line 98 of file f3/opamp.h.
#define OPAMP3_CSR_VP_SEL_PB13 (0x0) |
Definition at line 95 of file f3/opamp.h.
#define OPAMP3_CSR_VPS_SEL_PA1 (0x2) |
Definition at line 62 of file f3/opamp.h.
#define OPAMP3_CSR_VPS_SEL_PA5 (0x1) |
Definition at line 61 of file f3/opamp.h.
#define OPAMP3_CSR_VPS_SEL_PB0 (0x3) |
Definition at line 63 of file f3/opamp.h.
#define OPAMP3_CSR_VPS_SEL_PB13 (0x0) |
Definition at line 60 of file f3/opamp.h.
#define OPAMP4 (OPAMP_BASE + 0x44) |
Definition at line 40 of file f3/opamp.h.
Definition at line 48 of file f3/opamp.h.
#define OPAMP4_CSR_VM_SEL_PB10 (0x0) |
Definition at line 84 of file f3/opamp.h.
#define OPAMP4_CSR_VM_SEL_PD8 (0x1) |
Definition at line 85 of file f3/opamp.h.
#define OPAMP4_CSR_VMS_SEL_PB10 (0x0) |
Definition at line 75 of file f3/opamp.h.
#define OPAMP4_CSR_VMS_SEL_PD8 (0x1) |
Definition at line 76 of file f3/opamp.h.
#define OPAMP4_CSR_VP_SEL_PA4 (0x2) |
Definition at line 101 of file f3/opamp.h.
#define OPAMP4_CSR_VP_SEL_PB11 (0x1) |
Definition at line 100 of file f3/opamp.h.
#define OPAMP4_CSR_VP_SEL_PB13 (0x3) |
Definition at line 102 of file f3/opamp.h.
#define OPAMP4_CSR_VP_SEL_PD11 (0x0) |
Definition at line 99 of file f3/opamp.h.
#define OPAMP4_CSR_VPS_SEL_PA4 (0x2) |
Definition at line 66 of file f3/opamp.h.
#define OPAMP4_CSR_VPS_SEL_PB11 (0x1) |
Definition at line 65 of file f3/opamp.h.
#define OPAMP4_CSR_VPS_SEL_PB13 (0x3) |
Definition at line 67 of file f3/opamp.h.
#define OPAMP4_CSR_VPS_SEL_PD11 (0x0) |
Definition at line 64 of file f3/opamp.h.
#define OPAMP_CSR | ( | opamp_base | ) | MMIO32((opamp_base) + 0x00) |
Definition at line 34 of file opamp_common_all.h.
#define OPAMP_CSR_CALON (0x1 << 11) |
Definition at line 55 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_10_PERCENT (0x1) |
Definition at line 51 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_3P3_PERCENT (0x0) |
Definition at line 50 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_50_PERCENT (0x2) |
Definition at line 52 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_90_PERCENT (0x3) |
Definition at line 53 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_MASK (0x3) |
Definition at line 48 of file opamp_common_all.h.
#define OPAMP_CSR_CALSEL_SHIFT (12) |
Definition at line 49 of file opamp_common_all.h.
#define OPAMP_CSR_EN (0x1 << 0) |
Definition at line 64 of file opamp_common_all.h.
#define OPAMP_CSR_FORCE_VP (0x1 << 1) |
Definition at line 63 of file opamp_common_all.h.
#define OPAMP_CSR_LOCK (0x1 << 31) |
Definition at line 38 of file opamp_common_all.h.
#define OPAMP_CSR_OUTCAL_MASK (0x1) |
Definition at line 35 of file opamp_common_v1.h.
#define OPAMP_CSR_OUTCAL_NON_HI_INV (0x1) |
Definition at line 38 of file opamp_common_v1.h.
#define OPAMP_CSR_OUTCAL_NON_LO_INV (0x0) |
Definition at line 37 of file opamp_common_v1.h.
#define OPAMP_CSR_OUTCAL_SHIFT (30) |
Definition at line 36 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_16 (0x3) |
Definition at line 47 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM0 (0xb) |
Definition at line 51 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_16_MINUS_VM1 (0xf) |
Definition at line 55 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_2 (0x0) |
Definition at line 44 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM0 (0x8) |
Definition at line 48 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_2_MINUS_VM1 (0xc) |
Definition at line 52 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_4 (0x1) |
Definition at line 45 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM0 (0x9) |
Definition at line 49 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_4_MINUS_VM1 (0xd) |
Definition at line 53 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_8 (0x2) |
Definition at line 46 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM0 (0xa) |
Definition at line 50 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_8_MINUS_VM1 (0xe) |
Definition at line 54 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_MASK (0xf) |
Definition at line 42 of file opamp_common_v1.h.
#define OPAMP_CSR_PGA_GAIN_SHIFT (14) |
Definition at line 43 of file opamp_common_v1.h.
#define OPAMP_CSR_TCM_EN (0x1 << 7) |
Definition at line 63 of file opamp_common_v1.h.
#define OPAMP_CSR_TRIMOFFSETN_MASK (0x1f) |
Definition at line 42 of file opamp_common_all.h.
#define OPAMP_CSR_TRIMOFFSETN_SHIFT (24) |
Definition at line 43 of file opamp_common_all.h.
#define OPAMP_CSR_TRIMOFFSETP_MASK (0x1f) |
Definition at line 45 of file opamp_common_all.h.
#define OPAMP_CSR_TRIMOFFSETP_SHIFT (19) |
Definition at line 46 of file opamp_common_all.h.
#define OPAMP_CSR_TSTREF (0x1 << 29) |
Definition at line 40 of file opamp_common_all.h.
#define OPAMP_CSR_USER_TRIM (0x1 << 18) |
Definition at line 40 of file opamp_common_v1.h.
#define OPAMP_CSR_VM_SEL_FOLLOWER_MODE (0x3) |
Definition at line 66 of file opamp_common_v1.h.
#define OPAMP_CSR_VM_SEL_MASK (0x3) |
Definition at line 57 of file opamp_common_all.h.
#define OPAMP_CSR_VM_SEL_PGA_MODE (0x2) |
Definition at line 65 of file opamp_common_v1.h.
#define OPAMP_CSR_VM_SEL_SHIFT (5) |
Definition at line 58 of file opamp_common_all.h.
#define OPAMP_CSR_VMS_SEL_MASK (0x1) |
Definition at line 60 of file opamp_common_v1.h.
#define OPAMP_CSR_VMS_SEL_SHIFT (8) |
Definition at line 61 of file opamp_common_v1.h.
#define OPAMP_CSR_VP_SEL_MASK (0x3) |
Definition at line 60 of file opamp_common_all.h.
#define OPAMP_CSR_VP_SEL_SHIFT (2) |
Definition at line 61 of file opamp_common_all.h.
#define OPAMP_CSR_VPS_SEL_MASK (0x3) |
Definition at line 57 of file opamp_common_v1.h.
#define OPAMP_CSR_VPS_SEL_SHIFT (9) |
Definition at line 58 of file opamp_common_v1.h.
void opamp_cal_disable | ( | uint32_t | base | ) |
Definition at line 62 of file opamp_common_all.c.
References OPAMP_CSR.
void opamp_cal_enable | ( | uint32_t | base | ) |
Definition at line 57 of file opamp_common_all.c.
References OPAMP_CSR, and OPAMP_CSR_CALON.
void opamp_disable | ( | uint32_t | base | ) |
Definition at line 31 of file opamp_common_all.c.
References OPAMP_CSR.
void opamp_enable | ( | uint32_t | base | ) |
Definition at line 26 of file opamp_common_all.c.
References OPAMP_CSR, and OPAMP_CSR_EN.
void opamp_force_vp_disable | ( | uint32_t | base | ) |
Definition at line 52 of file opamp_common_all.c.
References OPAMP_CSR.
void opamp_force_vp_enable | ( | uint32_t | base | ) |
Definition at line 47 of file opamp_common_all.c.
References OPAMP_CSR, and OPAMP_CSR_FORCE_VP.
void opamp_lock | ( | uint32_t | base | ) |
Definition at line 36 of file opamp_common_all.c.
References OPAMP_CSR, and OPAMP_CSR_LOCK.
void opamp_pga_gain_select | ( | uint32_t | base, |
uint32_t | gain | ||
) |
Definition at line 91 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_PGA_GAIN_MASK, and OPAMP_CSR_PGA_GAIN_SHIFT.
bool opamp_read_outcal | ( | uint32_t | base | ) |
Definition at line 26 of file opamp_common_v1.c.
References OPAMP_CSR, OPAMP_CSR_OUTCAL_MASK, and OPAMP_CSR_OUTCAL_SHIFT.
void opamp_set_calsel | ( | uint32_t | base, |
uint32_t | calsel | ||
) |
Definition at line 41 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_CALSEL_MASK, and OPAMP_CSR_CALSEL_SHIFT.
void opamp_tcm_disable | ( | uint32_t | base | ) |
Definition at line 37 of file opamp_common_v1.c.
References OPAMP_CSR.
void opamp_tcm_enable | ( | uint32_t | base | ) |
Definition at line 32 of file opamp_common_v1.c.
References OPAMP_CSR, and OPAMP_CSR_TCM_EN.
void opamp_trimoffsetn_set | ( | uint32_t | base, |
uint32_t | trim | ||
) |
Definition at line 67 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_TRIMOFFSETN_MASK, and OPAMP_CSR_TRIMOFFSETN_SHIFT.
void opamp_trimoffsetp_set | ( | uint32_t | base, |
uint32_t | trim | ||
) |
Definition at line 74 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_TRIMOFFSETP_MASK, and OPAMP_CSR_TRIMOFFSETP_SHIFT.
void opamp_tstref_disable | ( | uint32_t | base | ) |
void opamp_tstref_enable | ( | uint32_t | base | ) |
void opamp_user_trim_disable | ( | uint32_t | base | ) |
Definition at line 86 of file opamp_common_all.c.
References OPAMP_CSR.
void opamp_user_trim_enable | ( | uint32_t | base | ) |
Definition at line 81 of file opamp_common_all.c.
References OPAMP_CSR, and OPAMP_CSR_USER_TRIM.
void opamp_vm_select | ( | uint32_t | base, |
uint32_t | vm | ||
) |
Definition at line 105 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_VM_SEL_MASK, and OPAMP_CSR_VM_SEL_SHIFT.
void opamp_vms_select | ( | uint32_t | base, |
uint32_t | vms | ||
) |
Definition at line 49 of file opamp_common_v1.c.
References OPAMP_CSR, OPAMP_CSR_VMS_SEL_MASK, and OPAMP_CSR_VMS_SEL_SHIFT.
void opamp_vp_select | ( | uint32_t | base, |
uint32_t | vp | ||
) |
Definition at line 98 of file opamp_common_all.c.
References OPAMP_CSR, OPAMP_CSR_VP_SEL_MASK, and OPAMP_CSR_VP_SEL_SHIFT.
void opamp_vps_select | ( | uint32_t | base, |
uint32_t | vps | ||
) |
Definition at line 42 of file opamp_common_v1.c.
References OPAMP_CSR, OPAMP_CSR_VPS_SEL_MASK, and OPAMP_CSR_VPS_SEL_SHIFT.