TLE986x Device Family SDK
Data Structures | Macros | Enumerations | Functions
bdrv.h File Reference

Go to the source code of this file.

Detailed Description

Bridge Driver low level access library.

Version
V0.4.4
Date
28. Feb 2020

Include Graph

Include dependency graph for bdrv.h:

Data Structures

struct  TBDRV_Off_Diag
 This struct lists the Bridge Driver Off Diagnosis Status Phases configuration. More...
 

Macros

#define LS1_DS   SCUPM_BDRV_ISCLR_LS1_DS_ICLR_Msk
 this enum lists the bit masks for the BridgeDriver status flags More...
 
#define LS2_DS   SCUPM_BDRV_ISCLR_LS2_DS_ICLR_Msk
 Phase2 Low Side MOSFET mask for Off-Diagnosis. More...
 
#define HS1_DS   SCUPM_BDRV_ISCLR_HS1_DS_ICLR_Msk
 Phase1 High Side MOSFET mask for Off-Diagnosis. More...
 
#define HS2_DS   SCUPM_BDRV_ISCLR_HS2_DS_ICLR_Msk
 Phase2 High Side MOSFET mask for Off-Diagnosis. More...
 
#define LS1_OC   SCUPM_BDRV_ISCLR_LS1_OC_ICLR_Msk
 Phase1 Low Side MOSFET mask for On-Diagnosis. More...
 
#define LS2_OC   SCUPM_BDRV_ISCLR_LS2_OC_ICLR_Msk
 Phase2 Low Side MOSFET mask for On-Diagnosis. More...
 
#define HS1_OC   SCUPM_BDRV_ISCLR_HS1_OC_ICLR_Msk
 Phase1 High Side MOSFET mask for On-Diagnosis. More...
 
#define HS2_OC   SCUPM_BDRV_ISCLR_HS2_OC_ICLR_Msk
 Phase2 High Side MOSFET mask for On-Diagnosis. More...
 
#define BDRV_ISCLR_OC   (LS1_OC | HS1_OC | LS2_OC | HS2_OC)
 
#define BDRV_ISCLR_DS   (LS1_DS | HS1_DS | LS2_DS | HS2_DS)
 
#define BDRV_IRQ_BITS   (BDRV_ISCLR_OC | BDRV_ISCLR_DS)
 
#define BDRV_DS_STS_BITS   BDRV_ISCLR_DS
 

Enumerations

enum  TBdrv_Ch_Cfg {
  Ch_Off = 0u, Ch_En = 1u, Ch_PWM = 3u, Ch_On = 5u,
  Ch_DCS = 9u
}
 This enum lists the Bridge Driver High Side channel configuration. More...
 
enum  TBdrv_Ch { LS1 = 0u, LS2 = 1u, HS1 = 2u, HS2 = 3u }
 This enum lists the Bridge Driver channel configuration. More...
 
enum  TBDRV_Off_Diag_Sts { Ch_Ok = 0u, Ch_Short_to_Gnd = 1u, Ch_Short_to_VBat = 2u }
 This enum lists the Bridge Driver Off Diagnosis Status configuration. More...
 
enum  TBdrv_Ch_Int { Int_Off = 0U, Int_DS = 1U, Int_OC = 2U, Int_DS_OC = 3U }
 This enum lists the Bridge Driver channel Interrupt configuration. More...
 
enum  TBdrv_DSM_Threshold {
  Threshold_0_25_V = 0U, Threshold_0_50_V = 1U, Threshold_0_75_V = 2U, Threshold_1_00_V = 3U,
  Threshold_1_25_V = 4U, Threshold_1_50_V = 5U, Threshold_1_75_V = 6U, Threshold_2_00_V = 7U
}
 
enum  TBdrv_Disch_Curr {
  Current_Disabled = 0U, Current_Min = 1U, Current_19_80_mA = 2U, Current_31_10_mA = 3U,
  Current_42_30_mA = 4U, Current_53_90_mA = 5U, Current_64_90_mA = 6U, Current_76_20_mA = 7U,
  Current_86_80_mA = 8U, Current_98_00_mA = 9U, Current_108_50_mA = 10U, Current_119_40_mA = 11U,
  Current_129_70_mA = 12U, Current_140_30_mA = 13U, Current_150_40_mA = 14U, Current_160_80_mA = 15U,
  Current_170_10_mA = 16U, Current_180_30_mA = 17U, Current_189_80_mA = 18U, Current_199_60_mA = 19U,
  Current_208_90_mA = 20U, Current_218_40_mA = 21U, Current_227_40_mA = 22U, Current_236_70_mA = 23U,
  Current_245_30_mA = 24U, Current_254_30_mA = 25U, Current_262_80_mA = 26U, Current_271_50_mA = 27U,
  Current_279_60_mA = 28U, Current_288_00_mA = 29U, Current_295_90_mA = 30U, Current_304_00_mA = 31U
}
 

Functions

INLINE void BDRV_HS1_OC_Int_Clr (void)
 clears External High Side 1 FET Over-current interrupt flag. More...
 
INLINE void BDRV_LS1_OC_Int_Clr (void)
 clears External Low Side 1 FET Over-current interrupt flag. More...
 
INLINE void BDRV_HS2_OC_Int_Clr (void)
 clears External High Side 2 FET Over-current interrupt flag. More...
 
INLINE void BDRV_LS2_OC_Int_Clr (void)
 clears External Low Side 2 FET Over-current interrupt flag. More...
 
INLINE void BDRV_HS1_DS_Int_Clr (void)
 enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_LS1_DS_Int_Clr (void)
 clears Low Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State. More...
 
INLINE void BDRV_HS2_DS_Int_Clr (void)
 clears High Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State. More...
 
INLINE void BDRV_LS2_DS_Int_Clr (void)
 clears Low Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State. More...
 
INLINE void BDRV_VCP_LO_Int_Clr (void)
 clears Charge Pump Low interrupt flag. More...
 
INLINE void BDRV_HS1_OC_Int_En (void)
 enables External High Side 1 FET Over-current interrupt. More...
 
INLINE void BDRV_HS1_OC_Int_Dis (void)
 disables External High Side 1 FET Over-current interrupt. More...
 
INLINE void BDRV_LS1_OC_Int_En (void)
 enables External Low Side 1 FET Over-current interrupt. More...
 
INLINE void BDRV_LS1_OC_Int_Dis (void)
 disables External Low Side 1 FET Over-current interrupt. More...
 
INLINE void BDRV_HS2_OC_Int_En (void)
 enables External High Side 2 FET Over-current interrupt. More...
 
INLINE void BDRV_HS2_OC_Int_Dis (void)
 disables External High Side 2 FET Over-current interrupt. More...
 
INLINE void BDRV_LS2_OC_Int_En (void)
 enables External Low Side 2 FET Over-current interrupt. More...
 
INLINE void BDRV_LS2_OC_Int_Dis (void)
 disables External Low Side 2 FET Over-current interrupt. More...
 
INLINE void BDRV_HS1_DS_Int_En (void)
 enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_HS1_DS_Int_Dis (void)
 disables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_LS1_DS_Int_En (void)
 enables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_LS1_DS_Int_Dis (void)
 disables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_HS2_DS_Int_En (void)
 enables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_HS2_DS_Int_Dis (void)
 disables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_LS2_DS_Int_En (void)
 enables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_LS2_DS_Int_Dis (void)
 disables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State. More...
 
INLINE void BDRV_VCP_LO_Int_En (void)
 enables Charge Pump Low interrupt. More...
 
INLINE void BDRV_VCP_LO_Int_Dis (void)
 disables Charge Pump Low interrupt. More...
 
INLINE uint8 BDRV_HS1_OC_Int_Sts (void)
 Reads the Bridge Driver High-Side 1 Over-Current Status Flag. More...
 
INLINE uint8 BDRV_LS1_OC_Int_Sts (void)
 Reads the Bridge Driver Low-Side 1 Over-Current Status Flag. More...
 
INLINE uint8 BDRV_HS2_OC_Int_Sts (void)
 Reads the Bridge Driver High-Side 2 Over-Current Status Flag. More...
 
INLINE uint8 BDRV_LS2_OC_Int_Sts (void)
 Reads the Bridge Driver Low-Side 2 Over-Current Status Flag. More...
 
INLINE uint8 BDRV_HS1_DS_Int_Sts (void)
 Reads the Bridge Driver High-Side 1 Pre-Driver Short Status Flag. More...
 
INLINE uint8 BDRV_LS1_DS_Int_Sts (void)
 Reads the Bridge Driver Low-Side 1 Pre-Driver Short Status Flag. More...
 
INLINE uint8 BDRV_HS2_DS_Int_Sts (void)
 Reads the Bridge Driver High-Side 2 Pre-Driver Short Status Flag. More...
 
INLINE uint8 BDRV_LS2_DS_Int_Sts (void)
 Reads the Bridge Driver Low-Side 2 Pre-Driver Short Status Flag. More...
 
INLINE uint8 BDRV_VCP_LO_Int_Sts (void)
 Reads the Bridge Driver VCP Lower Threshold 2 Measurement Status Flag. More...
 
void BDRV_Init (void)
 Initializes the BridgeDriver based on the IFXConfigWizard configuration. More...
 
void BDRV_Set_Bridge (TBdrv_Ch_Cfg LS1_Cfg, TBdrv_Ch_Cfg HS1_Cfg, TBdrv_Ch_Cfg LS2_Cfg, TBdrv_Ch_Cfg HS2_Cfg)
 Sets the bridge in the desired state. For each of the four drivers the state can be defined. More...
 
void BDRV_Set_Channel (TBdrv_Ch BDRV_Ch, TBdrv_Ch_Cfg Ch_Cfg)
 sets an individual driver of the BridgeDriver in the desired state More...
 
void BDRV_Clr_Sts (uint32 Sts_Bit)
 clears individual status flags and interrupt status flags of the BridgeDriver More...
 
void BDRV_Set_Int_Channel (TBdrv_Ch BDRV_Ch, TBdrv_Ch_Int Ch_Int)
 sets Interrupt Enable for the individual MOSFETs (channels) More...
 
bool BDRV_Diag_OpenLoad (void)
 Open Load detection, detects whether a motor is connected. More...
 
TBDRV_Off_Diag BDRV_Off_Diagnosis (void)
 Off-diagnosis. More...
 
void BDRV_Set_DSM_Threshold (TBdrv_DSM_Threshold BDRV_Threshold)
 Sets the Voltage Threshold for Drain-Source Monitoring of external FETs. More...
 
void BDRV_Set_Discharge_Current (TBdrv_Disch_Curr BDRV_Current)
 Sets the trimming of the internal driver discharge current. More...
 

Macro Definition Documentation

◆ BDRV_DS_STS_BITS

#define BDRV_DS_STS_BITS   BDRV_ISCLR_DS

◆ BDRV_IRQ_BITS

#define BDRV_IRQ_BITS   (BDRV_ISCLR_OC | BDRV_ISCLR_DS)

◆ BDRV_ISCLR_DS

#define BDRV_ISCLR_DS   (LS1_DS | HS1_DS | LS2_DS | HS2_DS)

◆ BDRV_ISCLR_OC

#define BDRV_ISCLR_OC   (LS1_OC | HS1_OC | LS2_OC | HS2_OC)

◆ HS1_DS

#define HS1_DS   SCUPM_BDRV_ISCLR_HS1_DS_ICLR_Msk

Phase1 High Side MOSFET mask for Off-Diagnosis.

◆ HS1_OC

#define HS1_OC   SCUPM_BDRV_ISCLR_HS1_OC_ICLR_Msk

Phase1 High Side MOSFET mask for On-Diagnosis.

◆ HS2_DS

#define HS2_DS   SCUPM_BDRV_ISCLR_HS2_DS_ICLR_Msk

Phase2 High Side MOSFET mask for Off-Diagnosis.

◆ HS2_OC

#define HS2_OC   SCUPM_BDRV_ISCLR_HS2_OC_ICLR_Msk

Phase2 High Side MOSFET mask for On-Diagnosis.

◆ LS1_DS

#define LS1_DS   SCUPM_BDRV_ISCLR_LS1_DS_ICLR_Msk

this enum lists the bit masks for the BridgeDriver status flags

Phase1 Low Side MOSFET mask for Off-Diagnosis

◆ LS1_OC

#define LS1_OC   SCUPM_BDRV_ISCLR_LS1_OC_ICLR_Msk

Phase1 Low Side MOSFET mask for On-Diagnosis.

◆ LS2_DS

#define LS2_DS   SCUPM_BDRV_ISCLR_LS2_DS_ICLR_Msk

Phase2 Low Side MOSFET mask for Off-Diagnosis.

◆ LS2_OC

#define LS2_OC   SCUPM_BDRV_ISCLR_LS2_OC_ICLR_Msk

Phase2 Low Side MOSFET mask for On-Diagnosis.

Enumeration Type Documentation

◆ TBdrv_Ch

enum TBdrv_Ch

This enum lists the Bridge Driver channel configuration.

Enumerator
LS1 

Phase1 Low Side MOSFET.

LS2 

Phase2 Low Side MOSFET.

HS1 

Phase1 High Side MOSFET.

HS2 

Phase2 High Side MOSFET.

◆ TBdrv_Ch_Cfg

This enum lists the Bridge Driver High Side channel configuration.

Enumerator
Ch_Off 

channel disabled

Ch_En 

channel enabled

Ch_PWM 

channel enabled with PWM (CCU6 connection)

Ch_On 

channel enabled and static on

Ch_DCS 

channel enabled with Diag.-Current Source

◆ TBdrv_Ch_Int

This enum lists the Bridge Driver channel Interrupt configuration.

Enumerator
Int_Off 

all interrupts disable

Int_DS 

Drain-Source interrupt enable (Off-Diagnosis)

Int_OC 

Over-Current interrupt enable (On-Diagnosis)

Int_DS_OC 

Drain-Source and Over-Current interrupt enable.

◆ TBdrv_Disch_Curr

Enumerator
Current_Disabled 

(HiZ) Slew Rate Control is inactive

Current_Min 

(min discharge current) lowest gate discharge current

Current_19_80_mA 

typ. current 19.80 mA

Current_31_10_mA 

typ. current 31.10 mA

Current_42_30_mA 

typ. current 42.30 mA

Current_53_90_mA 

typ. current 53.90 mA

Current_64_90_mA 

typ. current 64.90 mA

Current_76_20_mA 

typ. current 76.20 mA

Current_86_80_mA 

typ. current 86.80 mA

Current_98_00_mA 

typ. current 98.00 mA

Current_108_50_mA 

typ. current 108.50 mA

Current_119_40_mA 

typ. current 119.40 mA

Current_129_70_mA 

typ. current 129.70 mA

Current_140_30_mA 

typ. current 140.30 mA

Current_150_40_mA 

typ. current 150.40 mA

Current_160_80_mA 

typ. current 160.80 mA

Current_170_10_mA 

typ. current 170.10 mA

Current_180_30_mA 

typ. current 180.30 mA

Current_189_80_mA 

typ. current 189.80 mA

Current_199_60_mA 

typ. current 199.60 mA

Current_208_90_mA 

typ. current 208.90 mA

Current_218_40_mA 

typ. current 218.40 mA

Current_227_40_mA 

typ. current 227.40 mA

Current_236_70_mA 

typ. current 236.70 mA

Current_245_30_mA 

typ. current 245.30 mA

Current_254_30_mA 

typ. current 254.30 mA

Current_262_80_mA 

typ. current 262.80 mA

Current_271_50_mA 

typ. current 271.50 mA

Current_279_60_mA 

typ. current 279.60 mA

Current_288_00_mA 

typ. current 288.00 mA

Current_295_90_mA 

typ. current 295.90 mA

Current_304_00_mA 

(max charge current) typ. current 304 mA

◆ TBdrv_DSM_Threshold

Enumerator
Threshold_0_25_V 

Threshold 0 for VDS at 0.25 V.

Threshold_0_50_V 

Threshold 1 for VDS at 0.50 V.

Threshold_0_75_V 

Threshold 2 for VDS at 0.75 V.

Threshold_1_00_V 

Threshold 3 for VDS at 1.00 V.

Threshold_1_25_V 

Threshold 4 for VDS at 1.25 V.

Threshold_1_50_V 

Threshold 5 for VDS at 1.50 V.

Threshold_1_75_V 

Threshold 6 for VDS at 1.75 V.

Threshold_2_00_V 

Threshold 7 for VDS at 2.00 V.

◆ TBDRV_Off_Diag_Sts

This enum lists the Bridge Driver Off Diagnosis Status configuration.

Enumerator
Ch_Ok 
Ch_Short_to_Gnd 
Ch_Short_to_VBat 

Function Documentation

◆ BDRV_Clr_Sts()

void BDRV_Clr_Sts ( uint32  Sts_Bit)

clears individual status flags and interrupt status flags of the BridgeDriver

Parameters
Sts_Bitstatus bit(s) to be cleared

Example

This example enables BDRV LS1, LS2, HS1 and HS2 Over-Current Interrupt.

void Example_Function(void)
{
}

◆ BDRV_Diag_OpenLoad()

bool BDRV_Diag_OpenLoad ( void  )

Open Load detection, detects whether a motor is connected.

Return values
trueno motor detected,
falsemotor connected

Example

This example disables all BDRV channels when Open Load is detected.

◆ BDRV_HS1_DS_Int_Clr()

INLINE void BDRV_HS1_DS_Int_Clr ( void  )

enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}

◆ BDRV_HS1_DS_Int_Dis()

INLINE void BDRV_HS1_DS_Int_Dis ( void  )

disables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}

◆ BDRV_HS1_DS_Int_En()

INLINE void BDRV_HS1_DS_Int_En ( void  )

enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}

◆ BDRV_HS1_DS_Int_Sts()

INLINE uint8 BDRV_HS1_DS_Int_Sts ( void  )

Reads the Bridge Driver High-Side 1 Pre-Driver Short Status Flag.

Returns
uint8 Status Flag

◆ BDRV_HS1_OC_Int_Clr()

INLINE void BDRV_HS1_OC_Int_Clr ( void  )

clears External High Side 1 FET Over-current interrupt flag.

Example

This example treats the External High Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}

◆ BDRV_HS1_OC_Int_Dis()

INLINE void BDRV_HS1_OC_Int_Dis ( void  )

disables External High Side 1 FET Over-current interrupt.

Example

This example treats the External High Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}

◆ BDRV_HS1_OC_Int_En()

INLINE void BDRV_HS1_OC_Int_En ( void  )

enables External High Side 1 FET Over-current interrupt.

Example

This example treats the External High Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}

◆ BDRV_HS1_OC_Int_Sts()

INLINE uint8 BDRV_HS1_OC_Int_Sts ( void  )

Reads the Bridge Driver High-Side 1 Over-Current Status Flag.

Returns
uint8 Status Flag

◆ BDRV_HS2_DS_Int_Clr()

INLINE void BDRV_HS2_DS_Int_Clr ( void  )

clears High Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State.

Example

This example treats the High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_DS_IS == 1u)
{
BDRV_HS2_DS_CALLBACK();
}
}

◆ BDRV_HS2_DS_Int_Dis()

INLINE void BDRV_HS2_DS_Int_Dis ( void  )

disables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_DS_IS == 1u)
{
BDRV_HS2_DS_CALLBACK();
}
}

◆ BDRV_HS2_DS_Int_En()

INLINE void BDRV_HS2_DS_Int_En ( void  )

enables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_DS_IS == 1u)
{
BDRV_HS2_DS_CALLBACK();
}
}

◆ BDRV_HS2_DS_Int_Sts()

INLINE uint8 BDRV_HS2_DS_Int_Sts ( void  )

Reads the Bridge Driver High-Side 2 Pre-Driver Short Status Flag.

Returns
uint8 Status Flag

◆ BDRV_HS2_OC_Int_Clr()

INLINE void BDRV_HS2_OC_Int_Clr ( void  )

clears External High Side 2 FET Over-current interrupt flag.

Example

This example treats the External High Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}

◆ BDRV_HS2_OC_Int_Dis()

INLINE void BDRV_HS2_OC_Int_Dis ( void  )

disables External High Side 2 FET Over-current interrupt.

Example

This example treats the External High Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}

◆ BDRV_HS2_OC_Int_En()

INLINE void BDRV_HS2_OC_Int_En ( void  )

enables External High Side 2 FET Over-current interrupt.

Example

This example treats the External High Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}

◆ BDRV_HS2_OC_Int_Sts()

INLINE uint8 BDRV_HS2_OC_Int_Sts ( void  )

Reads the Bridge Driver High-Side 2 Over-Current Status Flag.

Returns
uint8 Status Flag

◆ BDRV_Init()

void BDRV_Init ( void  )

Initializes the BridgeDriver based on the IFXConfigWizard configuration.

◆ BDRV_LS1_DS_Int_Clr()

INLINE void BDRV_LS1_DS_Int_Clr ( void  )

clears Low Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State.

Example

This example treats the Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}

◆ BDRV_LS1_DS_Int_Dis()

INLINE void BDRV_LS1_DS_Int_Dis ( void  )

disables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}

◆ BDRV_LS1_DS_Int_En()

INLINE void BDRV_LS1_DS_Int_En ( void  )

enables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}

◆ BDRV_LS1_DS_Int_Sts()

INLINE uint8 BDRV_LS1_DS_Int_Sts ( void  )

Reads the Bridge Driver Low-Side 1 Pre-Driver Short Status Flag.

Returns
uint8 Status Flag

◆ BDRV_LS1_OC_Int_Clr()

INLINE void BDRV_LS1_OC_Int_Clr ( void  )

clears External Low Side 1 FET Over-current interrupt flag.

Example

This example treats the External Low Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}

◆ BDRV_LS1_OC_Int_Dis()

INLINE void BDRV_LS1_OC_Int_Dis ( void  )

disables External Low Side 1 FET Over-current interrupt.

Example

This example treats the External Low Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}

◆ BDRV_LS1_OC_Int_En()

INLINE void BDRV_LS1_OC_Int_En ( void  )

enables External Low Side 1 FET Over-current interrupt.

Example

This example treats the External Low Side 1 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}

◆ BDRV_LS1_OC_Int_Sts()

INLINE uint8 BDRV_LS1_OC_Int_Sts ( void  )

Reads the Bridge Driver Low-Side 1 Over-Current Status Flag.

Returns
uint8 Status Flag

◆ BDRV_LS2_DS_Int_Clr()

INLINE void BDRV_LS2_DS_Int_Clr ( void  )

clears Low Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State.

Example

This example treats the Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}

◆ BDRV_LS2_DS_Int_Dis()

INLINE void BDRV_LS2_DS_Int_Dis ( void  )

disables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}

◆ BDRV_LS2_DS_Int_En()

INLINE void BDRV_LS2_DS_Int_En ( void  )

enables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

Example

This example treats the Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}

◆ BDRV_LS2_DS_Int_Sts()

INLINE uint8 BDRV_LS2_DS_Int_Sts ( void  )

Reads the Bridge Driver Low-Side 2 Pre-Driver Short Status Flag.

Returns
uint8 Status Flag

◆ BDRV_LS2_OC_Int_Clr()

INLINE void BDRV_LS2_OC_Int_Clr ( void  )

clears External Low Side 2 FET Over-current interrupt flag.

Example

This example treats the External Low Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}

◆ BDRV_LS2_OC_Int_Dis()

INLINE void BDRV_LS2_OC_Int_Dis ( void  )

disables External Low Side 2 FET Over-current interrupt.

Example

This example treats the External Low Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}

◆ BDRV_LS2_OC_Int_En()

INLINE void BDRV_LS2_OC_Int_En ( void  )

enables External Low Side 2 FET Over-current interrupt.

Example

This example treats the External Low Side 2 FET Over-current interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}

◆ BDRV_LS2_OC_Int_Sts()

INLINE uint8 BDRV_LS2_OC_Int_Sts ( void  )

Reads the Bridge Driver Low-Side 2 Over-Current Status Flag.

Returns
uint8 Status Flag

◆ BDRV_Off_Diagnosis()

TBDRV_Off_Diag BDRV_Off_Diagnosis ( void  )

Off-diagnosis.

Detects a short of the phases either to Gnd or to Vbat

Return values
trueany short detected
falseno short

◆ BDRV_Set_Bridge()

void BDRV_Set_Bridge ( TBdrv_Ch_Cfg  LS1_Cfg,
TBdrv_Ch_Cfg  HS1_Cfg,
TBdrv_Ch_Cfg  LS2_Cfg,
TBdrv_Ch_Cfg  HS2_Cfg 
)

Sets the bridge in the desired state. For each of the four drivers the state can be defined.

See TBdrv_Ch_Cfg

Parameters
LS1_Cfgsets the desired mode for LS MOSFET of phase1
HS1_Cfgsets the desired mode for HS MOSFET of phase1
LS2_Cfgsets the desired mode for LS MOSFET of phase2
HS2_Cfgsets the desired mode for HS MOSFET of phase2

Example

This example configures BDRV Bridge channels HS1, HS2, LS1 and LS2 to be enabled with PWM.

void Example_Function(void)
{
}

◆ BDRV_Set_Channel()

void BDRV_Set_Channel ( TBdrv_Ch  BDRV_Ch,
TBdrv_Ch_Cfg  Ch_Cfg 
)

sets an individual driver of the BridgeDriver in the desired state

Parameters
BDRV_Chselects the channel for which the configuration should be set, see TBdrv_Ch
Ch_Cfgselects the mode of operation for that channel, see TBdrv_Ch_Cfg

Example

This example configures BDRV Bridge channel HS1 to be enabled with PWM.

void Example_Function(void)
{
}

◆ BDRV_Set_Discharge_Current()

void BDRV_Set_Discharge_Current ( TBdrv_Disch_Curr  BDRV_Current)

Sets the trimming of the internal driver discharge current.

Parameters
BDRV_Currentselection for the desired discharge current, see TBdrv_Disch_Curr

◆ BDRV_Set_DSM_Threshold()

void BDRV_Set_DSM_Threshold ( TBdrv_DSM_Threshold  BDRV_Threshold)

Sets the Voltage Threshold for Drain-Source Monitoring of external FETs.

Parameters
BDRV_Thresholdselection for the desired voltage threshold, see TBdrv_DSM_Threshold

◆ BDRV_Set_Int_Channel()

void BDRV_Set_Int_Channel ( TBdrv_Ch  BDRV_Ch,
TBdrv_Ch_Int  Ch_Int 
)

sets Interrupt Enable for the individual MOSFETs (channels)

Parameters
BDRV_ChChannel selection, see TBdrv_Ch
Ch_Intselection for the desired interrupt to be enabled, see TBdrv_Ch_Int

Example

This example enables BDRV HS1 Over-Current Interrupt.

void Example_Function(void)
{
}

◆ BDRV_VCP_LO_Int_Clr()

INLINE void BDRV_VCP_LO_Int_Clr ( void  )

clears Charge Pump Low interrupt flag.

Example

This example treats the Charge Pump Low interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.VCP_LOWTH2_IS == 1u)
{
BDRV_VCP_LO_CALLBACK();
}
}

◆ BDRV_VCP_LO_Int_Dis()

INLINE void BDRV_VCP_LO_Int_Dis ( void  )

disables Charge Pump Low interrupt.

Example

This example treats the Charge Pump Low interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.VCP_LOWTH2_IS == 1u)
{
BDRV_VCP_LO_CALLBACK();
}
}

◆ BDRV_VCP_LO_Int_En()

INLINE void BDRV_VCP_LO_Int_En ( void  )

enables Charge Pump Low interrupt.

Example

This example treats the Charge Pump Low interrupt.

void Example_Function(void)
{
if (SCUPM->BDRV_IS.bit.VCP_LOWTH2_IS == 1u)
{
BDRV_VCP_LO_CALLBACK();
}
}

◆ BDRV_VCP_LO_Int_Sts()

INLINE uint8 BDRV_VCP_LO_Int_Sts ( void  )

Reads the Bridge Driver VCP Lower Threshold 2 Measurement Status Flag.

Returns
uint8 Status Flag
BDRV_HS1_DS_Int_En
INLINE void BDRV_HS1_DS_Int_En(void)
enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:841
HS1_OC
#define HS1_OC
Phase1 High Side MOSFET mask for On-Diagnosis.
Definition: bdrv.h:149
BDRV_VCP_LO_Int_Dis
INLINE void BDRV_VCP_LO_Int_Dis(void)
disables Charge Pump Low interrupt.
Definition: bdrv.h:1142
BDRV_LS2_OC_Int_Dis
INLINE void BDRV_LS2_OC_Int_Dis(void)
disables External Low Side 2 FET Over-current interrupt.
Definition: bdrv.h:721
LS1_OC
#define LS1_OC
Phase1 Low Side MOSFET mask for On-Diagnosis.
Definition: bdrv.h:147
BDRV_LS2_DS_Int_Clr
INLINE void BDRV_LS2_DS_Int_Clr(void)
clears Low Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:471
BDRV_HS2_OC_Int_Clr
INLINE void BDRV_HS2_OC_Int_Clr(void)
clears External High Side 2 FET Over-current interrupt flag.
Definition: bdrv.h:313
BDRV_LS2_OC_Int_En
INLINE void BDRV_LS2_OC_Int_En(void)
enables External Low Side 2 FET Over-current interrupt.
Definition: bdrv.h:698
BDRV_VCP_LO_Int_Clr
INLINE void BDRV_VCP_LO_Int_Clr(void)
clears Charge Pump Low interrupt flag.
Definition: bdrv.h:541
LS2
Phase2 Low Side MOSFET.
Definition: bdrv.h:132
BDRV_HS1_OC_Int_En
INLINE void BDRV_HS1_OC_Int_En(void)
enables External High Side 1 FET Over-current interrupt.
Definition: bdrv.h:563
SCUPM
#define SCUPM
Definition: tle986x.h:6005
BDRV_VCP_LO_Int_En
INLINE void BDRV_VCP_LO_Int_En(void)
enables Charge Pump Low interrupt.
Definition: bdrv.h:1119
Int_OC
Over-Current interrupt enable (On-Diagnosis)
Definition: bdrv.h:188
BDRV_HS1_DS_Int_Clr
INLINE void BDRV_HS1_DS_Int_Clr(void)
enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:405
BDRV_LS1_DS_Int_En
INLINE void BDRV_LS1_DS_Int_En(void)
enables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:886
BDRV_LS1_OC_Int_En
INLINE void BDRV_LS1_OC_Int_En(void)
enables External Low Side 1 FET Over-current interrupt.
Definition: bdrv.h:608
BDRV_Clr_Sts
void BDRV_Clr_Sts(uint32 Sts_Bit)
clears individual status flags and interrupt status flags of the BridgeDriver
BDRV_HS2_DS_Int_Clr
INLINE void BDRV_HS2_DS_Int_Clr(void)
clears High Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:449
BDRV_LS1_DS_Int_Clr
INLINE void BDRV_LS1_DS_Int_Clr(void)
clears Low Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:427
HS2
Phase2 High Side MOSFET.
Definition: bdrv.h:134
BDRV_LS1_DS_Int_Dis
INLINE void BDRV_LS1_DS_Int_Dis(void)
disables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:909
BDRV_Diag_OpenLoad
bool BDRV_Diag_OpenLoad(void)
Open Load detection, detects whether a motor is connected.
BDRV_LS1_OC_Int_Dis
INLINE void BDRV_LS1_OC_Int_Dis(void)
disables External Low Side 1 FET Over-current interrupt.
Definition: bdrv.h:631
BDRV_HS1_OC_Int_Dis
INLINE void BDRV_HS1_OC_Int_Dis(void)
disables External High Side 1 FET Over-current interrupt.
Definition: bdrv.h:586
HS1
Phase1 High Side MOSFET.
Definition: bdrv.h:133
BDRV_Set_Int_Channel
void BDRV_Set_Int_Channel(TBdrv_Ch BDRV_Ch, TBdrv_Ch_Int Ch_Int)
sets Interrupt Enable for the individual MOSFETs (channels)
BDRV_HS2_DS_Int_Dis
INLINE void BDRV_HS2_DS_Int_Dis(void)
disables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:954
BDRV_LS2_DS_Int_En
INLINE void BDRV_LS2_DS_Int_En(void)
enables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:976
LS2_OC
#define LS2_OC
Phase2 Low Side MOSFET mask for On-Diagnosis.
Definition: bdrv.h:148
BDRV_LS2_DS_Int_Dis
INLINE void BDRV_LS2_DS_Int_Dis(void)
disables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:999
BDRV_HS2_OC_Int_Dis
INLINE void BDRV_HS2_OC_Int_Dis(void)
disables External High Side 2 FET Over-current interrupt.
Definition: bdrv.h:676
BDRV_HS2_OC_Int_En
INLINE void BDRV_HS2_OC_Int_En(void)
enables External High Side 2 FET Over-current interrupt.
Definition: bdrv.h:653
BDRV_Set_Bridge
void BDRV_Set_Bridge(TBdrv_Ch_Cfg LS1_Cfg, TBdrv_Ch_Cfg HS1_Cfg, TBdrv_Ch_Cfg LS2_Cfg, TBdrv_Ch_Cfg HS2_Cfg)
Sets the bridge in the desired state. For each of the four drivers the state can be defined.
BDRV_HS2_DS_Int_En
INLINE void BDRV_HS2_DS_Int_En(void)
enables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:931
LS1
Phase1 Low Side MOSFET.
Definition: bdrv.h:131
HS2_OC
#define HS2_OC
Phase2 High Side MOSFET mask for On-Diagnosis.
Definition: bdrv.h:150
BDRV_HS1_DS_Int_Dis
INLINE void BDRV_HS1_DS_Int_Dis(void)
disables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:864
BDRV_Set_Channel
void BDRV_Set_Channel(TBdrv_Ch BDRV_Ch, TBdrv_Ch_Cfg Ch_Cfg)
sets an individual driver of the BridgeDriver in the desired state
BDRV_HS1_OC_Int_Clr
INLINE void BDRV_HS1_OC_Int_Clr(void)
clears External High Side 1 FET Over-current interrupt flag.
Definition: bdrv.h:269
BDRV_LS2_OC_Int_Clr
INLINE void BDRV_LS2_OC_Int_Clr(void)
clears External Low Side 2 FET Over-current interrupt flag.
Definition: bdrv.h:335
Ch_Off
channel disabled
Definition: bdrv.h:119
BDRV_LS1_OC_Int_Clr
INLINE void BDRV_LS1_OC_Int_Clr(void)
clears External Low Side 1 FET Over-current interrupt flag.
Definition: bdrv.h:291
Ch_PWM
channel enabled with PWM (CCU6 connection)
Definition: bdrv.h:121