CAT2 Peripheral Driver Library

USBPD VBus Control driver. More...

Modules

 Enumerated Types
 
 Functions
 

Macros

#define GET_VBUS_OVP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vbusOvpConfig)
 VBUS OVP TABLE.
 
#define GET_VBUS_OCP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vbusOcpConfig)
 VBUS OCP TABLE.
 
#define GET_VBUS_RCP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vbusRcpConfig)
 VBUS RCP TABLE.
 
#define GET_VBUS_UVP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vbusUvpConfig)
 VBUS UVP TABLE.
 
#define GET_VCONN_OCP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vconnOcpConfig)
 VCONN OCP TABLE.
 
#define GET_VBUS_SCP_TABLE(x)   (((cy_stc_usbpd_context_t *)x)->usbpdConfig->vbusScpConfig)
 VBUS SCP TABLE.
 
#define PD_ADC_DEFAULT_VDDD_VOLT_MV   (3300u)
 Default reference voltage on M0S8-USBPD IP. More...
 
#define MX_PD_ADC_REF_VOLT_MV   (2000u)
 Reference voltage in MX_PD IP (2.0 V)
 
#define PD_ADC_BAND_GAP_VOLT_MV   (1200u)
 Bandgap voltage in millivolt. More...
 
#define PD_ADC_MAX_VALUE   (0xFFu)
 Maximum ADC count. More...
 
#define PD_ADC_NUM_LEVELS   (PD_ADC_MAX_VALUE + 1u)
 Number of ADC levels. More...
 
#define PD_ADC_LEVEL_MIN_THRESHOLD   (4u)
 The minimum comparator output shall be limited to this value to guard against ground bounce and other ADC noise.
 
#define PD_ADC_LEVEL_MAX_THRESHOLD   (254u)
 The maximum comparator output shall be limited to this value to guard against max level.
 
#define PD_ADC_TIMEOUT_COUNT   (200UL)
 Loop timeout count for ADC. More...
 
#define VBUS_MON_DIV_20P_VAL   (10u)
 Multiplied by 2. More...
 
#define VBUS_MON_DIV_10P_VAL   (20u)
 Multiplied by 2. More...
 
#define VBUS_MON_DIV_9P_VAL   (22u)
 Multiplied by 2. More...
 
#define VBUS_MON_DIV_8P_VAL   (25u)
 Multiplied by 2. More...
 
#define VBUS_MON_DIV_6P_VAL   (33u)
 Multiplied by 2. More...
 
#define VBAT_MON_DIV_8P_VAL   (25u)
 Multiplied by 2. More...
 
#define VBUS_DIV_20_PER_MAX_VOLT   (9000U)
 Maximum voltage in mV that can be measured with 20% divider. More...
 
#define CSA_IDEAL_RSENSE   (50u)
 Ideal Rsense value in 0.1mOhm units.
 
#define VBUS_CHANGE_PER_DAC_BIT   (20)
 The macro holds the VBUS change per change in iDAC setting. More...
 

Detailed Description

USBPD VBus Control driver.

Macro Definition Documentation

◆ PD_ADC_DEFAULT_VDDD_VOLT_MV

#define PD_ADC_DEFAULT_VDDD_VOLT_MV   (3300u)

Default reference voltage on M0S8-USBPD IP.

◆ PD_ADC_BAND_GAP_VOLT_MV

#define PD_ADC_BAND_GAP_VOLT_MV   (1200u)

Bandgap voltage in millivolt.

◆ PD_ADC_MAX_VALUE

#define PD_ADC_MAX_VALUE   (0xFFu)

Maximum ADC count.

◆ PD_ADC_NUM_LEVELS

#define PD_ADC_NUM_LEVELS   (PD_ADC_MAX_VALUE + 1u)

Number of ADC levels.

◆ PD_ADC_TIMEOUT_COUNT

#define PD_ADC_TIMEOUT_COUNT   (200UL)

Loop timeout count for ADC.

◆ VBUS_MON_DIV_20P_VAL

#define VBUS_MON_DIV_20P_VAL   (10u)

Multiplied by 2.

◆ VBUS_MON_DIV_10P_VAL

#define VBUS_MON_DIV_10P_VAL   (20u)

Multiplied by 2.

◆ VBUS_MON_DIV_9P_VAL

#define VBUS_MON_DIV_9P_VAL   (22u)

Multiplied by 2.

◆ VBUS_MON_DIV_8P_VAL

#define VBUS_MON_DIV_8P_VAL   (25u)

Multiplied by 2.

◆ VBUS_MON_DIV_6P_VAL

#define VBUS_MON_DIV_6P_VAL   (33u)

Multiplied by 2.

◆ VBAT_MON_DIV_8P_VAL

#define VBAT_MON_DIV_8P_VAL   (25u)

Multiplied by 2.

◆ VBUS_DIV_20_PER_MAX_VOLT

#define VBUS_DIV_20_PER_MAX_VOLT   (9000U)

Maximum voltage in mV that can be measured with 20% divider.

◆ VBUS_CHANGE_PER_DAC_BIT

#define VBUS_CHANGE_PER_DAC_BIT   (20)

The macro holds the VBUS change per change in iDAC setting.

This voltage assumes that the feedback divider resistance (R1) is 200KOhms. It needs to be 200KOhm for supporting PPS operation. This value is used in signed number operation and should be left as signed. This value should not be changed. The iDAC sink has 1024 steps of 20mV and iDAC source has 128 steps of 20mV. No bound checks are added as extreme values are outside operating condition.