![]() |
Infineon MOTIX™ MCU TLE985x Device Family SDK
|
Go to the source code of this file.
Bridge Driver low level access library.
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... | |
#define BDRV_COMP_BITS 0x70700u |
BDRV Compensation Trimming Mask.
#define BDRV_DS_STS_BITS 0x20202020 |
BDRV Drain Source Interrupt Status Clear Mask.
#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.
#define BDRV_HS1_DS_SC BDRV_IRQCLR_HS1_DS_SC_Msk |
High Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State
#define BDRV_HS1_OC_ISC BDRV_IRQCLR_HS1_OC_ISC_Msk |
External High Side 1 FET Over-current Mask Status Clear
#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.
#define BDRV_HS2_DS_SC BDRV_IRQCLR_HS2_DS_SC_Msk |
High Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State
#define BDRV_HS2_OC_ISC BDRV_IRQCLR_HS2_OC_ISC_Msk |
External High Side 2 FET Over-current Mask Status Clear
#define BDRV_IRQ_CLR_BITS 0xF0707073u |
BDRV Interrupt Clear Mask.
#define BDRV_IRQ_EN_BITS 0xD0505050u |
BDRV Interrupt Enable Mask.
#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
#define BDRV_LS1_DS_SC BDRV_IRQCLR_LS1_DS_SC_Msk |
Low Side Driver 1 Drain Source Monitoring Mask Status Clear in OFF-State
#define BDRV_LS1_OC_ISC BDRV_IRQCLR_LS1_OC_ISC_Msk |
External Low Side 1 FET Over-current Mask Status Clear
#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
#define BDRV_LS2_DS_SC BDRV_IRQCLR_LS2_DS_SC_Msk |
Low Side Driver 2 Drain Source Monitoring Mask Status Clear in OFF-State
#define BDRV_LS2_OC_ISC BDRV_IRQCLR_LS2_OC_ISC_Msk |
External Low Side 2 FET Over-current Mask Status Clear
#define BDRV_SEQ_ERR_ISC BDRV_IRQCLR_SEQ_ERR_ISC_Msk |
Driver Sequence Error Mask Status Clear
enum TBdrv_Ch |
enum TBdrv_Ch_Cfg |
enum TBdrv_Ch_Int |
enum TBdrv_Ch_LS_Cfg |
enum TBdrv_DSM_Threshold |
This enum lists the Drain-Source Voltage Threshold.
enum TBDRV_Off_Diag_Sts |
void BDRV_Clr_Sts | ( | uint32 | Sts_Bit | ) |
Clears individual status flags and interrupt status flags of the BridgeDriver.
Sts_Bit | status bit to be cleared |
Example
This example clears BDRV HS2/LS2 Over-Current interrupt flag.
bool BDRV_Diag_OpenLoad | ( | void | ) |
Detects whether a motor is connected.
true | no motor detected |
false | motor connected |
Example
This example disables all BDRV channels when Open Load is detected.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 BDRV_Init | ( | void | ) |
Initializes the BridgeDriver based on the Config Wizard configuration.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
TBDRV_Off_Diag BDRV_Off_Diagnosis | ( | void | ) |
Off-diagnosis.
Detects a short of the phases either to Gnd or to Vbat
true | any short detected |
false | no short |
Example
This example disables all BDRV channels when a short is detected.
INLINE void BDRV_SEQ_ERR_Int_Clr | ( | void | ) |
Clears Driver Sequence Error interrupt flag.
Example
This example treats the Driver Sequence Error interrupt.
INLINE void BDRV_SEQ_ERR_Int_Dis | ( | void | ) |
Disables Driver Sequence Error interrupt.
Example
This example treats the Driver Sequence Error interrupt.
INLINE void BDRV_SEQ_ERR_Int_En | ( | void | ) |
Enables Driver Sequence Error interrupt.
Example
This example treats the Driver Sequence Error interrupt.
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/.
LS1_Cfg | Low Side Driver 1 Configuration, see TBdrv_Ch_LS_Cfg |
HS1_Cfg | High Side Driver 1 Configuration, see TBdrv_Ch_Cfg |
LS2_Cfg | Low Side Driver 2 Configuration, see TBdrv_Ch_LS_Cfg |
HS2_Cfg | High 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 BDRV_Set_Channel | ( | TBdrv_Ch | BDRV_Ch, |
TBdrv_Ch_Cfg | Ch_Cfg | ||
) |
sets an individual driver of the BridgeDriver in the desired state
BDRV_Ch | selects the channel for which the configuration should be set, see TBdrv_Ch |
Ch_Cfg | selects the mode of operation for that channel, see TBdrv_Ch_Cfg |
Example
This example configures BDRV Bridge channel HS1 to be enabled with PWM.
Sets Gain for Low/High Side Charge Current Compensation.
gain_hs | High Side gain selection |
gain_ls | Low Side gain selection |
Example
This example sets gain_1 for High and Low Sides Charge Current Compensation.
void BDRV_Set_DSM_Threshold | ( | TBdrv_DSM_Threshold | BDRV_Threshold | ) |
Sets the Voltage Threshold for Drain-Source Monitoring of external FETs.
BDRV_Threshold | selection for the desired voltage threshold, see TBdrv_DSM_Threshold |
Example
This example sets the Voltage Threshold for Drain-Source Monitoring to 1,5V
void BDRV_Set_Int_Channel | ( | TBdrv_Ch | BDRV_Ch, |
TBdrv_Ch_Int | Ch_Int | ||
) |
Sets Interrupt Enable for the individual MOSFETs.
BDRV_Ch | Channel selection, see TBdrv_Ch |
Ch_Int | selection for the desired interrupt to be enabled, see TBdrv_Ch_Int |
Example
This example enables BDRV HS1 Over-Current Interrupt.