13.21. Pin PWM Driver - PwmDrvr
Id |
PwmDrvr |
Title |
Pin PWM Driver |
System |
Thermal |
Document Type |
Application Software Component Specification Preview |
13.21.1. Overview
The PWM Driver component controls a PWM device. It handles device initialization, power supply control, fault monitoring, and provides an interface for setting the PWM duty cycle.
13.21.2. Functions
Title |
Description |
|
|---|---|---|
1 |
Device Initialization |
Initializes the PWM device, including setting the PWM frequency and pin modes. |
2 |
Power Supply Control |
Controls the power supply to the PWM device based on vehicle state. |
3 |
Fault Monitoring |
Monitors diagnostic pins to detect faults with the PWM device or power supply. Sets fault status if issues detected. |
4 |
Duty Cycle Control |
Allows setting the PWM duty cycle via an input port. Validates and arbitrates the duty cycle request. |
13.21.3. Ports
Id |
Direction |
Data Type |
Dimensions |
Unit |
|
|---|---|---|---|---|---|
1 |
Req |
Incoming |
uint8 |
[-1] |
inherit |
2 |
Req_valid |
Incoming |
boolean |
[1] |
inherit |
3 |
VsmSt |
Incoming |
Bus: CAN_VSMState_t |
[-1] |
inherit |
4 |
PwmdrvrPwmPinSt |
Incoming |
Enum: InpoutPinSt |
[1] |
inherit |
5 |
PwmdrvrPwmPinU |
Incoming |
single |
[1] |
inherit |
6 |
PwmdrvrPwmPinCur |
Incoming |
single |
[1] |
inherit |
7 |
PwmdrvrVccPinSt |
Incoming |
Enum: InpoutPinSt |
[1] |
inherit |
8 |
PwmdrvrVccPinU |
Incoming |
single |
[1] |
inherit |
9 |
PwmdrvrVccPinCur |
Incoming |
single |
[1] |
inherit |
10 |
PwmdrvrDiagcPinU |
Incoming |
single |
[1] |
inherit |
11 |
PwmdrvrDiagcPinSt |
Incoming |
Enum: InpoutPinSt |
[1] |
inherit |
12 |
BasU |
Incoming |
single |
[1] |
inherit |
13 |
DevStOk |
Outgoing |
boolean |
[-1] |
inherit |
14 |
PwrCns |
Outgoing |
single |
[-1] |
inherit |
15 |
CurCns |
Outgoing |
single |
[-1] |
inherit |
16 |
SplyReq |
Outgoing |
boolean |
[-1] |
inherit |
17 |
PwmdrvrPwmPinDuty |
Outgoing |
uint8 |
[1] |
inherit |
18 |
Diagc |
Outgoing |
Bus: PwmdrvrDiagc |
[-1] |
inherit |
19 |
PwmdrvrVccPinDuty |
Outgoing |
uint8 |
[1] |
inherit |
20 |
PwmdrvrPwmPinMod |
Outgoing |
Enum: InpoutPinMod |
[1] |
inherit |
21 |
PwmdrvrPwmPinPuMod |
Outgoing |
Enum: InpoutPinPuMod |
[1] |
inherit |
22 |
PwmdrvrDiagcPinMod |
Outgoing |
Enum: InpoutPinMod |
[1] |
inherit |
23 |
PwmdrvrDiagcPinPuMod |
Outgoing |
Enum: InpoutPinPuMod |
[1] |
inherit |
24 |
PwmdrvrVccPinMod |
Outgoing |
Enum: InpoutPinMod |
[1] |
inherit |
25 |
PwmdrvrVccPinPuMod |
Outgoing |
Enum: InpoutPinPuMod |
[1] |
inherit |
26 |
PwmdrvrPwmPinFrq |
Outgoing |
single |
[1] |
inherit |
13.21.4. Parameters
Id |
Data Type |
Dimensions |
Range |
Unit |
Description |
|
|---|---|---|---|---|---|---|
1 |
PwmdrvrCtlTiout |
single |
[1,1] |
Min: 1, Max: 10 |
sec |
Delay time before device stop |
2 |
PwmdrvrDbgReq |
int8 |
[1,1] |
Min: -1, Max: 100 |
% |
Manual PWM duty cycle used during override mode |
3 |
PwmdrvrDiagcEnad |
boolean |
[1,1] |
Min: 0, Max: 1 |
Device diagnostic enabled |
|
4 |
PwmdrvrDiagcOffThd |
single |
[1,1] |
Min: 0, Max: 36 |
V |
Device fault diag pin off thrshold |
5 |
PwmdrvrDiagcOnThd |
single |
[1,1] |
Min: 0, Max: 36 |
V |
Device fault diag pin on thrshold |
6 |
PwmdrvrNotAcvThd |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Device inactive treshold |
7 |
PwmdrvrPinPwrReqTbl |
boolean |
[1,5] |
Min: 0, Max: 1 |
Pin Power Table |
|
8 |
PwmdrvrPwmIvt |
boolean |
[1,1] |
Min: 0, Max: 1 |
Enable to PWM duty inversion |
|
9 |
PwmdrvrPwmMax |
uint8 |
[1,1] |
Min: 0, Max: 100 |
% |
Device PWM max value |
10 |
PwmdrvrPwmMin |
uint8 |
[1,1] |
Min: 0, Max: 100 |
% |
Device PWM min value |
11 |
PwmdrvrRgnTiout |
single |
[1,1] |
Min: 1, Max: 10 |
sec |
Delay time before state error leaving |
12 |
PwmdrvrSpdReqMax |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Max allowed device speed request |
13 |
PwmdrvrSpdReqMin |
single |
[1,1] |
Min: 0, Max: 100 |
% |
Min allowed device speed request |
14 |
PwmdrvrVccPinSns |
boolean |
[1,1] |
Min: 0, Max: 1 |
Enable diagnostic measurement on the power supply pin |
|
15 |
PwmdrvrDiagcPinUse |
boolean |
[1,1] |
Min: 0, Max: 1 |
Diagnostic pin is used |
|
16 |
PwmdrvrVccPinDrv |
boolean |
[1,1] |
Min: 0, Max: 1 |
Enable control of the power supply pin |
|
17 |
PwmdrvrDiagcPinPuMod |
uint8 |
[1,1] |
Min: 0, Max: 2 |
Pin pull mode: 0 - Off, 1 - pull-up, 2 - pull-down |
|
18 |
PwmdrvrPwmFrq |
single |
[1,1] |
Min: , Max: |
Device control PWM frequency |
|
19 |
PwmdrvrPwmPinPuMod |
boolean |
[1,1] |
Min: 0, Max: 1 |
Pull-up/pull-down for PWM pin enabled |
|
20 |
PwmdrvrPwmPinMod |
boolean |
[1,1] |
Min: 0, Max: 1 |
Pin mode: 0 - hi-side, 1 - low-side |