CAT2 Peripheral Driver Library

Functions

void Cy_HVSS_Init (const cy_hvss_config_t *configPtr)
 Initialize HVSS. More...
 
void Cy_HVSS_DeInit (void)
 Deinitialize HVSS. More...
 
uint8_t Cy_HVSS_Hvreg_GetStatus (void)
 Gets the status of the HVSS regulator. More...
 
uint8_t Cy_HVSS_LinPhy_GetRxdPin (void)
 Current state of LIN pin. More...
 
void Cy_HVSS_LinPhy_EnableWakeupTimer (void)
 Enable wakeup timer. More...
 
void Cy_HVSS_LinPhy_DisableWakeupTimer (void)
 Disable wakeup timer. More...
 
void Cy_HVSS_LinPhy_EnableFaultTimer (void)
 Enable the fault timer. More...
 
void Cy_HVSS_LinPhy_DisableFaultTimer (void)
 Disable the fault timer. More...
 
void Cy_HVSS_LinPhy_SetPhyMode (cy_hvss_lin_phy_mode_t mode)
 Set mode of LIN-PHY. More...
 
void Cy_Hvss_LinPhy_EnablePhy (void)
 Enable the LIN-PHY. More...
 
void Cy_HVSS_LinPhy_DisablePhy (void)
 Disable the LIN-PHY. More...
 
void Cy_HVSS_LinPhy_ClearInterrupt (uint32_t interrupt)
 Clear the interrupt. More...
 
uint32_t Cy_HVSS_LinPhy_GetIntrMask (void)
 Get the interrupt mask, which indicates the enabled interrupt of HVSS. More...
 
void Cy_HVSS_LinPhy_SetIntrMask (uint32_t interrupt)
 Set the interrupt mask. More...
 
uint32_t Cy_HVSS_LinPhy_GetIntrStatusMasked (void)
 Gets the interrupt masked status. More...
 
uint32_t Cy_HVSS_LinPhy_GetIntrStatus (void)
 Gets the interrupt statuses from the LIN_INTR register. More...
 

Detailed Description

Function Documentation

◆ Cy_HVSS_Init()

void Cy_HVSS_Init ( const cy_hvss_config_t configPtr)

Initialize HVSS.

Note
Applicable to PSOC4 HVMS/PA only.
Parameters
configPtrThe pointer to the configuration structure
Returns
None
Function Usage
/* LIN configuration example */
config.linEnable = true; /* enable LIN transmission */
config.linMode = CY_HVSS_LIN_PHY_MODE_NORMAL_1_5; /* TX on, RX on, 1.5V/us TX edge rate */
config.rfDetect = CY_HVSS_LIN_PHY_SL_ROUND_NORMAL; /* normal signal rounding */
config.linPhyRoute = CY_HVSS_LIN_PHY_INTERFACE_PRIMARY; /* connected to internal LIN controller through HSIOM */
#if (defined (CY_IP_M0S8HVSS_VERSION) && (2U == CY_IP_M0S8HVSS_VERSION))
config.phyInterfaceSel = CY_HVSS_LIN_PHY_0_INTERFACE; /* Select LIN-PHY 0 interface */
#endif /* 2U == CY_IP_M0S8HVSS_VERSION */
/* timers configuration example */
config.wakeupTimerEnable = true; /* can be used for LIN protocol implementation */
config.wakeupTimerValue = 0xFF;
config.faultTimerEnable = true; /* can be used for LIN protocol implementation */
config.faultTimerValue = 0x0FFF;
#if (defined (CY_IP_M0S8HVSS_VERSION) && (1U == CY_IP_M0S8HVSS_VERSION))
/* resistor dividers configuration example */
config.rdivActiveEnable = CY_HVSS_RDIV_MODE_ACTIVE_ONLY; /* Enable in active mode only */
config.rdiv0Enable = true; /* enable divider 0 */
config.rdiv0Scale = CY_HVSS_RDIV_ATTENUATION_16X; /* set divider to 1/16 ratio */
config.rdiv1Enable = true; /* enable divider 1 */
config.rdiv1Scale = CY_HVSS_RDIV_ATTENUATION_24X; /* set divider to 1/24 ratio */
#endif /* 1U == CY_IP_M0S8HVSS_VERSION */
#if (defined (CY_IP_M0S8HVSS_VERSION) && (2U == CY_IP_M0S8HVSS_VERSION))
config.vbatDivEnable = true; /* Enable VBAT voltage divider */
/* protections configuration example */
config.hvregClampMode = CY_HVSS_HVREG_EN_CLAMP_EN_DIODE; /* Zener clamp enable, diode enable */
config.hvregTsdMode = CY_HVSS_HVREG_REG_ON_FOR_TSD; /* Keep Vdd on for TSD event (LIN turns off) */
#endif /* 2U == CY_IP_M0S8HVSS_VERSION */
Cy_HVSS_Init(&config);

◆ Cy_HVSS_DeInit()

void Cy_HVSS_DeInit ( void  )

Deinitialize HVSS.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_Hvreg_GetStatus()

uint8_t Cy_HVSS_Hvreg_GetStatus ( void  )

Gets the status of the HVSS regulator.

Note
Applicable to PSOC4 HVMS/PA only.
Cy_Hvss_Init() must be called before calling Cy_Hvss_Hvreg_GetStatus()
Returns
Composite bitmask. See HV regulator status to get the actual bit value for each status.

◆ Cy_HVSS_LinPhy_GetRxdPin()

uint8_t Cy_HVSS_LinPhy_GetRxdPin ( void  )

Current state of LIN pin.

Note
Except when linMode is CY_HVSS_LIN_PHY_MODE_DISABLED or CY_HVSS_LIN_PHY_MODE_STANDBY, when LIN RXD = 1
Applicable to PSOC4 HVMS/PA only.
Returns
Status of LIN RXD pin.
None

◆ Cy_HVSS_LinPhy_EnableWakeupTimer()

void Cy_HVSS_LinPhy_EnableWakeupTimer ( void  )

Enable wakeup timer.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_DisableWakeupTimer()

void Cy_HVSS_LinPhy_DisableWakeupTimer ( void  )

Disable wakeup timer.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_EnableFaultTimer()

void Cy_HVSS_LinPhy_EnableFaultTimer ( void  )

Enable the fault timer.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_DisableFaultTimer()

void Cy_HVSS_LinPhy_DisableFaultTimer ( void  )

Disable the fault timer.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_SetPhyMode()

void Cy_HVSS_LinPhy_SetPhyMode ( cy_hvss_lin_phy_mode_t  mode)

Set mode of LIN-PHY.

Note
Applicable to PSOC4 HVMS/PA only.
Parameters
modeLIN-PHY mode. See cy_hvss_lin_phy_mode_t
Returns
None

◆ Cy_Hvss_LinPhy_EnablePhy()

void Cy_Hvss_LinPhy_EnablePhy ( void  )

Enable the LIN-PHY.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_DisablePhy()

void Cy_HVSS_LinPhy_DisablePhy ( void  )

Disable the LIN-PHY.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
None

◆ Cy_HVSS_LinPhy_ClearInterrupt()

void Cy_HVSS_LinPhy_ClearInterrupt ( uint32_t  interrupt)

Clear the interrupt.

Note
Applicable to PSOC4 HVMS/PA only.
Parameters
interruptInterrupt composite bitmask. See HVSS interrupts
Returns
None

◆ Cy_HVSS_LinPhy_GetIntrMask()

uint32_t Cy_HVSS_LinPhy_GetIntrMask ( void  )

Get the interrupt mask, which indicates the enabled interrupt of HVSS.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
Composite bitmask. See HVSS interrupts to get the actual bit value for each interrupt.
None

◆ Cy_HVSS_LinPhy_SetIntrMask()

void Cy_HVSS_LinPhy_SetIntrMask ( uint32_t  interrupt)

Set the interrupt mask.

Note
Applicable to PSOC4 HVMS/PA only.
Parameters
interruptInterrupt composite bitmask. See HVSS interrupts
Returns
None

◆ Cy_HVSS_LinPhy_GetIntrStatusMasked()

uint32_t Cy_HVSS_LinPhy_GetIntrStatusMasked ( void  )

Gets the interrupt masked status.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
Bitwise AND between the interrupt request and mask registers

Mask with HVSS interrupts to get the actual bit value for each masked interrupt status.

◆ Cy_HVSS_LinPhy_GetIntrStatus()

uint32_t Cy_HVSS_LinPhy_GetIntrStatus ( void  )

Gets the interrupt statuses from the LIN_INTR register.

Note
Applicable to PSOC4 HVMS/PA only.
Returns
Mask with HVSS interrupts to get the actual bit value for each interrupt