CAT2 Peripheral Driver Library

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_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_output_t {
  CY_CTB_MODE_OPAMP_INTERNAL = 0UL,
  CY_CTB_MODE_OPAMP_EXTERNAL = 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_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
}
 Each opamp has a charge pump to increase the input range to the rails. More...
 
enum  cy_en_ctb_comp_level_t {
  CY_CTB_COMP_TRIGGER_OUT_PULSE = 0UL,
  CY_CTB_COMP_TRIGGER_OUT_LEVEL = CTBM_OA_RES0_CTRL_OA0_DSI_LEVEL_Msk
}
 Configure the comparator trigger output level when the output is synchronized. 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_clk_pump_source_t {
  CY_CTB_CLK_PUMP_HF_DIV_2 = 0UL,
  CY_CTB_CLK_PUMP_HF = 1UL,
  CY_CTB_CLK_PUMP_SRSS = 3UL
}
 CTB charge pump clock sources. More...
 
enum  cy_en_ctb_dsab_bias_source_t {
  CY_CTB_SRSS_ZTC_DSAB_PTAT = 0UL,
  CY_CTB_DSAB_PTAT_SRSS_ZTC = 1UL,
  CY_CTB_DSAB_PTAT_NO_ZTC = 2UL,
  CY_CTB_NO_ZTC_DSAB_PTAT = 3UL
}
 CTB bias current sources The CTB uses two reference current generators, IPTAT and IZTC from DSAB block. 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 and Cy_CTB_DeInit. More...
 

Detailed Description

Enumeration Type Documentation

◆ cy_en_ctb_opamp_sel_t

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.

CY_CTB_OPAMP_0 

For configuring Opamp0.

CY_CTB_OPAMP_1 

For configuring Opamp1.

CY_CTB_OPAMP_BOTH 

For configuring both Opamp0 and Opamp1.

◆ 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. See the device datasheet for more details.

Enumerator
CY_CTB_POWER_OFF 

Opamp is off.

CY_CTB_POWER_LOW 

Low power mode.

CY_CTB_POWER_MEDIUM 

Medium power mode.

CY_CTB_POWER_HIGH 

High power mode.

◆ cy_en_ctb_output_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.

Enumerator
CY_CTB_MODE_OPAMP_INTERNAL 

Configure opamp for low-drive strength for internal connections (1x)

CY_CTB_MODE_OPAMP_EXTERNAL 

Configure opamp high-drive strength for driving a device pin (10x)

CY_CTB_MODE_COMP 

Configure opamp as a comparator.

◆ cy_en_ctb_comp_edge_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 PumpInput 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. Configure the type of edge that will trigger a comparator interrupt or disable the interrupt entirely.

Enumerator
CY_CTB_COMP_EDGE_DISABLE 

Disabled, no interrupts generated.

CY_CTB_COMP_EDGE_RISING 

The rising edge generates an interrupt.

CY_CTB_COMP_EDGE_FALLING 

The falling edge generates an interrupt.

CY_CTB_COMP_EDGE_BOTH 

Both edges generate an interrupt.

◆ cy_en_ctb_comp_level_t

Configure the comparator trigger output level when the output is synchronized.

Enumerator
CY_CTB_COMP_TRIGGER_OUT_PULSE 

Send trigger pulse on each edge of the comparator output.

CY_CTB_COMP_TRIGGER_OUT_LEVEL 

The trigger output is the synchronized version of a comparator output.

◆ cy_en_ctb_compensation_cap_t

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 (internal 1x or external 10x) selection.

Enumerator
CY_CTB_OPAMP_COMPENSATION_CAP_OFF 

No compensation.

CY_CTB_OPAMP_COMPENSATION_CAP_MIN 

Minimum compensation - for internal (1x) drive.

CY_CTB_OPAMP_COMPENSATION_CAP_MED 

Medium compensation.

CY_CTB_OPAMP_COMPENSATION_CAP_MAX 

Maximum compensation - for external (10x) drive.

◆ cy_en_ctb_clk_pump_source_t

CTB charge pump clock sources.

Enumerator
CY_CTB_CLK_PUMP_HF_DIV_2 

Use the high frequency clock divided by 2.

See High-Frequency Clock.

CY_CTB_CLK_PUMP_HF 

Use the high frequency clock.

See High-Frequency Clock.

CY_CTB_CLK_PUMP_SRSS 

Use a dedicated pump clock from SRSS Pump Clock.

Call the Cy_SysClk_ClkPumpSetSource() to configure the pump clock.

◆ cy_en_ctb_dsab_bias_source_t

CTB bias current sources The CTB uses two reference current generators, IPTAT and IZTC from DSAB block.

Enumerator
CY_CTB_SRSS_ZTC_DSAB_PTAT 

(default value) The ZTC output from SRSS and PTAT output from Deep Sleep Amplifier Bias (DSAB)

CY_CTB_DSAB_PTAT_SRSS_ZTC 

The ZTC output from Deep Sleep Amplifier Bias (DSAB) and PTAT output from SRSS.

CY_CTB_DSAB_PTAT_NO_ZTC 

the ZTC output from Deep Sleep Analog Bias (DSAB) and No PTAT output

CY_CTB_NO_ZTC_DSAB_PTAT 

No ZTC output and PTAT output from Deep Sleep Amplifier Bias (DSAB)

◆ cy_en_ctb_status_t

Return states for Cy_CTB_Init, Cy_CTB_OpampInit and Cy_CTB_DeInit.

Enumerator
CY_CTB_SUCCESS 

The initialization is completed successfully.

CY_CTB_BAD_PARAM 

The input pointers were NULL and the initialization could not be completed.