![]() |
TLE986x 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 | 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 |
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... | |
#define BDRV_DS_STS_BITS BDRV_ISCLR_DS |
#define BDRV_IRQ_BITS (BDRV_ISCLR_OC | BDRV_ISCLR_DS) |
#define HS1_DS SCUPM_BDRV_ISCLR_HS1_DS_ICLR_Msk |
Phase1 High Side MOSFET mask for Off-Diagnosis.
#define HS1_OC SCUPM_BDRV_ISCLR_HS1_OC_ICLR_Msk |
Phase1 High Side MOSFET mask for On-Diagnosis.
#define HS2_DS SCUPM_BDRV_ISCLR_HS2_DS_ICLR_Msk |
Phase2 High Side MOSFET mask for Off-Diagnosis.
#define HS2_OC SCUPM_BDRV_ISCLR_HS2_OC_ICLR_Msk |
Phase2 High Side MOSFET mask for On-Diagnosis.
#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
#define LS1_OC SCUPM_BDRV_ISCLR_LS1_OC_ICLR_Msk |
Phase1 Low Side MOSFET mask for On-Diagnosis.
#define LS2_DS SCUPM_BDRV_ISCLR_LS2_DS_ICLR_Msk |
Phase2 Low Side MOSFET mask for Off-Diagnosis.
#define LS2_OC SCUPM_BDRV_ISCLR_LS2_OC_ICLR_Msk |
Phase2 Low Side MOSFET mask for On-Diagnosis.
enum TBdrv_Ch |
enum TBdrv_Ch_Cfg |
enum TBdrv_Ch_Int |
enum TBdrv_Disch_Curr |
enum TBdrv_DSM_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(s) to be cleared |
Example
This example enables BDRV LS1, LS2, HS1 and HS2 Over-Current Interrupt.
bool BDRV_Diag_OpenLoad | ( | void | ) |
Open Load detection, 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 | ) |
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_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.
Reads the Bridge Driver High-Side 1 Pre-Driver Short Status Flag.
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.
Reads the Bridge Driver High-Side 1 Over-Current Status Flag.
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.
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.
Reads the Bridge Driver High-Side 2 Pre-Driver Short Status Flag.
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.
Reads the Bridge Driver High-Side 2 Over-Current Status Flag.
void BDRV_Init | ( | void | ) |
Initializes the BridgeDriver based on the IFXConfigWizard 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.
Reads the Bridge Driver Low-Side 1 Pre-Driver Short Status Flag.
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.
Reads the Bridge Driver Low-Side 1 Over-Current Status Flag.
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.
Reads the Bridge Driver Low-Side 2 Pre-Driver Short Status Flag.
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.
Reads the Bridge Driver Low-Side 2 Over-Current Status Flag.
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 |
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
LS1_Cfg | sets the desired mode for LS MOSFET of phase1 |
HS1_Cfg | sets the desired mode for HS MOSFET of phase1 |
LS2_Cfg | sets the desired mode for LS MOSFET of phase2 |
HS2_Cfg | sets 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 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.
void BDRV_Set_Discharge_Current | ( | TBdrv_Disch_Curr | BDRV_Current | ) |
Sets the trimming of the internal driver discharge current.
BDRV_Current | selection for the desired discharge current, see TBdrv_Disch_Curr |
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 |
void BDRV_Set_Int_Channel | ( | TBdrv_Ch | BDRV_Ch, |
TBdrv_Ch_Int | Ch_Int | ||
) |
sets Interrupt Enable for the individual MOSFETs (channels)
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.
INLINE void BDRV_VCP_LO_Int_Clr | ( | void | ) |
clears Charge Pump Low interrupt flag.
Example
This example treats the Charge Pump Low interrupt.
INLINE void BDRV_VCP_LO_Int_Dis | ( | void | ) |
disables Charge Pump Low interrupt.
Example
This example treats the Charge Pump Low interrupt.
INLINE void BDRV_VCP_LO_Int_En | ( | void | ) |
enables Charge Pump Low interrupt.
Example
This example treats the Charge Pump Low interrupt.