Enumerations | |
enum | cy_en_ctb_opamp_sel_t { CY_CTB_OPAMP_NONE = 0uL, CY_CTB_OPAMP_0 = CTBM_INTR_COMP0_Msk, CY_CTB_OPAMP_1 = CTBM_INTR_COMP1_Msk, CY_CTB_OPAMP_BOTH = CTBM_INTR_COMP0_Msk | CTBM_INTR_COMP1_Msk } |
Most functions allow you to configure a single opamp or both opamps at once. More... | |
enum | cy_en_ctb_deep_sleep_t { CY_CTB_DEEPSLEEP_DISABLE = 0uL, CY_CTB_DEEPSLEEP_ENABLE = CTBM_CTB_CTRL_DEEPSLEEP_ON_Msk } |
Enable or disable CTB while in Deep Sleep mode. More... | |
enum | cy_en_ctb_power_t { CY_CTB_POWER_OFF = 0uL, CY_CTB_POWER_LOW = 1uL, CY_CTB_POWER_MEDIUM = 2uL, CY_CTB_POWER_HIGH = 3uL } |
Configure the power mode of each opamp. More... | |
enum | cy_en_ctb_mode_t { CY_CTB_MODE_OPAMP1X = 0uL, CY_CTB_MODE_OPAMP10X = 1uL << CTBM_OA_RES0_CTRL_OA0_DRIVE_STR_SEL_Pos, CY_CTB_MODE_COMP = 1uL << CTBM_OA_RES0_CTRL_OA0_COMP_EN_Pos } |
The output stage of each opamp can be configured for low-drive strength (1X) to drive internal circuits, for high-drive strength (10X) to drive external circuits, or as a comparator. More... | |
enum | cy_en_ctb_pump_t { CY_CTB_PUMP_DISABLE = 0uL, CY_CTB_PUMP_ENABLE = CTBM_OA_RES0_CTRL_OA0_PUMP_EN_Msk } |
Each opamp has a charge pump to increase the input range to the rails. More... | |
enum | cy_en_ctb_comp_edge_t { CY_CTB_COMP_EDGE_DISABLE = 0uL, CY_CTB_COMP_EDGE_RISING = 1uL << CTBM_OA_RES0_CTRL_OA0_COMPINT_Pos, CY_CTB_COMP_EDGE_FALLING = 2uL << CTBM_OA_RES0_CTRL_OA0_COMPINT_Pos, CY_CTB_COMP_EDGE_BOTH = 3uL << CTBM_OA_RES0_CTRL_OA0_COMPINT_Pos } |
Configure the type of edge that will trigger a comparator interrupt or disable the interrupt entirely. More... | |
enum | cy_en_ctb_comp_level_t { CY_CTB_COMP_DSI_TRIGGER_OUT_PULSE = 0uL, CY_CTB_COMP_DSI_TRIGGER_OUT_LEVEL = CTBM_OA_RES0_CTRL_OA0_DSI_LEVEL_Msk } |
Configure the comparator DSI trigger output level when output is synchronized. More... | |
enum | cy_en_ctb_comp_bypass_t { CY_CTB_COMP_BYPASS_SYNC = 0uL, CY_CTB_COMP_BYPASS_NO_SYNC = CTBM_OA_RES0_CTRL_OA0_BYPASS_DSI_SYNC_Msk } |
Bypass the comparator output synchronization for DSI trigger. More... | |
enum | cy_en_ctb_comp_hyst_t { CY_CTB_COMP_HYST_DISABLE = 0uL, CY_CTB_COMP_HYST_10MV = CTBM_OA_RES0_CTRL_OA0_HYST_EN_Msk } |
Disable or enable the 10 mV hysteresis for the comparator. More... | |
enum | cy_en_ctb_switch_state_t { CY_CTB_SWITCH_OPEN = 0uL, CY_CTB_SWITCH_CLOSE = 1uL } |
Switch state, either open or closed, to be used in Cy_CTB_SetAnalogSwitch. More... | |
enum | cy_en_ctb_switch_register_sel_t { CY_CTB_SWITCH_OA0_SW = 0uL, CY_CTB_SWITCH_OA1_SW = 1uL, CY_CTB_SWITCH_CTD_SW = 2uL } |
The switch register to be used in Cy_CTB_SetAnalogSwitch. More... | |
enum | cy_en_ctb_oa0_switches_t { CY_CTB_SW_OA0_POS_AMUXBUSA_MASK = CTBM_OA0_SW_OA0P_A00_Msk, CY_CTB_SW_OA0_POS_PIN0_MASK = CTBM_OA0_SW_OA0P_A20_Msk, CY_CTB_SW_OA0_POS_PIN6_MASK = CTBM_OA0_SW_OA0P_A30_Msk, CY_CTB_SW_OA0_NEG_PIN1_MASK = CTBM_OA0_SW_OA0M_A11_Msk, CY_CTB_SW_OA0_NEG_OUT_MASK = CTBM_OA0_SW_OA0M_A81_Msk, CY_CTB_SW_OA0_OUT_SARBUS0_MASK = CTBM_OA0_SW_OA0O_D51_Msk, CY_CTB_SW_OA0_OUT_SHORT_1X_10X_MASK = CTBM_OA0_SW_OA0O_D81_Msk } |
Switch masks for Opamp0 to be used in Cy_CTB_SetAnalogSwitch. More... | |
enum | cy_en_ctb_oa1_switches_t { CY_CTB_SW_OA1_POS_AMUXBUSB_MASK = CTBM_OA1_SW_OA1P_A03_Msk, CY_CTB_SW_OA1_POS_PIN5_MASK = CTBM_OA1_SW_OA1P_A13_Msk, CY_CTB_SW_OA1_POS_PIN7_MASK = CTBM_OA1_SW_OA1P_A43_Msk, CY_CTB_SW_OA1_POS_AREF_MASK = CTBM_OA1_SW_OA1P_A73_Msk, CY_CTB_SW_OA1_NEG_PIN4_MASK = CTBM_OA1_SW_OA1M_A22_Msk, CY_CTB_SW_OA1_NEG_OUT_MASK = CTBM_OA1_SW_OA1M_A82_Msk, CY_CTB_SW_OA1_OUT_SARBUS0_MASK = CTBM_OA1_SW_OA1O_D52_Msk, CY_CTB_SW_OA1_OUT_SARBUS1_MASK = CTBM_OA1_SW_OA1O_D62_Msk, CY_CTB_SW_OA1_OUT_SHORT_1X_10X_MASK = CTBM_OA1_SW_OA1O_D82_Msk } |
Switch masks for Opamp1 to be used in Cy_CTB_SetAnalogSwitch. More... | |
enum | cy_en_ctb_ctd_switches_t { CY_CTB_SW_CTD_REF_OA1_OUT_MASK = CTBM_CTD_SW_CTDD_CRD_Msk, CY_CTB_SW_CTD_REFSENSE_OA1_NEG_MASK = CTBM_CTD_SW_CTDS_CRS_Msk, CY_CTB_SW_CTD_OUT_OA1_NEG_MASK = CTBM_CTD_SW_CTDS_COR_Msk, CY_CTB_SW_CTD_OUT_PIN6_MASK = CTBM_CTD_SW_CTDO_C6H_Msk, CY_CTB_SW_CTD_OUT_CHOLD_MASK = CTBM_CTD_SW_CTDO_COS_Msk, CY_CTB_SW_CTD_OUT_OA0_1X_OUT_MASK = CTBM_CTD_SW_CTDH_COB_Msk, CY_CTB_SW_CTD_CHOLD_CONNECT_MASK = CTBM_CTD_SW_CTDH_CHD_Msk, CY_CTB_SW_CTD_CHOLD_OA0_POS_MASK = CTBM_CTD_SW_CTDH_CA0_Msk, CY_CTB_SW_CTD_CHOLD_OA0_POS_ISOLATE_MASK = CTBM_CTD_SW_CTDH_CIS_Msk, CY_CTB_SW_CTD_CHOLD_LEAKAGE_REDUCTION_MASK = CTBM_CTD_SW_CTDH_ILR_Msk } |
Switch masks for CTDAC to CTB routing to be used in Cy_CTB_SetAnalogSwitch. More... | |
enum | cy_en_ctb_switch_sar_seq_t { CY_CTB_SW_SEQ_CTRL_D51_MASK = CTBM_CTB_SW_SQ_CTRL_P2_SQ_CTRL23_Msk, CY_CTB_SW_SEQ_CTRL_D52_D62_MASK = CTBM_CTB_SW_SQ_CTRL_P3_SQ_CTRL23_Msk, CY_CTB_SW_SEQ_CTRL_D51_D52_D62_MASK = CTBM_CTB_SW_SQ_CTRL_P2_SQ_CTRL23_Msk | CTBM_CTB_SW_SQ_CTRL_P3_SQ_CTRL23_Msk } |
Masks for CTB switches that can be controlled by the SAR sequencer. More... | |
enum | cy_en_ctb_compensation_cap_t { CY_CTB_OPAMP_COMPENSATION_CAP_OFF = 0uL, CY_CTB_OPAMP_COMPENSATION_CAP_MIN = 1uL, CY_CTB_OPAMP_COMPENSATION_CAP_MED = 2uL, CY_CTB_OPAMP_COMPENSATION_CAP_MAX = 3uL } |
Each opamp also has a programmable compensation capacitor block, that optimizes the stability of the opamp performance based on output load. More... | |
enum | cy_en_ctb_boost_en_t { CY_CTB_OPAMP_BOOST_DISABLE = 0uL, CY_CTB_OPAMP_BOOST_ENABLE = CTBM_OA_RES0_CTRL_OA0_BOOST_EN_Msk } |
Enable or disable the gain booster. More... | |
enum | cy_en_ctb_sample_hold_mode_t { CY_CTB_SH_DISABLE = 0uL, CY_CTB_SH_PREPARE_SAMPLE = 1uL, CY_CTB_SH_SAMPLE = 2uL, CY_CTB_SH_PREPARE_HOLD = 3uL, CY_CTB_SH_HOLD = 4uL } |
Sample and hold modes for firmware sampling of the CTDAC output. More... | |
enum | cy_en_ctb_iptat_t { CY_CTB_IPTAT_NORMAL = 0uL, CY_CTB_IPTAT_LOW = 1uL << PASS_AREF_AREF_CTRL_CTB_IPTAT_SCALE_Pos } |
AREF IPTAT bias current output for the CTB. More... | |
enum | cy_en_ctb_clk_pump_source_t { CY_CTB_CLK_PUMP_SRSS = 0uL, CY_CTB_CLK_PUMP_PERI = 1uL << PASS_AREF_AREF_CTRL_CLOCK_PUMP_PERI_SEL_Pos } |
CTB charge pump clock sources. More... | |
enum | cy_en_ctb_current_mode_t { CY_CTB_CURRENT_HIGH_ACTIVE = 0uL, CY_CTB_CURRENT_HIGH_ACTIVE_DEEPSLEEP = 1uL, CY_CTB_CURRENT_LOW_ACTIVE_DEEPSLEEP = 2uL } |
High level opamp current modes. More... | |
enum | cy_en_ctb_status_t { CY_CTB_SUCCESS = 0x00uL, CY_CTB_BAD_PARAM = CY_CTB_ID | CY_PDL_STATUS_ERROR | 0x01uL } |
Return states for Cy_CTB_Init, Cy_CTB_OpampInit, Cy_CTB_DeInit, and Cy_CTB_FastInit. More... | |
Most functions allow you to configure a single opamp or both opamps at once.
The Cy_CTB_SetInterruptMask function can be called with CY_CTB_OPAMP_NONE and interrupts will be disabled.
Enumerator | |
---|---|
CY_CTB_OPAMP_NONE | For disabling interrupts for both opamps. Used with Cy_CTB_SetInterruptMask |
CY_CTB_OPAMP_0 | For configuring Opamp0. |
CY_CTB_OPAMP_1 | For configuring Opamp1. |
CY_CTB_OPAMP_BOTH | For configuring both Opamp0 and Opamp1. |
enum cy_en_ctb_power_t |
Configure the power mode of each opamp.
Each power setting consumes different levels of current and supports a different input range and gain bandwidth.
Opamp Power | IDD | Gain bandwidth |
---|---|---|
OFF | 0 | NA |
LOW | 350 uA | 1 MHz |
MEDIUM | 600 uA | 3 MHz for 1X, 2.5 MHz for 10x |
HIGH | 1.5 mA | 8 MHz for 1X, 6 MHz for 10x |
enum cy_en_ctb_mode_t |
The output stage of each opamp can be configured for low-drive strength (1X) to drive internal circuits, for high-drive strength (10X) to drive external circuits, or as a comparator.
enum cy_en_ctb_pump_t |
Each opamp has a charge pump to increase the input range to the rails.
When the charge pump is enabled, the input range is 0 to VDDA. When disabled, the input range is 0 to VDDA - 1.5 V.
Charge Pump | Input Range (V) |
---|---|
OFF | 0 to VDDA-1.5 |
ON | 0 to VDDA |
Note that in Deep Sleep mode, the charge pump is disabled so the input range is reduced.
Enumerator | |
---|---|
CY_CTB_PUMP_DISABLE | Charge pump is disabled for an input range of 0 to VDDA - 1.5 V. |
CY_CTB_PUMP_ENABLE | Charge pump is enabled for an input range of 0 to VDDA. |
Configure the type of edge that will trigger a comparator interrupt or disable the interrupt entirely.
Switch state, either open or closed, to be used in Cy_CTB_SetAnalogSwitch.
Enumerator | |
---|---|
CY_CTB_SWITCH_OPEN | Open the switch. |
CY_CTB_SWITCH_CLOSE | Close the switch. |
The switch register to be used in Cy_CTB_SetAnalogSwitch.
The CTB has three registers for configuring the switch routing matrix.
Enumerator | |
---|---|
CY_CTB_SWITCH_OA0_SW | Switch register for Opamp0. |
CY_CTB_SWITCH_OA1_SW | Switch register for Opamp1. |
CY_CTB_SWITCH_CTD_SW | Switch register for CTDAC routing. |
Switch masks for Opamp0 to be used in Cy_CTB_SetAnalogSwitch.
Switch masks for Opamp1 to be used in Cy_CTB_SetAnalogSwitch.
Switch masks for CTDAC to CTB routing to be used in Cy_CTB_SetAnalogSwitch.
Masks for CTB switches that can be controlled by the SAR sequencer.
These masks are used in Cy_CTB_EnableSarSeqCtrl and Cy_CTB_DisableSarSeqCtrl.
The SAR ADC subsystem supports analog routes through three CTB switches on SARBUS0 and SARBUS1. This control allows for pins on the CTB dedicated port to route to the SAR ADC input channels:
Each opamp also has a programmable compensation capacitor block, that optimizes the stability of the opamp performance based on output load.
The compensation cap will be set by the driver based on the opamp drive strength (1x or 10x) selection.
enum cy_en_ctb_boost_en_t |
Sample and hold modes for firmware sampling of the CTDAC output.
To perform a sample or a hold, a preparation step must first be executed to open the required switches.
enum cy_en_ctb_iptat_t |
High level opamp current modes.
enum cy_en_ctb_status_t |
Return states for Cy_CTB_Init, Cy_CTB_OpampInit, Cy_CTB_DeInit, and Cy_CTB_FastInit.
Enumerator | |
---|---|
CY_CTB_SUCCESS | Initialization completed successfully. |
CY_CTB_BAD_PARAM | Input pointers were NULL and initialization could not be completed. |