MTB CAT1 Peripheral driver library
Channel Configuration Register Enums

General Description

This set of enumerations aids in configuring the SAR CHAN_CONFIG register.

Enumerations

enum  cy_en_sar_chan_config_input_mode_t {
  CY_SAR_CHAN_SINGLE_ENDED = 0UL,
  CY_SAR_CHAN_DIFFERENTIAL_PAIRED = SAR_CHAN_CONFIG_DIFFERENTIAL_EN_Msk,
  CY_SAR_CHAN_DIFFERENTIAL_UNPAIRED = SAR_CHAN_CONFIG_NEG_ADDR_EN_Msk
}
 Configure the input mode of the channel. More...
 
enum  cy_en_sar_chan_config_pos_pin_addr_t {
  CY_SAR_CHAN_POS_PIN_ADDR_0 = 0UL,
  CY_SAR_CHAN_POS_PIN_ADDR_1 = 1UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_2 = 2UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_3 = 3UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_4 = 4UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_5 = 5UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_6 = 6UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos,
  CY_SAR_CHAN_POS_PIN_ADDR_7 = 7UL << SAR_CHAN_CONFIG_POS_PIN_ADDR_Pos
}
 Configure address of the pin connected to the Vplus terminal of the SARADC. More...
 
enum  cy_en_sar_chan_config_pos_port_addr_t {
  CY_SAR_POS_PORT_ADDR_SARMUX = 0UL,
  CY_SAR_POS_PORT_ADDR_CTB0 = 1UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_CTB1 = 2UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_CTB2 = 3UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_CTB3 = 4UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_AROUTE_VIRT2 = 5UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_AROUTE_VIRT1 = 6UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_POS_PORT_ADDR_SARMUX_VIRT = 7UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos
}
 Configure address of the port that contains the pin connected to the Vplus terminal of the SARADC. More...
 
enum  cy_en_sar_chan_config_avg_en_t {
  CY_SAR_CHAN_AVG_DISABLE = 0UL,
  CY_SAR_CHAN_AVG_ENABLE = 1UL << SAR_CHAN_CONFIG_AVG_EN_Pos
}
 Enable or disable averaging for the channel. More...
 
enum  cy_en_sar_chan_config_sample_time_t {
  CY_SAR_CHAN_SAMPLE_TIME_0 = 0UL,
  CY_SAR_CHAN_SAMPLE_TIME_1 = 1UL << SAR_CHAN_CONFIG_SAMPLE_TIME_SEL_Pos,
  CY_SAR_CHAN_SAMPLE_TIME_2 = 2UL << SAR_CHAN_CONFIG_SAMPLE_TIME_SEL_Pos,
  CY_SAR_CHAN_SAMPLE_TIME_3 = 3UL << SAR_CHAN_CONFIG_SAMPLE_TIME_SEL_Pos
}
 Select which sample time to use for the channel. More...
 
enum  cy_en_sar_chan_config_neg_pin_addr_t {
  CY_SAR_CHAN_NEG_PIN_ADDR_0 = 0UL,
  CY_SAR_CHAN_NEG_PIN_ADDR_1 = 1UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_2 = 2UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_3 = 3UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_4 = 4UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_5 = 5UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_6 = 6UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos,
  CY_SAR_CHAN_NEG_PIN_ADDR_7 = 7UL << SAR_CHAN_CONFIG_NEG_PIN_ADDR_Pos
}
 Configure address of the pin connected to the Vminus terminal of the SARADC. More...
 
enum  cy_en_sar_chan_config_neg_port_addr_t {
  CY_SAR_NEG_PORT_ADDR_SARMUX = 0UL,
  CY_SAR_NEG_PORT_ADDR_AROUTE_VIRT2 = 5UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_NEG_PORT_ADDR_AROUTE_VIRT1 = 6UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos,
  CY_SAR_NEG_PORT_ADDR_SARMUX_VIRT = 7UL << SAR_CHAN_CONFIG_POS_PORT_ADDR_Pos
}
 Configure address of the port that contains the pin connected to the Vminus terminal of the SARADC. More...
 
enum  cy_en_sar_inj_chan_config_port_addr_t {
  CY_SAR_INJ_PORT_ADDR_SARMUX = 0UL,
  CY_SAR_INJ_PORT_ADDR_CTB0 = 1UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos,
  CY_SAR_INJ_PORT_ADDR_CTB1 = 2UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos,
  CY_SAR_INJ_PORT_ADDR_CTB2 = 3UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos,
  CY_SAR_INJ_PORT_ADDR_CTB3 = 4UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos,
  CY_SAR_INJ_PORT_ADDR_AROUTE_VIRT = 6UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos,
  CY_SAR_INJ_PORT_ADDR_SARMUX_VIRT = 7UL << SAR_INJ_CHAN_CONFIG_INJ_PORT_ADDR_Pos
}
 Configure address of the port that contains the pin connected to the Vplus terminal of the injection channel. More...
 

Enumeration Type Documentation

◆ cy_en_sar_chan_config_input_mode_t

Configure the input mode of the channel.

  • Single ended channel: the cy_en_sar_ctrl_neg_sel_t selection in the uint32_t ctrl register determines what drives the Vminus pin
  • Differential paired: Vplus and Vminus are a pair. Bit 0 of POS_PIN_ADDR is ignored and considered to be 0. In other words, POS_PIN_ADDR points to the even pin of a pin pair. The even pin is connected to Vplus and the odd pin is connected to Vminus. POS_PORT_ADDR is used to identify the port that contains the pins.
  • Differential unpaired: The NEG_PIN_ADDR and NEG_PORT_ADDR determine what drives the Vminus pin. This is a variation of differential mode with no even-odd pair limitation
Enumerator
CY_SAR_CHAN_SINGLE_ENDED 

Single ended channel.

CY_SAR_CHAN_DIFFERENTIAL_PAIRED 

Differential with even-odd pair limitation.

CY_SAR_CHAN_DIFFERENTIAL_UNPAIRED 

Differential with no even-odd pair limitation.

◆ cy_en_sar_chan_config_pos_pin_addr_t

Configure address of the pin connected to the Vplus terminal of the SARADC.

Enumerator
CY_SAR_CHAN_POS_PIN_ADDR_0 

Pin 0 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_1 

Pin 1 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_2 

Pin 2 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_3 

Pin 3 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_4 

Pin 4 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_5 

Pin 5 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_6 

Pin 6 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

CY_SAR_CHAN_POS_PIN_ADDR_7 

Pin 7 on port specified in cy_en_sar_chan_config_pos_port_addr_t.

◆ cy_en_sar_chan_config_pos_port_addr_t

Configure address of the port that contains the pin connected to the Vplus terminal of the SARADC.

  • CY_SAR_POS_PORT_ADDR_SARMUX is for the dedicated SARMUX port (8 pins)
  • Port 1 through 4 are respectively the pins of CTB0, CTB1, CTB2, and CTB3 (if present)
  • Port 7, 5, and 6 (VPORT0/1/2) are the groups of internal signals that can be selected in the SARMUX or AROUTE (if present).

See the SARMUX and SARSEQ section for more guidance.

Enumerator
CY_SAR_POS_PORT_ADDR_SARMUX 

Dedicated SARMUX port with 8 possible pins.

CY_SAR_POS_PORT_ADDR_CTB0 

Outputs from CTB0, if present.

CY_SAR_POS_PORT_ADDR_CTB1 

Outputs from CTB1, if present.

CY_SAR_POS_PORT_ADDR_CTB2 

Outputs from CTB2, if present.

CY_SAR_POS_PORT_ADDR_CTB3 

Outputs from CTB3, if present.

CY_SAR_POS_PORT_ADDR_AROUTE_VIRT2 

AROUTE virtual port (VPORT2), if present.

CY_SAR_POS_PORT_ADDR_AROUTE_VIRT1 

AROUTE virtual port (VPORT1), if present.

CY_SAR_POS_PORT_ADDR_SARMUX_VIRT 

SARMUX virtual port for DieTemp and AMUXBUSA/B.

◆ cy_en_sar_chan_config_avg_en_t

Enable or disable averaging for the channel.

Enumerator
CY_SAR_CHAN_AVG_DISABLE 

Disable averaging for the channel.

CY_SAR_CHAN_AVG_ENABLE 

Enable averaging for the channel.

◆ cy_en_sar_chan_config_sample_time_t

Select which sample time to use for the channel.

There are four global samples times available set by uint32_t sampleTime01 and uint32_t sampleTime23.

Enumerator
CY_SAR_CHAN_SAMPLE_TIME_0 

Use sample time 0 for the channel.

CY_SAR_CHAN_SAMPLE_TIME_1 

Use sample time 1 for the channel.

CY_SAR_CHAN_SAMPLE_TIME_2 

Use sample time 2 for the channel.

CY_SAR_CHAN_SAMPLE_TIME_3 

Use sample time 3 for the channel.

◆ cy_en_sar_chan_config_neg_pin_addr_t

Configure address of the pin connected to the Vminus terminal of the SARADC.

Enumerator
CY_SAR_CHAN_NEG_PIN_ADDR_0 

Pin 0 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_1 

Pin 1 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_2 

Pin 2 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_3 

Pin 3 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_4 

Pin 4 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_5 

Pin 5 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_6 

Pin 6 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

CY_SAR_CHAN_NEG_PIN_ADDR_7 

Pin 7 on port specified in cy_en_sar_chan_config_neg_port_addr_t.

◆ cy_en_sar_chan_config_neg_port_addr_t

Configure address of the port that contains the pin connected to the Vminus terminal of the SARADC.

  • Port 0 is 8 pins of the SARMUX
  • Port 7, 5, and 6 (VPORT0/1/2) are the groups of internal signals that can be selected in the SARMUX or AROUTE (if present).
Enumerator
CY_SAR_NEG_PORT_ADDR_SARMUX 

Dedicated SARMUX port with 8 possible pins.

CY_SAR_NEG_PORT_ADDR_AROUTE_VIRT2 

AROUTE virtual port (VPORT2), if present.

CY_SAR_NEG_PORT_ADDR_AROUTE_VIRT1 

AROUTE virtual port (VPORT1), if present.

CY_SAR_NEG_PORT_ADDR_SARMUX_VIRT 

SARMUX virtual port for AMUXBUSA/B.

◆ cy_en_sar_inj_chan_config_port_addr_t

Configure address of the port that contains the pin connected to the Vplus terminal of the injection channel.

  • CY_SAR_INJ_PORT_ADDR_SARMUX is for the dedicated SARMUX port (8 pins)
  • Ports 1 through 4 are respectively the pins of CTB0, CTB1, CTB2, and CTB3 (if present)
  • Ports 7 and 6 are the groups of internal signals that can be selected in the SARMUX or AROUTE (if present).

See the SARMUX and SARSEQ section for more guidance.

Enumerator
CY_SAR_INJ_PORT_ADDR_SARMUX 

Dedicated SARMUX port with 8 possible pins.

CY_SAR_INJ_PORT_ADDR_CTB0 

Outputs from CTB0, if present.

CY_SAR_INJ_PORT_ADDR_CTB1 

Outputs from CTB1, if present.

CY_SAR_INJ_PORT_ADDR_CTB2 

Outputs from CTB2, if present.

CY_SAR_INJ_PORT_ADDR_CTB3 

Outputs from CTB3, if present.

CY_SAR_INJ_PORT_ADDR_AROUTE_VIRT 

AROUTE virtual port (VPORT), if present.

CY_SAR_INJ_PORT_ADDR_SARMUX_VIRT 

SARMUX virtual port for DieTemp and AMUXBUSA/B.