MTB CAT1 Peripheral driver library

General Description

Functions

cy_en_sar2_status_t Cy_SAR2_Init (PASS_SAR_Type *base, const cy_stc_sar2_config_t *config)
 Initializes the SAR2 block. More...
 
__STATIC_INLINE void Cy_SAR2_DeInit (PASS_SAR_Type *base)
 De-initializes the SAR ADC block, returns the register values to default. More...
 
__STATIC_INLINE void Cy_SAR2_Enable (PASS_SAR_Type *base)
 Enables the SAR ADC block. More...
 
__STATIC_INLINE void Cy_SAR2_Disable (PASS_SAR_Type *base)
 Disables the SAR ADC block. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetPendingStatus (const PASS_SAR_Type *base)
 Returns the trigger pending status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetWorkValidStatus (const PASS_SAR_Type *base)
 Returns the work register valid status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetWorkRangeStatus (const PASS_SAR_Type *base)
 Returns work register range status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetWorkRangeHiStatus (const PASS_SAR_Type *base)
 Returns work register range high status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetWorkPulseStatus (const PASS_SAR_Type *base)
 Returns the work register pulse status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetResultValidStatus (const PASS_SAR_Type *base)
 Returns result register valid status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_GetResultRangeHiStatus (const PASS_SAR_Type *base)
 Returns result register range high status. More...
 
cy_en_sar2_status_t Cy_SAR2_Channel_Init (PASS_SAR_Type *base, uint32_t channel, const cy_stc_sar2_channel_config_t *channelConfig)
 Initializes an SAR channel. More...
 
void Cy_SAR2_Channel_DeInit (PASS_SAR_Type *base, uint32_t channel)
 Stops and de-initializes the SAR channel register. More...
 
uint16_t Cy_SAR2_Channel_GetResult (PASS_SAR_Type *base, uint32_t channel, uint32_t *status)
 Returns the conversion result and status. More...
 
uint16_t Cy_SAR2_Channel_GetWorkingData (PASS_SAR_Type *base, uint32_t channel, uint32_t *status)
 Returns the working data and status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetGroupStatus (PASS_SAR_Type *base, uint32_t channel)
 Returns the group conversion status. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_Enable (PASS_SAR_Type *base, uint32_t channel)
 Enables a corresponding channel. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_Disable (PASS_SAR_Type *base, uint32_t channel)
 Disables a corresponding channel. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_SoftwareTrigger (PASS_SAR_Type *base, uint32_t channel)
 Issues a software start trigger. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_SetInterruptMask (PASS_SAR_Type *base, uint32_t channel, uint32_t intrMask)
 Configures the channel interrupt. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptMask (PASS_SAR_Type *base, uint32_t channel)
 Returns interrupt mask configuration. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_ClearInterrupt (PASS_SAR_Type *base, uint32_t channel, uint32_t intrMask)
 Clears the interrupt. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptStatus (PASS_SAR_Type *base, uint32_t channel)
 Returns the channel interrupt register status. More...
 
__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptStatusMasked (PASS_SAR_Type *base, uint32_t channel)
 Returns interrupt status. More...
 
__STATIC_INLINE void Cy_SAR2_Channel_SetInterrupt (PASS_SAR_Type *base, uint32_t channel, uint32_t intrMask)
 Triggers an interrupt with software. More...
 
cy_en_sar2_status_t Cy_SAR2_Diag_Init (PASS_SAR_Type *base, const cy_stc_sar2_diag_config_t *diagConfig)
 Initializes the diagnosis function. More...
 
__STATIC_INLINE void Cy_SAR2_Diag_Enable (PASS_SAR_Type *base)
 Enables the diagnostic function. More...
 
__STATIC_INLINE void Cy_SAR2_Diag_Disable (PASS_SAR_Type *base)
 Disables the diagnostic function. More...
 
__STATIC_INLINE void Cy_SAR2_TriggerCalibrationUpdate (PASS_SAR_Type *base)
 Triggers calibration update. More...
 
__STATIC_INLINE bool Cy_SAR2_IsCalibrationUpdateDone (PASS_SAR_Type *base)
 Gets the status of calibration update. More...
 
cy_en_sar2_status_t Cy_SAR2_SetDigitalCalibrationValue (PASS_SAR_Type *base, const cy_stc_sar2_digital_calibration_config_t *digCalibConfig)
 Configure SAR ADC digital calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_GetDigitalCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_digital_calibration_config_t *digCalibConfig)
 Gets the SAR ADC digital calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_SetAltDigitalCalibrationValue (PASS_SAR_Type *base, const cy_stc_sar2_digital_calibration_config_t *altDigCalibConfig)
 Configures an alternate SAR digital calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_GetAltDigitalCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_digital_calibration_config_t *altDigCalibConfig)
 Gets an alternate SAR digital calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_SetAnalogCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_analog_calibration_conifg_t *analogCalibConfig)
 Configures an SAR analog calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_GetAnalogCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_analog_calibration_conifg_t *analogCalibConfig)
 Gets an SAR analog calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_SetAltAnalogCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_analog_calibration_conifg_t *altAnalogCalibConfig)
 Configures an alternate SAR analog calibration value. More...
 
cy_en_sar2_status_t Cy_SAR2_GetAltAnalogCalibrationValue (PASS_SAR_Type *base, cy_stc_sar2_analog_calibration_conifg_t *altAnalogCalibConfig)
 Gets an alternate SAR analog calibration value. More...
 
__STATIC_INLINE cy_en_sar2_ref_buf_mode_t Cy_SAR2_GetReferenceBufferMode (PASS_EPASS_MMIO_Type *base)
 Gets ePASS MMIO reference buffer mode. More...
 
__STATIC_INLINE void Cy_SAR2_SetReferenceBufferMode (PASS_EPASS_MMIO_Type *base, cy_en_sar2_ref_buf_mode_t mode)
 Sets ePASS MMIO reference buffer mode. More...
 
cy_en_sar2_status_t Cy_SAR2_SetDebugFreezeMode (PASS_EPASS_MMIO_Type *base, const cy_stc_sar2_debug_freeze_config_t *debConfig)
 Configures the debug pause feature. More...
 
cy_en_sar2_status_t Cy_SAR2_SetGenericTriggerInput (PASS_EPASS_MMIO_Type *base, uint8_t numOfAdc, uint8_t triggerInputNumber, uint8_t genericTriggerValue)
 Configures the generic trigger input selection. More...
 
cy_en_sar2_status_t Cy_SAR2_SetGenericTriggerOutput (PASS_EPASS_MMIO_Type *base, uint8_t numOfAdc, uint8_t triggerOutputNumber, uint8_t genericTriggerValue)
 Configures the generic output trigger selection. More...
 
double Cy_SAR2_CalculateDieTemperature (cy_en_sar2_vdda_range_t VDDARange, uint16_t adcVtempRawValue, uint16_t adcVbgRawValue)
 Calculates the internal temperature from ADC core using Vtemp. More...
 

Function Documentation

◆ Cy_SAR2_Init()

cy_en_sar2_status_t Cy_SAR2_Init ( PASS_SAR_Type *  base,
const cy_stc_sar2_config_t config 
)

Initializes the SAR2 block.

Parameters
baseThe pointer to the SAR ADC block instance.
configThe pointer to the configuration structure cy_stc_sar2_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_DeInit()

__STATIC_INLINE void Cy_SAR2_DeInit ( PASS_SAR_Type *  base)

De-initializes the SAR ADC block, returns the register values to default.

Parameters
base: The pointer to the SAR block.

◆ Cy_SAR2_Enable()

__STATIC_INLINE void Cy_SAR2_Enable ( PASS_SAR_Type *  base)

Enables the SAR ADC block.

Parameters
base: The pointer to the SAR block.

◆ Cy_SAR2_Disable()

__STATIC_INLINE void Cy_SAR2_Disable ( PASS_SAR_Type *  base)

Disables the SAR ADC block.

Parameters
base: The pointer to the SAR block.

◆ Cy_SAR2_GetPendingStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetPendingStatus ( const PASS_SAR_Type *  base)

Returns the trigger pending status.

Parameters
baseThe pointer to the SAR instance.
Returns
Pending status. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0 is pending for a trigger.

◆ Cy_SAR2_GetWorkValidStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetWorkValidStatus ( const PASS_SAR_Type *  base)

Returns the work register valid status.

Parameters
baseThe pointer to the SAR instance.
Returns
Work register valid status. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0's work register is valid.

◆ Cy_SAR2_GetWorkRangeStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetWorkRangeStatus ( const PASS_SAR_Type *  base)

Returns work register range status.

Parameters
baseThe pointer to the SAR instance.
Returns
Work register range status. Each bit correspond a channel, i.e. If bit0 is 1, ch.0 detected a range.

◆ Cy_SAR2_GetWorkRangeHiStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetWorkRangeHiStatus ( const PASS_SAR_Type *  base)

Returns work register range high status.

Parameters
baseThe pointer to the SAR instance.
Returns
Work register range Hi status. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0 detected "out of range" and the value was above the high threshold.

◆ Cy_SAR2_GetWorkPulseStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetWorkPulseStatus ( const PASS_SAR_Type *  base)

Returns the work register pulse status.

Parameters
baseThe pointer to the SAR instance.
Returns
Work register pulse status. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0 detected a pulse.

◆ Cy_SAR2_GetResultValidStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetResultValidStatus ( const PASS_SAR_Type *  base)

Returns result register valid status.

Parameters
baseThe pointer to the SAR instance.
Returns
Result register pulse status. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0's result register is valid.

◆ Cy_SAR2_GetResultRangeHiStatus()

__STATIC_INLINE uint32_t Cy_SAR2_GetResultRangeHiStatus ( const PASS_SAR_Type *  base)

Returns result register range high status.

Parameters
baseThe pointer to the SAR instance.
Returns
Result register range high. Each bit corresponds a channel, i.e. If bit0 is 1, ch.0 detected "out of range" and the value was above the high threshold.

◆ Cy_SAR2_Channel_Init()

cy_en_sar2_status_t Cy_SAR2_Channel_Init ( PASS_SAR_Type *  base,
uint32_t  channel,
const cy_stc_sar2_channel_config_t channelConfig 
)

Initializes an SAR channel.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
channelConfigThe pointer to the configuration structure cy_stc_sar2_channel_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_Channel_DeInit()

void Cy_SAR2_Channel_DeInit ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Stops and de-initializes the SAR channel register.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.

◆ Cy_SAR2_Channel_GetResult()

uint16_t Cy_SAR2_Channel_GetResult ( PASS_SAR_Type *  base,
uint32_t  channel,
uint32_t *  status 
)

Returns the conversion result and status.

Parameters
baseThe pointer to an SAR instance.
channelThe channel number.
statusThe pointer that will return measurement status bits ORed. The pointer can be NULL, then, s status is not returned.
Returns
Conversion result.

◆ Cy_SAR2_Channel_GetWorkingData()

uint16_t Cy_SAR2_Channel_GetWorkingData ( PASS_SAR_Type *  base,
uint32_t  channel,
uint32_t *  status 
)

Returns the working data and status.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
statusThe pointer that will return measurement status bits ORed. The pointer can be NULL, then, a status is not returned.
Returns
Conversion result.

◆ Cy_SAR2_Channel_GetGroupStatus()

__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetGroupStatus ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Returns the group conversion status.

Parameters
baseThe pointer to an SAR instance.
channelThe channel number.
Returns
status The status of the group, conversion status bits ORed.

◆ Cy_SAR2_Channel_Enable()

__STATIC_INLINE void Cy_SAR2_Channel_Enable ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Enables a corresponding channel.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
Note
To enable a group either start with enabling the last channel first and the first channel last, or start the trigger after all channels are enabled.

◆ Cy_SAR2_Channel_Disable()

__STATIC_INLINE void Cy_SAR2_Channel_Disable ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Disables a corresponding channel.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
Note
To disable a group either stop the trigger first or begin with disabling the lowest channel first.

◆ Cy_SAR2_Channel_SoftwareTrigger()

__STATIC_INLINE void Cy_SAR2_Channel_SoftwareTrigger ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Issues a software start trigger.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.

◆ Cy_SAR2_Channel_SetInterruptMask()

__STATIC_INLINE void Cy_SAR2_Channel_SetInterruptMask ( PASS_SAR_Type *  base,
uint32_t  channel,
uint32_t  intrMask 
)

Configures the channel interrupt.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
intrMaskThe mask of interrupts. Select one or more values from Interrupt Masks and "OR" them together:

◆ Cy_SAR2_Channel_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptMask ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Returns interrupt mask configuration.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
Returns
Interrupt mask value Interrupt Masks

◆ Cy_SAR2_Channel_ClearInterrupt()

__STATIC_INLINE void Cy_SAR2_Channel_ClearInterrupt ( PASS_SAR_Type *  base,
uint32_t  channel,
uint32_t  intrMask 
)

Clears the interrupt.

The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
intrMaskThe mask of interrupts to clear. Typically this will be the value returned from Cy_SAR_GetInterruptStatus. Alternately, select one or more values from Interrupt Masks and "OR" them together.

◆ Cy_SAR2_Channel_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptStatus ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Returns the channel interrupt register status.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
Returns
status Contents of the channel interrupt register. See Interrupt Masks.

◆ Cy_SAR2_Channel_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_SAR2_Channel_GetInterruptStatusMasked ( PASS_SAR_Type *  base,
uint32_t  channel 
)

Returns interrupt status.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
Returns
status Contents of the channel interrupt register. See Interrupt Masks.

◆ Cy_SAR2_Channel_SetInterrupt()

__STATIC_INLINE void Cy_SAR2_Channel_SetInterrupt ( PASS_SAR_Type *  base,
uint32_t  channel,
uint32_t  intrMask 
)

Triggers an interrupt with software.

Parameters
baseThe pointer to the SAR instance.
channelThe channel number.
intrMaskThe mask of interrupts to set. Select one or more values from Interrupt Masks and "OR" them together.

◆ Cy_SAR2_Diag_Init()

cy_en_sar2_status_t Cy_SAR2_Diag_Init ( PASS_SAR_Type *  base,
const cy_stc_sar2_diag_config_t diagConfig 
)

Initializes the diagnosis function.

Parameters
baseThe pointer to the SAR instance.
diagConfigThe pointer to the configuration structure cy_stc_sar2_diag_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_Diag_Enable()

__STATIC_INLINE void Cy_SAR2_Diag_Enable ( PASS_SAR_Type *  base)

Enables the diagnostic function.

Parameters
baseThe pointer to the hardware SAR block.

◆ Cy_SAR2_Diag_Disable()

__STATIC_INLINE void Cy_SAR2_Diag_Disable ( PASS_SAR_Type *  base)

Disables the diagnostic function.

Parameters
baseThe pointer to the hardware SAR block.

◆ Cy_SAR2_TriggerCalibrationUpdate()

__STATIC_INLINE void Cy_SAR2_TriggerCalibrationUpdate ( PASS_SAR_Type *  base)

Triggers calibration update.

After triggering, coherently copies the values from alternate calibration regs to the current calibration regs.

Parameters
baseThe pointer to the hardware SAR block.
Note
Set an alternate calibration value before calling this function. After triggering, calibration will be updated as soon as the SAR is idle or a "continuous" triggered group completes. To determine whether calibration update is done or not call the Cy_SAR2_IsCalibrationUpdateDone function.

◆ Cy_SAR2_IsCalibrationUpdateDone()

__STATIC_INLINE bool Cy_SAR2_IsCalibrationUpdateDone ( PASS_SAR_Type *  base)

Gets the status of calibration update.

Parameters
baseThe pointer to the hardware SAR block.
Returns
If true, calibration update is done. If false, calibration update is not yet done.

◆ Cy_SAR2_SetDigitalCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_SetDigitalCalibrationValue ( PASS_SAR_Type *  base,
const cy_stc_sar2_digital_calibration_config_t digCalibConfig 
)

Configure SAR ADC digital calibration value.

Parameters
baseThe pointer to the SAR instance.
digCalibConfigThe pointer to the configuration structure cy_stc_sar2_digital_calibration_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_GetDigitalCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_GetDigitalCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_digital_calibration_config_t digCalibConfig 
)

Gets the SAR ADC digital calibration value.

Parameters
baseThe pointer to the SAR instance.
digCalibConfigThe pointer to the output configuration structure cy_stc_sar2_digital_calibration_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_SetAltDigitalCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_SetAltDigitalCalibrationValue ( PASS_SAR_Type *  base,
const cy_stc_sar2_digital_calibration_config_t altDigCalibConfig 
)

Configures an alternate SAR digital calibration value.

Parameters
baseThe pointer to the SAR instance.
altDigCalibConfigThe pointer to the configuration structure cy_stc_sar2_digital_calibration_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_GetAltDigitalCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_GetAltDigitalCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_digital_calibration_config_t altDigCalibConfig 
)

Gets an alternate SAR digital calibration value.

Parameters
baseThe pointer to the SAR instance.
altDigCalibConfigThe utput pointer to the configuration structure cy_stc_sar2_digital_calibration_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_SetAnalogCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_SetAnalogCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_analog_calibration_conifg_t analogCalibConfig 
)

Configures an SAR analog calibration value.

Parameters
baseThe pointer to the SAR instance.
analogCalibConfigThe pointer to the configuration structure cy_stc_sar2_analog_calibration_conifg_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_GetAnalogCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_GetAnalogCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_analog_calibration_conifg_t analogCalibConfig 
)

Gets an SAR analog calibration value.

Parameters
baseThe pointer to the SAR instance.
analogCalibConfigThe utput pointer to the configuration structure cy_stc_sar2_analog_calibration_conifg_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_SetAltAnalogCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_SetAltAnalogCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_analog_calibration_conifg_t altAnalogCalibConfig 
)

Configures an alternate SAR analog calibration value.

Parameters
baseThe pointer to the SAR instance.
altAnalogCalibConfigThe pointer to the configuration structure cy_stc_sar2_analog_calibration_conifg_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_GetAltAnalogCalibrationValue()

cy_en_sar2_status_t Cy_SAR2_GetAltAnalogCalibrationValue ( PASS_SAR_Type *  base,
cy_stc_sar2_analog_calibration_conifg_t altAnalogCalibConfig 
)

Gets an alternate SAR analog calibration value.

Parameters
baseThe pointer to the SAR instance.
altAnalogCalibConfigThe utput pointer to the configuration structure cy_stc_sar2_analog_calibration_conifg_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_GetReferenceBufferMode()

__STATIC_INLINE cy_en_sar2_ref_buf_mode_t Cy_SAR2_GetReferenceBufferMode ( PASS_EPASS_MMIO_Type *  base)

Gets ePASS MMIO reference buffer mode.

Parameters
baseThe pointer to the PASS instance.
Returns
cy_en_sar2_ref_buf_mode_t

◆ Cy_SAR2_SetReferenceBufferMode()

__STATIC_INLINE void Cy_SAR2_SetReferenceBufferMode ( PASS_EPASS_MMIO_Type *  base,
cy_en_sar2_ref_buf_mode_t  mode 
)

Sets ePASS MMIO reference buffer mode.

Parameters
baseThe pointer to the PASS instance.
modeThe reference buffer mode number.

◆ Cy_SAR2_SetDebugFreezeMode()

cy_en_sar2_status_t Cy_SAR2_SetDebugFreezeMode ( PASS_EPASS_MMIO_Type *  base,
const cy_stc_sar2_debug_freeze_config_t debConfig 
)

Configures the debug pause feature.

Parameters
baseThe pointer to the PASS instance.
debConfigThe utput pointer to the configuration structure cy_stc_sar2_debug_freeze_config_t.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_SetGenericTriggerInput()

cy_en_sar2_status_t Cy_SAR2_SetGenericTriggerInput ( PASS_EPASS_MMIO_Type *  base,
uint8_t  numOfAdc,
uint8_t  triggerInputNumber,
uint8_t  genericTriggerValue 
)

Configures the generic trigger input selection.

Parameters
baseThe pointer to the PASS instance.
numOfAdcThe ADC channel number.
triggerInputNumberThe generic input trigger number to be set up.
genericTriggerValueThe generic input trigger to be used as a corresponding trigger input #.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_SetGenericTriggerOutput()

cy_en_sar2_status_t Cy_SAR2_SetGenericTriggerOutput ( PASS_EPASS_MMIO_Type *  base,
uint8_t  numOfAdc,
uint8_t  triggerOutputNumber,
uint8_t  genericTriggerValue 
)

Configures the generic output trigger selection.

Parameters
baseThe pointer to the PASS instance.
numOfAdcThe ADC channel number
triggerOutputNumberThe generic input trigger number to be set up.
genericTriggerValueThe generic input trigger to be used as a corresponding trigger input number.
Returns
cy_en_sar2_status_t

◆ Cy_SAR2_CalculateDieTemperature()

double Cy_SAR2_CalculateDieTemperature ( cy_en_sar2_vdda_range_t  VDDARange,
uint16_t  adcVtempRawValue,
uint16_t  adcVbgRawValue 
)

Calculates the internal temperature from ADC core using Vtemp.

The API is implemented to calculate the temperature from the 2nd order equation of sort data with corrected class data. The API will convert sort data into [3][3] matrix and class data into [2][2] matrix.

Parameters
VDDARangeVDDA voltage range, cy_en_sar2_vdda_range_t.
adcVtempRawValueThe ADC counts the raw value of the temperature diode.
adcVbgRawValueThe ADC counts raw value of the Vbg voltage.
Returns
Temperature Value