Infineon MOTIX™ MCU TLE985x 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.3.1
Date
28. Aug 2023
Note
This file violates [MISRA 2012 Rule 11.1, required], [MISRA 2012 Rule 11.4, advisory], [MISRA 2012 Rule 11.6, required], [MISRA 2012 Rule 8.7, advisory]

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 BDRV_IRQ_EN_BITS   0xD0505050u
 BDRV Interrupt Enable Mask. More...
 
#define BDRV_IRQ_CLR_BITS   0xF0707073u
 BDRV Interrupt Clear Mask. More...
 
#define BDRV_COMP_BITS   0x70700u
 BDRV Compensation Trimming Mask. More...
 
#define BDRV_DS_STS_BITS   0x20202020
 BDRV Drain Source Interrupt Status Clear Mask. More...
 
#define BDRV_LS1_DS_ISC   BDRV_IRQCLR_LS1_DS_ISC_Msk
 Low Side Driver 1 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State
More...
 
#define BDRV_LS1_DS_SC   BDRV_IRQCLR_LS1_DS_SC_Msk
 Low Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State
More...
 
#define BDRV_LS1_OC_ISC   BDRV_IRQCLR_LS1_OC_ISC_Msk
 External Low Side 1 FET Over-current Mask Status Clear
More...
 
#define BDRV_HS1_DS_ISC   BDRV_IRQCLR_HS1_DS_ISC_Msk
 High Side Driver 1 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State. More...
 
#define BDRV_HS1_DS_SC   BDRV_IRQCLR_HS1_DS_SC_Msk
 High Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State
More...
 
#define BDRV_HS1_OC_ISC   BDRV_IRQCLR_HS1_OC_ISC_Msk
 External High Side 1 FET Over-current Mask Status Clear
More...
 
#define BDRV_LS2_DS_ISC   BDRV_IRQCLR_LS2_DS_ISC_Msk
 Low Side Driver 2 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State
More...
 
#define BDRV_LS2_DS_SC   BDRV_IRQCLR_LS2_DS_SC_Msk
 Low Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State
More...
 
#define BDRV_LS2_OC_ISC   BDRV_IRQCLR_LS2_OC_ISC_Msk
 External Low Side 2 FET Over-current Mask Status Clear
More...
 
#define BDRV_HS2_DS_ISC   BDRV_IRQCLR_HS2_DS_ISC_Msk
 High Side Driver 2 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State. More...
 
#define BDRV_HS2_DS_SC   BDRV_IRQCLR_HS2_DS_SC_Msk
 High Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State
More...
 
#define BDRV_HS2_OC_ISC   BDRV_IRQCLR_HS2_OC_ISC_Msk
 External High Side 2 FET Over-current Mask Status Clear
More...
 
#define BDRV_SEQ_ERR_ISC   BDRV_IRQCLR_SEQ_ERR_ISC_Msk
 Driver Sequence Error Mask Status Clear
More...
 

Enumerations

enum  TBdrv_Ch_LS_Cfg { Ch_LS_Off = 0u , Ch_LS_En = 1u , Ch_LS_PWM = 3u , Ch_LS_On = 5u }
 This enum lists the Bridge Driver Low Side channel configuration. More...
 
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_125_V = 0U , Threshold_0_25_V = 1U , Threshold_0_50_V = 2U , Threshold_0_75_V = 3U ,
  Threshold_1_00_V = 4U , Threshold_1_25_V = 5U , Threshold_1_50_V = 6U , Threshold_1_75_V = 7U
}
 This enum lists the Drain-Source Voltage Threshold. More...
 

Functions

void BDRV_Init (void)
 Initializes the BridgeDriver based on the Config Wizard configuration. More...
 
void BDRV_Set_Bridge (TBdrv_Ch_LS_Cfg LS1_Cfg, TBdrv_Ch_Cfg HS1_Cfg, TBdrv_Ch_LS_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. 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_Channel_Comp (uint8 gain_hs, uint8 gain_ls)
 Sets Gain for Low/High Side Charge Current Compensation. More...
 
bool BDRV_Diag_OpenLoad (void)
 Detects whether a motor is connected. More...
 
TBDRV_Off_Diag BDRV_Off_Diagnosis (void)
 Off-diagnosis. More...
 
INLINE void BDRV_SEQ_ERR_Int_Clr (void)
 Clears Driver Sequence Error 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_HS2_DS_SC_Clr (void)
 Clears High Side Driver 2 Drain Source Monitoring status flag in OFF-State. More...
 
INLINE void BDRV_HS2_DS_Int_Clr (void)
 Clears High Side Driver 2 Drain Source Monitoring status flag in OFF-State. More...
 
INLINE void BDRV_HS1_OC_Int_Clr (void)
 Clears External High Side 1 FET Over-current interrupt flag. More...
 
INLINE void BDRV_HS1_DS_SC_Clr (void)
 Clears High Side Driver 1 Drain Source Monitoring status flag in OFF-State. More...
 
INLINE void BDRV_HS1_DS_Int_Clr (void)
 Clears High Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State. More...
 
INLINE void BDRV_LS2_OC_Int_Clr (void)
 Clears External Low Side 2 FET Over-current interrupt flag. More...
 
INLINE void BDRV_LS2_DS_SC_Clr (void)
 Clears Low Side Driver 2 Drain Source Monitoring status 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_LS1_OC_Int_Clr (void)
 Clears External Low Side 1 FET Over-current interrupt flag. More...
 
INLINE void BDRV_LS1_DS_SC_Clr (void)
 Clears Low Side Driver 1 Drain Source Monitoring status flag 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_SEQ_ERR_Int_En (void)
 Enables Driver Sequence Error interrupt. More...
 
INLINE void BDRV_SEQ_ERR_Int_Dis (void)
 Disables Driver Sequence Error interrupt. 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...
 

Macro Definition Documentation

◆ BDRV_COMP_BITS

#define BDRV_COMP_BITS   0x70700u

BDRV Compensation Trimming Mask.

◆ BDRV_DS_STS_BITS

#define BDRV_DS_STS_BITS   0x20202020

BDRV Drain Source Interrupt Status Clear Mask.

◆ BDRV_HS1_DS_ISC

#define BDRV_HS1_DS_ISC   BDRV_IRQCLR_HS1_DS_ISC_Msk

High Side Driver 1 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State.

◆ BDRV_HS1_DS_SC

#define BDRV_HS1_DS_SC   BDRV_IRQCLR_HS1_DS_SC_Msk

High Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State

◆ BDRV_HS1_OC_ISC

#define BDRV_HS1_OC_ISC   BDRV_IRQCLR_HS1_OC_ISC_Msk

External High Side 1 FET Over-current Mask Status Clear

◆ BDRV_HS2_DS_ISC

#define BDRV_HS2_DS_ISC   BDRV_IRQCLR_HS2_DS_ISC_Msk

High Side Driver 2 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State.

◆ BDRV_HS2_DS_SC

#define BDRV_HS2_DS_SC   BDRV_IRQCLR_HS2_DS_SC_Msk

High Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State

◆ BDRV_HS2_OC_ISC

#define BDRV_HS2_OC_ISC   BDRV_IRQCLR_HS2_OC_ISC_Msk

External High Side 2 FET Over-current Mask Status Clear

◆ BDRV_IRQ_CLR_BITS

#define BDRV_IRQ_CLR_BITS   0xF0707073u

BDRV Interrupt Clear Mask.

◆ BDRV_IRQ_EN_BITS

#define BDRV_IRQ_EN_BITS   0xD0505050u

BDRV Interrupt Enable Mask.

◆ BDRV_LS1_DS_ISC

#define BDRV_LS1_DS_ISC   BDRV_IRQCLR_LS1_DS_ISC_Msk

Low Side Driver 1 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State

◆ BDRV_LS1_DS_SC

#define BDRV_LS1_DS_SC   BDRV_IRQCLR_LS1_DS_SC_Msk

Low Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State

◆ BDRV_LS1_OC_ISC

#define BDRV_LS1_OC_ISC   BDRV_IRQCLR_LS1_OC_ISC_Msk

External Low Side 1 FET Over-current Mask Status Clear

◆ BDRV_LS2_DS_ISC

#define BDRV_LS2_DS_ISC   BDRV_IRQCLR_LS2_DS_ISC_Msk

Low Side Driver 2 Drain Source Monitoring Interrupt Mask Status Clear in OFF-State

◆ BDRV_LS2_DS_SC

#define BDRV_LS2_DS_SC   BDRV_IRQCLR_LS2_DS_SC_Msk

Low Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State

◆ BDRV_LS2_OC_ISC

#define BDRV_LS2_OC_ISC   BDRV_IRQCLR_LS2_OC_ISC_Msk

External Low Side 2 FET Over-current Mask Status Clear

◆ BDRV_SEQ_ERR_ISC

#define BDRV_SEQ_ERR_ISC   BDRV_IRQCLR_SEQ_ERR_ISC_Msk

Driver Sequence Error Mask Status Clear

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 (only for HS1/HS2)

◆ TBdrv_Ch_Int

This enum lists the Bridge Driver channel Interrupt configuration.

Enumerator
Int_Off 

all interrupts disable

Int_DS 

Drain-Source interrupt enable

Int_OC 

Over-Current interrupt enable

Int_DS_OC 

Drain-Source and Over-Current interrupt enable.

◆ TBdrv_Ch_LS_Cfg

This enum lists the Bridge Driver Low Side channel configuration.

Enumerator
Ch_LS_Off 

channel disabled

Ch_LS_En 

channel enabled

Ch_LS_PWM 

channel enabled with PWM (CCU6 connection)

Ch_LS_On 

channel enabled and static on

◆ TBdrv_DSM_Threshold

This enum lists the Drain-Source Voltage Threshold.

Enumerator
Threshold_0_125_V 

Threshold 0 for VDS at 0.125 V.

Threshold_0_25_V 

Threshold 1 for VDS at 0.25 V.

Threshold_0_50_V 

Threshold 2 for VDS at 0.50 V.

Threshold_0_75_V 

Threshold 3 for VDS at 0.75 V.

Threshold_1_00_V 

Threshold 4 for VDS at 1.00 V.

Threshold_1_25_V 

Threshold 5 for VDS at 1.25 V.

Threshold_1_50_V 

Threshold 6 for VDS at 1.50 V.

Threshold_1_75_V 

Threshold 7 for VDS at 1.75 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 to be cleared

Example

This example clears BDRV HS2/LS2 Over-Current interrupt flag.

void Example_Function(void)
{
}
void BDRV_Clr_Sts(uint32 Sts_Bit)
Clears individual status flags and interrupt status flags of the BridgeDriver.
#define BDRV_LS2_OC_ISC
External Low Side 2 FET Over-current Mask Status Clear
Definition: bdrv.h:154
#define BDRV_HS2_OC_ISC
External High Side 2 FET Over-current Mask Status Clear
Definition: bdrv.h:157

◆ BDRV_Diag_OpenLoad()

bool BDRV_Diag_OpenLoad ( void  )

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.

void Example_Function(void)
{
if (BDRV_Diag_OpenLoad() == true)
{
}
}
bool BDRV_Diag_OpenLoad(void)
Detects whether a motor is connected.
void BDRV_Set_Channel(TBdrv_Ch BDRV_Ch, TBdrv_Ch_Cfg Ch_Cfg)
sets an individual driver of the BridgeDriver in the desired state
@ HS2
Phase2 High Side MOSFET.
Definition: bdrv.h:140
@ HS1
Phase1 High Side MOSFET.
Definition: bdrv.h:139
@ LS2
Phase2 Low Side MOSFET
Definition: bdrv.h:138
@ LS1
Phase1 Low Side MOSFET
Definition: bdrv.h:137
@ Ch_Off
channel disabled
Definition: bdrv.h:125

◆ BDRV_HS1_DS_Int_Clr()

INLINE void BDRV_HS1_DS_Int_Clr ( void  )

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

Example

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

void Example_Function(void)
{
if (BDRV->IRQS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}
INLINE void BDRV_HS1_DS_Int_En(void)
Enables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1120
INLINE void BDRV_HS1_DS_Int_Clr(void)
Clears High Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:1031
#define BDRV
Definition: tle985x.h:6267

◆ 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 (BDRV->IRQS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}
INLINE void BDRV_HS1_DS_Int_Dis(void)
Disables High Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1125

◆ 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 (BDRV->IRQS.bit.HS1_DS_IS == 1u)
{
BDRV_HS1_DS_CALLBACK();
}
}

◆ BDRV_HS1_DS_SC_Clr()

INLINE void BDRV_HS1_DS_SC_Clr ( void  )

Clears High Side Driver 1 Drain Source Monitoring status flag in OFF-State.

Example

This example checks the High Side Driver 1 Drain Source Monitoring status in OFF-State.

void Example_Function(void)
{
if (BDRV->IRQS.bit.HS1_DS_STS == 1u)
{
}
}
INLINE void BDRV_HS1_DS_SC_Clr(void)
Clears High Side Driver 1 Drain Source Monitoring status flag in OFF-State.
Definition: bdrv.h:1026

◆ 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 (BDRV->IRQS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}
INLINE void BDRV_HS1_OC_Int_En(void)
Enables External High Side 1 FET Over-current interrupt.
Definition: bdrv.h:1078
INLINE void BDRV_HS1_OC_Int_Clr(void)
Clears External High Side 1 FET Over-current interrupt flag.
Definition: bdrv.h:1021

◆ 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 (BDRV->IRQS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}
INLINE void BDRV_HS1_OC_Int_Dis(void)
Disables External High Side 1 FET Over-current interrupt.
Definition: bdrv.h:1083

◆ 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 (BDRV->IRQS.bit.HS1_OC_IS == 1u)
{
BDRV_HS1_OC_CALLBACK();
}
}

◆ BDRV_HS2_DS_Int_Clr()

INLINE void BDRV_HS2_DS_Int_Clr ( void  )

Clears High Side Driver 2 Drain Source Monitoring status 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 (BDRV->IRQS.bit.HS2_DS_IS == 1u)
{
BDRV_HS2_DS_CALLBACK();
}
}
INLINE void BDRV_HS2_DS_Int_En(void)
Enables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1141
INLINE void BDRV_HS2_DS_Int_Clr(void)
Clears High Side Driver 2 Drain Source Monitoring status flag in OFF-State.
Definition: bdrv.h:1015
INLINE void BDRV_HS2_DS_Int_Dis(void)
Disables High Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1146

◆ 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 (BDRV->IRQS.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 (BDRV->IRQS.bit.HS2_DS_IS == 1u)
{
BDRV_HS2_DS_CALLBACK();
}
}

◆ BDRV_HS2_DS_SC_Clr()

INLINE void BDRV_HS2_DS_SC_Clr ( void  )

Clears High Side Driver 2 Drain Source Monitoring status flag in OFF-State.

Example

This example checks High Side Driver 2 Drain Source Monitoring status in OFF-State.

void Example_Function(void)
{
if (BDRV->IRQS.bit.HS2_DS_STS == 1u)
{
}
}
INLINE void BDRV_HS2_DS_SC_Clr(void)
Clears High Side Driver 2 Drain Source Monitoring status flag in OFF-State.
Definition: bdrv.h:1010

◆ 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 (BDRV->IRQS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}
INLINE void BDRV_HS2_OC_Int_Clr(void)
Clears External High Side 2 FET Over-current interrupt flag.
Definition: bdrv.h:1005
INLINE void BDRV_HS2_OC_Int_En(void)
Enables External High Side 2 FET Over-current interrupt.
Definition: bdrv.h:1099

◆ 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 (BDRV->IRQS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}
INLINE void BDRV_HS2_OC_Int_Dis(void)
Disables External High Side 2 FET Over-current interrupt.
Definition: bdrv.h:1104

◆ 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 (BDRV->IRQS.bit.HS2_OC_IS == 1u)
{
BDRV_HS2_OC_CALLBACK();
}
}

◆ BDRV_Init()

void BDRV_Init ( void  )

Initializes the BridgeDriver based on the Config Wizard 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 (BDRV->IRQS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}
INLINE void BDRV_LS1_DS_Int_Clr(void)
Clears Low Side Driver 1 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:1063
INLINE void BDRV_LS1_DS_Int_En(void)
Enables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1130

◆ 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 (BDRV->IRQS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}
INLINE void BDRV_LS1_DS_Int_Dis(void)
Disables Low Side Driver 1 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1135

◆ 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 (BDRV->IRQS.bit.LS1_DS_IS == 1u)
{
BDRV_LS1_DS_CALLBACK();
}
}

◆ BDRV_LS1_DS_SC_Clr()

INLINE void BDRV_LS1_DS_SC_Clr ( void  )

Clears Low Side Driver 1 Drain Source Monitoring status flag in OFF-State.

Example

This example checks the Low Side Driver 1 Drain Source Monitoring status in OFF-State.

void Example_Function(void)
{
if (BDRV->IRQS.bit.LS1_DS_STS == 1u)
{
}
}
INLINE void BDRV_LS1_DS_SC_Clr(void)
Clears Low Side Driver 1 Drain Source Monitoring status flag in OFF-State.
Definition: bdrv.h:1058

◆ 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 (BDRV->IRQS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}
INLINE void BDRV_LS1_OC_Int_En(void)
Enables External Low Side 1 FET Over-current interrupt.
Definition: bdrv.h:1088
INLINE void BDRV_LS1_OC_Int_Clr(void)
Clears External Low Side 1 FET Over-current interrupt flag.
Definition: bdrv.h:1053

◆ 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 (BDRV->IRQS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}
INLINE void BDRV_LS1_OC_Int_Dis(void)
Disables External Low Side 1 FET Over-current interrupt.
Definition: bdrv.h:1093

◆ 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 (BDRV->IRQS.bit.LS1_OC_IS == 1u)
{
BDRV_LS1_OC_CALLBACK();
}
}

◆ 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 (BDRV->IRQS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}
INLINE void BDRV_LS2_DS_Int_Clr(void)
Clears Low Side Driver 2 Drain Source Monitoring interrupt flag in OFF-State.
Definition: bdrv.h:1047
INLINE void BDRV_LS2_DS_Int_En(void)
Enables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1151

◆ 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 (BDRV->IRQS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}
INLINE void BDRV_LS2_DS_Int_Dis(void)
Disables Low Side Driver 2 Drain Source Monitoring interrupt in OFF-State.
Definition: bdrv.h:1156

◆ 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 (BDRV->IRQS.bit.LS2_DS_IS == 1u)
{
BDRV_LS2_DS_CALLBACK();
}
}

◆ BDRV_LS2_DS_SC_Clr()

INLINE void BDRV_LS2_DS_SC_Clr ( void  )

Clears Low Side Driver 2 Drain Source Monitoring status flag in OFF-State.

Example

This example checks the Low Side Driver 2 Drain Source Monitoring status in OFF-State.

void Example_Function(void)
{
if (BDRV->IRQS.bit.LS2_DS_STS == 1u)
{
}
}
INLINE void BDRV_LS2_DS_SC_Clr(void)
Clears Low Side Driver 2 Drain Source Monitoring status flag in OFF-State.
Definition: bdrv.h:1042

◆ 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 (BDRV->IRQS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}
INLINE void BDRV_LS2_OC_Int_Clr(void)
Clears External Low Side 2 FET Over-current interrupt flag.
Definition: bdrv.h:1037
INLINE void BDRV_LS2_OC_Int_En(void)
Enables External Low Side 2 FET Over-current interrupt.
Definition: bdrv.h:1109

◆ 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 (BDRV->IRQS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}
INLINE void BDRV_LS2_OC_Int_Dis(void)
Disables External Low Side 2 FET Over-current interrupt.
Definition: bdrv.h:1114

◆ 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 (BDRV->IRQS.bit.LS2_OC_IS == 1u)
{
BDRV_LS2_OC_CALLBACK();
}
}

◆ 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

Example

This example disables all BDRV channels when a short is detected.

void Example_Function(void)
{
if (BDRV_Off_Diagnosis() == true)
{
}
}
TBDRV_Off_Diag BDRV_Off_Diagnosis(void)
Off-diagnosis.

◆ BDRV_SEQ_ERR_Int_Clr()

INLINE void BDRV_SEQ_ERR_Int_Clr ( void  )

Clears Driver Sequence Error interrupt flag.

Example

This example treats the Driver Sequence Error interrupt.

void Example_Function(void)
{
if (BDRV->IRQS.bit.SEQ_ERR_IS == 1u)
{
BDRV_SEQ_ERR_CALLBACK();
}
}
INLINE void BDRV_SEQ_ERR_Int_En(void)
Enables Driver Sequence Error interrupt.
Definition: bdrv.h:1068
INLINE void BDRV_SEQ_ERR_Int_Clr(void)
Clears Driver Sequence Error interrupt flag.
Definition: bdrv.h:999

◆ BDRV_SEQ_ERR_Int_Dis()

INLINE void BDRV_SEQ_ERR_Int_Dis ( void  )

Disables Driver Sequence Error interrupt.

Example

This example treats the Driver Sequence Error interrupt.

void Example_Function(void)
{
if (BDRV->IRQS.bit.SEQ_ERR_IS == 1u)
{
BDRV_SEQ_ERR_CALLBACK();
}
}
INLINE void BDRV_SEQ_ERR_Int_Dis(void)
Disables Driver Sequence Error interrupt.
Definition: bdrv.h:1073

◆ BDRV_SEQ_ERR_Int_En()

INLINE void BDRV_SEQ_ERR_Int_En ( void  )

Enables Driver Sequence Error interrupt.

Example

This example treats the Driver Sequence Error interrupt.

void Example_Function(void)
{
if (BDRV->IRQS.bit.SEQ_ERR_IS == 1u)
{
BDRV_SEQ_ERR_CALLBACK();
}
}

◆ BDRV_Set_Bridge()

void BDRV_Set_Bridge ( TBdrv_Ch_LS_Cfg  LS1_Cfg,
TBdrv_Ch_Cfg  HS1_Cfg,
TBdrv_Ch_LS_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.

In order to operate a 2phase motor all the four driver stages have to be configured to Ch_PWM/.

Parameters
LS1_CfgLow Side Driver 1 Configuration, see TBdrv_Ch_LS_Cfg
HS1_CfgHigh Side Driver 1 Configuration, see TBdrv_Ch_Cfg
LS2_CfgLow Side Driver 2 Configuration, see TBdrv_Ch_LS_Cfg
HS2_CfgHigh Side Driver 2 Configuration, see TBdrv_Ch_Cfg

Example

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

void Example_Function(void)
{
}
@ Ch_LS_PWM
channel enabled with PWM (CCU6 connection)
Definition: bdrv.h:116
@ Ch_PWM
channel enabled with PWM (CCU6 connection)
Definition: bdrv.h:127
void BDRV_Set_Bridge(TBdrv_Ch_LS_Cfg LS1_Cfg, TBdrv_Ch_Cfg HS1_Cfg, TBdrv_Ch_LS_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_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_Channel_Comp()

void BDRV_Set_Channel_Comp ( uint8  gain_hs,
uint8  gain_ls 
)

Sets Gain for Low/High Side Charge Current Compensation.

Parameters
gain_hsHigh Side gain selection
gain_lsLow Side gain selection

Example

This example sets gain_1 for High and Low Sides Charge Current Compensation.

void Example_Function(void)
{
}
void BDRV_Set_Channel_Comp(uint8 gain_hs, uint8 gain_ls)
Sets Gain for Low/High Side Charge Current Compensation.

◆ 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

Example

This example sets the Voltage Threshold for Drain-Source Monitoring to 1,5V

void Example_Function(void)
{
}
@ Threshold_1_50_V
Threshold 6 for VDS at 1.50 V.
Definition: bdrv.h:204
void BDRV_Set_DSM_Threshold(TBdrv_DSM_Threshold BDRV_Threshold)
Sets the Voltage Threshold for Drain-Source Monitoring of external FETs.

◆ 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.

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)
{
}
void BDRV_Set_Int_Channel(TBdrv_Ch BDRV_Ch, TBdrv_Ch_Int Ch_Int)
Sets Interrupt Enable for the individual MOSFETs.
@ Int_OC
Over-Current interrupt enable
Definition: bdrv.h:189