|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
drv_mcc_extension_pwm.h File Reference
Driver Layer » MCC Custom Code PWM

Contains public functions and defines for the MCC code extension for PWM.
More...

`#include <xc.h>`
`#include <stdint.h>`
`#include <stdbool.h>`
`#include <stddef.h>`
Include dependency graph for drv_mcc_extension_pwm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Typedefs
typedef enum PWM_PCI_ACCEPTANCE_CRITERIA_e | PWM_PCI_ACCEPTANCE_CRITERIA_t
typedef enum PWM_PCI_TERMTIME_AFTER_EVENT_e | PWM_PCI_TERMTIME_AFTER_EVENT_t
typedef enum PWM_SOCS_e | PWM_SOCS_t
typedef enum PWM_UPDMOD_e | PWM_UPDMOD_t
typedef enum PWM_PCI_SOURCE_e | PWM_PCI_SOURCE_t
typedef enum RPnR_SOURCE_e | RPnR_SOURCE_t
typedef enum RPnR_VIRTUAL_PIN_e | RPnR_VIRTUAL_PIN_t
typedef enum RPx_INPUT_e | RPx_INPUT_t
typedef enum PWM_PCI_INPUT_e | PWM_PCI_INPUT_t
typedef enum PWM_PCI_SOURCE_SELECT_e | PWM_PCI_SOURCE_SELECT_t
typedef enum PWM_PCI_ACCEPTANCE_QUALIFER_e | PWM_PCI_ACCEPTANCE_QUALIFER_t
typedef enum PWM_TRIG_MODE_e | PWM_TRIG_MODE_t
typedef enum PWM_PCI_TERM_e | PWM_PCI_TERM_t
typedef enum PWM_EVENT_SOURCE_e | PWM_EVENT_SOURCE_t
typedef enum PWM_UPDTRG_e | PWM_UPDTRG_t
typedef enum PWM_LATCH_MODE_e | PWM_LATCH_MODE_t
typedef enum PWM_FAULT_DATA_e | PWM_FAULT_DATA_t

## Enumerations
enum | PWM_PCI_ACCEPTANCE_CRITERIA_e { PWM_PCI_ACCEPT_LEVEL_SENSITIVE = 0 , PWM_PCI_ACCEPT_RISING_EDGE = 1 , PWM_PCI_ACCEPT_ANY_EDGE = 2 , PWM_PCI_ACCEPT_LATCHED = 3 , PWM_PCI_ACCEPT_LATCHED_RISING_EDGE = 4 , PWM_PCI_ACCEPT_LATCHED_ANY_EDGE = 5 }
| Set PCI fault acceptance criteria. More...
enum | PWM_PCI_TERMTIME_AFTER_EVENT_e { PWM_PCI_TERMTIME_AFTER_EVENT_AT_EOC = 0 , PWM_PCI_TERMTIME_AFTER_EVENT_IMMEDIATE = 1 }
| Settings for Termination Synchronization bit. More...
enum | PWM_SOCS_e { PWM_SOCS_SELF_TRIGGER = 0 , PWM_SOCS_PG1_OR_PG5 = 1 , PWM_SOCS_PG2_OR_PG6 = 2 , PWM_SOCS_PG3_OR_PG7 = 3 , PWM_SOCS_PG4_OR_PG8 = 4 , PWM_SOCS_TRIG_OR_PCI_SYNC = 15 }
| Settings for PWM Start-of_cycle Selection bit. More...
enum | PWM_UPDMOD_e { PWM_UPDMOD_SOC = 0 , PWM_UPDMOD_IMMEDIATE = 1 , PWM_UPDMOD_CLIENT_SOC = 2 , PWM_UPDMOD_CLIENT_IMMEDIATE = 3 }
| settings for PWM Buffer Update Mode Selection bits More...
enum | PWM_PCI_SOURCE_e { PWM_PCI_SOURCE_PWM1 = 0 , PWM_PCI_SOURCE_PWM2 = 1 , PWM_PCI_SOURCE_PWM3 = 2 , PWM_PCI_SOURCE_PWM4 = 3 }
| Settings for PWM Source for PCI Selection bits. More...
enum | RPnR_SOURCE_e { RPnR_SOURCE_DefaultPORT = 0 , RPnR_SOURCE_U1TX = 1 , RPnR_SOURCE_U1RTS = 2 , RPnR_SOURCE_U2TX = 3 , RPnR_SOURCE_U2RTS = 4 , RPnR_SOURCE_SDO1 = 5 , RPnR_SOURCE_SCK1 = 6 , RPnR_SOURCE_SS1 = 7 , RPnR_SOURCE_SDO2 = 8 , RPnR_SOURCE_SCK2 = 9 , RPnR_SOURCE_SS2 = 10 , RPnR_SOURCE_SDO3 = 11 , RPnR_SOURCE_SCK3 = 12 , RPnR_SOURCE_SS3 = 13 , RPnR_SOURCE_REFCLKO = 14 , RPnR_SOURCE_OCM1 = 15 , RPnR_SOURCE_OCM2 = 16 , RPnR_SOURCE_OCM3 = 17 , RPnR_SOURCE_OCM4 = 18 , RPnR_SOURCE_OCM5 = 19 , RPnR_SOURCE_OCM6 = 20 , RPnR_SOURCE_CAN1TX = 21 , RPnR_SOURCE_CMP1 = 23 , RPnR_SOURCE_CMP2 = 24 , RPnR_SOURCE_CMP3 = 25 , RPnR_SOURCE_U3TX = 27 , RPnR_SOURCE_U3RTS = 28 , RPnR_SOURCE_PWM4H = 34 , RPnR_SOURCE_PWM4L = 35 , RPnR_SOURCE_PWMEA = 36 , RPnR_SOURCE_PWMEB = 37 , RPnR_SOURCE_QEICMP1 = 38 , RPnR_SOURCE_QEICMP2 = 39 , RPnR_SOURCE_CLC1OUT = 40 , RPnR_SOURCE_CLC2OUT = 41 , RPnR_SOURCE_OCM7 = 42 , RPnR_SOURCE_OCM8 = 43 , RPnR_SOURCE_PWMEC = 44 , RPnR_SOURCE_PWMED = 45 , RPnR_SOURCE_PTGTRG24 = 46 , RPnR_SOURCE_PTGTRG25 = 47 , RPnR_SOURCE_SENT1OUT = 48 , RPnR_SOURCE_SENT2OUT = 49 , RPnR_SOURCE_MCCP9A = 50 , RPnR_SOURCE_MCCP9B = 51 , RPnR_SOURCE_MCCP9C = 52 , RPnR_SOURCE_MCCP9D = 53 , RPnR_SOURCE_MCCP9E = 54 , RPnR_SOURCE_MCCP9F = 55 , RPnR_SOURCE_CLC3OUT = 59 , RPnR_SOURCE_CLC4OUT = 60 , RPnR_SOURCE_U1DTR = 61 , RPnR_SOURCE_U2DTR = 62 , RPnR_SOURCE_U3DTR = 63 }
| Peripheral output for re-mappable pins. More...
enum | RPnR_VIRTUAL_PIN_e { RPnR_VIRTUAL_PIN_RP176 = 0 , RPnR_VIRTUAL_PIN_RP177 = 1 , RPnR_VIRTUAL_PIN_RP178 = 2 , RPnR_VIRTUAL_PIN_RP179 = 3 , RPnR_VIRTUAL_PIN_RP180 = 4 , RPnR_VIRTUAL_PIN_RP181 = 5 }
| List of re-mappable pins for dsPIC33CK256MP508. More...
enum | RPx_INPUT_e { RPx_INPUT_VSS = 0 , RPx_INPUT_CMP1 = 1 , RPx_INPUT_CMP2 = 2 , RPx_INPUT_CMP3 = 3 , RPx_INPUT_PTG_TRIG_26 = 6 , RPx_INPUT_PTG_TRIG_27 = 7 , RPx_INPUT_PWM_EVENT_C = 11 , RPx_INPUT_PWM_EVENT_D = 12 , RPx_INPUT_PWM_EVENT_E = 13 , RPx_INPUT_RP32 = 32 , RPx_INPUT_RP33 = 33 , RPx_INPUT_RP34 = 34 , RPx_INPUT_RP35 = 35 , RPx_INPUT_RP36 = 36 , RPx_INPUT_RP37 = 37 , RPx_INPUT_RP38 = 38 , RPx_INPUT_RP39 = 39 , RPx_INPUT_RP40 = 40 , RPx_INPUT_RP41 = 41 , RPx_INPUT_RP42 = 42 , RPx_INPUT_RP43 = 43 , RPx_INPUT_RP44 = 44 , RPx_INPUT_RP45 = 45 , RPx_INPUT_RP46 = 46 , RPx_INPUT_RP47 = 47 , RPx_INPUT_RP48 = 48 , RPx_INPUT_RP49 = 49 , RPx_INPUT_RP50 = 50 , RPx_INPUT_RP51 = 51 , RPx_INPUT_RP52 = 52 , RPx_INPUT_RP53 = 53 , RPx_INPUT_RP54 = 54 , RPx_INPUT_RP55 = 55 , RPx_INPUT_RP56 = 56 , RPx_INPUT_RP57 = 57 , RPx_INPUT_RP58 = 58 , RPx_INPUT_RP59 = 59 , RPx_INPUT_RP60 = 60 , RPx_INPUT_RP61 = 61 , RPx_INPUT_RP62 = 62 , RPx_INPUT_RP63 = 63 , RPx_INPUT_RP64 = 64 , RPx_INPUT_RP65 = 65 , RPx_INPUT_RP66 = 66 , RPx_INPUT_RP67 = 67 , RPx_INPUT_RP68 = 68 , RPx_INPUT_RP69 = 69 , RPx_INPUT_RP70 = 70 , RPx_INPUT_RP71 = 71 , RPx_INPUT_RP72 = 72 , RPx_INPUT_RP73 = 73 , RPx_INPUT_RP74 = 74 , RPx_INPUT_RP75 = 75 , RPx_INPUT_RP76 = 76 , RPx_INPUT_RP77 = 77 , RPx_INPUT_RP78 = 78 , RPx_INPUT_RP79 = 79 , RPx_INPUT_DAC3_pwm_req_on = 164 , RPx_INPUT_DAC3_pwm_req_off = 165 , RPx_INPUT_DAC2_pwm_req_on = 166 , RPx_INPUT_DAC2_pwm_req_off = 167 , RPx_INPUT_DAC1_pwm_req_on = 168 , RPx_INPUT_DAC1_pwm_req_off = 169 , RPx_INPUT_RP176 = 176 , RPx_INPUT_RP177 = 177 , RPx_INPUT_RP178 = 178 , RPx_INPUT_RP179 = 179 , RPx_INPUT_RP180 = 180 , RPx_INPUT_RP181 = 181 }
| List of output selection for re-mappable pins (taken from dsPIC33CK256MP508 datasheet) More...
enum | PWM_PCI_INPUT_e { PWM_PCI_INPUT8 = 0 , PWM_PCI_INPUT9 = 1 , PWM_PCI_INPUT10 = 2 , PWM_PCI_INPUT11 = 3 }
| list of PWM PCI inputs More...
enum | PWM_PCI_SOURCE_SELECT_e { PWM_PCI_SOURCE_SELECT_CLC1 = 31 , PWM_PCI_SOURCE_SELECT_CMP3 = 29 , PWM_PCI_SOURCE_SELECT_CMP2 = 28 , PWM_PCI_SOURCE_SELECT_CMP1 = 27 , PWM_PCI_SOURCE_SELECT_PWM_EVENT_D = 26 , PWM_PCI_SOURCE_SELECT_PWM_EVENT_C = 25 , PWM_PCI_SOURCE_SELECT_PWM_EVENT_B = 24 , PWM_PCI_SOURCE_SELECT_PWM_EVENT_A = 23 , PWM_PCI_SOURCE_SELECT_PCI22 = 22 , PWM_PCI_SOURCE_SELECT_PCI21 = 21 , PWM_PCI_SOURCE_SELECT_PCI20 = 20 , PWM_PCI_SOURCE_SELECT_PCI19 = 19 , PWM_PCI_SOURCE_SELECT_PCI18R = 18 , PWM_PCI_SOURCE_SELECT_PCI17R = 17 , PWM_PCI_SOURCE_SELECT_PCI16R = 16 , PWM_PCI_SOURCE_SELECT_PCI15R = 15 , PWM_PCI_SOURCE_SELECT_PCI14R = 14 , PWM_PCI_SOURCE_SELECT_PCI13R = 13 , PWM_PCI_SOURCE_SELECT_PCI12R = 12 , PWM_PCI_SOURCE_SELECT_PCI11R = 11 , PWM_PCI_SOURCE_SELECT_PCI10R = 10 , PWM_PCI_SOURCE_SELECT_PCI9R = 9 , PWM_PCI_SOURCE_SELECT_PCI8R = 8 , PWM_PCI_SOURCE_SELECT_COMBO_TRIG_B = 3 , PWM_PCI_SOURCE_SELECT_COMBO_TRIG_A = 2 , PWM_PCI_SOURCE_SELECT_PWMPCI_MUX = 1 , PWM_PCI_SOURCE_SELECT_TIED_TO_0 = 0 }
| List of PWM PCI inputs. More...
enum | PWM_PCI_ACCEPTANCE_QUALIFER_e { PWM_PCI_ACCEPTANCE_QUALIFER_NONE = 0 , PWM_PCI_ACCEPTANCE_QUALIFER_DUTY = 1 , PWM_PCI_ACCEPTANCE_QUALIFER_LEB = 2 , PWM_PCI_ACCEPTANCE_QUALIFER_PWM = 3 , PWM_PCI_ACCEPTANCE_QUALIFER_PCI_PWMPCI = 4 , PWM_PCI_ACCEPTANCE_QUALIFER_PCI_SOURCE8 = 5 , PWM_PCI_ACCEPTANCE_QUALIFER_PCI_SOURCE9 = 6 , PWM_PCI_ACCEPTANCE_QUALIFER_SWPCI = 7 }
| List of sources of PWM acceptance qualifiers. More...
enum | PWM_TRIG_MODE_e { PWM_TRIG_MODE_SINGLE = 0 , PWM_TRIG_MODE_RETRIGGERABLE = 1 }
| Set PWM trigger mode. More...
enum | PWM_PCI_TERM_e { PWM_PCI_TERM_MANUAL = 0 , PWM_PCI_TERM_AUTO = 1 , PWM_PCI_TERM_PGxTRIGA = 2 , PWM_PCI_TERM_PGxTRIGB = 3 , PWM_PCI_TERM_PGxTRIGC = 4 , PWM_PCI_TERM_PCI_SOURCE1 = 5 , PWM_PCI_TERM_PCI_SOURCE8 = 6 , PWM_PCI_TERM_PCI_SOURCE9 = 7 }
| PWM Termination event selection. More...
enum | PWM_EVENT_SOURCE_e { PWM_EVENT_SOURCE_PGTRGSEL = 0 , PWM_EVENT_SOURCE_PWM_GEN_OUTPUT = 1 , PWM_EVENT_SOURCE_PCI_SYNC_ACTIVE = 2 , PWM_EVENT_SOURCE_PCI_FF_ACTIVE = 3 , PWM_EVENT_SOURCE_PCI_FF_CL_ACTIVE = 4 , PWM_EVENT_SOURCE_PCI_FAULT_ACTIVE = 5 , PWM_EVENT_SOURCE_CAHALF = 6 , PWM_EVENT_SOURCE_STEER = 7 , PWM_EVENT_SOURCE_ADC_TRIG1 = 8 , PWM_EVENT_SOURCE_ADC_TRIG2 = 9 , PWM_EVENT_SOURCE_HR_ERROR_EVENT = 15 }
| Select event source for PWMEVTx register. More...
enum | PWM_UPDTRG_e { PWM_UPDTRG_MANUAL = 0 , PWM_UPDTRG_PGxDC = 1 , PWM_UPDTRG_PGxPHASE = 2 , PWM_UPDTRG_PGxTRIGA = 3 }
| Settings for Update Trigger Event. More...
enum | PWM_LATCH_MODE_e { PWM_SET_DOMINANT_MODE = 0 , PWM_RESET_DOMINANT_MODE = 1 }
| Set PWM trigger mode. More...
enum | PWM_FAULT_DATA_e { PWM_FAULT_EVENT_PWMH = 0 , PWM_FAULT_EVENT_PWML = 1 }
| Set PWM fault data. More...

## Functions
static void | PWM_PCI_Fault_AcceptanceCriteria (uint16_t pwmIndex, PWM_PCI_ACCEPTANCE_CRITERIA_t acpSetting)
| Set PCI fault acceptance criteria.
static void | PWM_PCI_Fault_AcceptanceQualiferInvert (uint16_t pwmIndex, bool invert)
| Set PCI polarity of PCI fault acceptance input.
static void | PWM_PCI_Sync_AcceptanceCriteria (uint16_t pwmIndex, PWM_PCI_ACCEPTANCE_CRITERIA_t acpSetting)
| Sets PCI Synchronization Acceptance Criteria.
static void | PWM_PCI_Fault_TimetoTerminateAfterEvent (uint16_t pwmIndex, PWM_PCI_TERMTIME_AFTER_EVENT_t faultTerm)
| Set TSYNCDIS bit to determine when PWM should stop after a fault occurs.
static void | PWM_PCI_Sync_TimetoTerminateAfterEvent (uint16_t pwmIndex, PWM_PCI_TERMTIME_AFTER_EVENT_t faultTerm)
| Set TSYNCDIS bit to determine when PWM should stop after a sync event occurs.
static void | PWM_StartOfCycleTrigger (uint16_t pwmIndex, PWM_SOCS_t triggerSource)
| Set SOCS field to determine start of cycle trigger.
static void | PWM_UPDREQ_Broadcast_Enable (uint16_t pwmIndex, bool enable)
| Enable broadcasting of UPDREQ bit to other PWMs.
static void | PWM_Data_Update_Mode (uint16_t pwmIndex, PWM_UPDMOD_t updateMode)
| Sets the PWM Data Update Mode.
static void | PWM_PCI_Source1 (uint16_t pwmIndex, PWM_PCI_SOURCE_t pciSource)
| Set PWM source for PCI selection bits (for PCI source 1)
static void | RPnR_VirtualPin_Source (RPnR_VIRTUAL_PIN_t virtualPin, RPnR_SOURCE_t peripheral)
| Set source for a virtual pin.
static void | PWM_PCI_INPUT_MaptoPin (PWM_PCI_INPUT_t pciIndex, RPx_INPUT_t pin)
| Map PWM PCI input to a pin.
static void | PWM_PCI_Sync_Source_Select (uint16_t pwmIndex, PWM_PCI_SOURCE_SELECT_t pciSource)
| Set PCI source (PSS field) for PCI Synchronization.
static void | PWM_PCI_Fault_AcceptanceQualifierSource (uint16_t pwmIndex, PWM_PCI_ACCEPTANCE_QUALIFER_t source)
| Set source of fault PCI acceptance qualifier.
static void | PWM_Trigger_Mode (uint16_t pwmIndex, PWM_TRIG_MODE_t trigMode)
| Set source of fault PCI acceptance qualifier.
static void | PWM_PCI_Sync_TerminationEventSelect (uint16_t pwmIndex, PWM_PCI_TERM_t termEvent)
| Select termination event for SYNC PCI.
static void | PWM_Swap_PWMxL_and_PWMxH (uint16_t pwmIndex, bool swapPWMH_PWML)
| Enable/Disable the PWM instance output swap bit.
static void | PWM_EVENTA_Configure (uint16_t pwmSource, PWM_EVENT_SOURCE_t eventSource, bool invert, bool outputEnable, bool stretchDisable, bool outputSync)
| Configure PWM Event A register.
static void | PWM_Data_Update_Trigger (uint16_t pwmIndex, PWM_UPDTRG_t updateTrigger)
| Set PWM Register update trigger.
static void | PWM_Fault_LatchMode (uint16_t pwmIndex, PWM_LATCH_MODE_t latchMode)
| Set the latch mode of fault PCI.
static void | PWM_Fault_DataMode (uint16_t pwmIndex, PWM_FAULT_DATA_t faultDataMode)
| Set the data mode of fault PCI.

## Detailed Description

<>

Definition in file drv_mcc_extension_pwm.h.

## Typedef Documentation

## ◆ PWM_EVENT_SOURCE_t

typedef enum PWM_EVENT_SOURCE_e PWM_EVENT_SOURCE_t

Definition at line 1106 of file drv_mcc_extension_pwm.h.

## ◆ PWM_FAULT_DATA_t

typedef enum PWM_FAULT_DATA_e PWM_FAULT_DATA_t

Definition at line 1260 of file drv_mcc_extension_pwm.h.

## ◆ PWM_LATCH_MODE_t

typedef enum PWM_LATCH_MODE_e PWM_LATCH_MODE_t

Definition at line 1205 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_ACCEPTANCE_CRITERIA_t

typedef enum PWM_PCI_ACCEPTANCE_CRITERIA_e PWM_PCI_ACCEPTANCE_CRITERIA_t

Definition at line 39 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_ACCEPTANCE_QUALIFER_t

typedef enum PWM_PCI_ACCEPTANCE_QUALIFER_e PWM_PCI_ACCEPTANCE_QUALIFER_t

Definition at line 879 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_INPUT_t

typedef enum PWM_PCI_INPUT_e PWM_PCI_INPUT_t

Definition at line 737 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_SOURCE_SELECT_t

typedef enum PWM_PCI_SOURCE_SELECT_e PWM_PCI_SOURCE_SELECT_t

Definition at line 815 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_SOURCE_t

typedef enum PWM_PCI_SOURCE_e PWM_PCI_SOURCE_t

Definition at line 469 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_TERM_t

typedef enum PWM_PCI_TERM_e PWM_PCI_TERM_t

Definition at line 997 of file drv_mcc_extension_pwm.h.

## ◆ PWM_PCI_TERMTIME_AFTER_EVENT_t

typedef enum PWM_PCI_TERMTIME_AFTER_EVENT_e PWM_PCI_TERMTIME_AFTER_EVENT_t

Definition at line 187 of file drv_mcc_extension_pwm.h.

## ◆ PWM_SOCS_t

typedef enum PWM_SOCS_e PWM_SOCS_t

Definition at line 294 of file drv_mcc_extension_pwm.h.

## ◆ PWM_TRIG_MODE_t

typedef enum PWM_TRIG_MODE_e PWM_TRIG_MODE_t

Definition at line 936 of file drv_mcc_extension_pwm.h.

## ◆ PWM_UPDMOD_t

typedef enum PWM_UPDMOD_e PWM_UPDMOD_t

Definition at line 402 of file drv_mcc_extension_pwm.h.

## ◆ PWM_UPDTRG_t

typedef enum PWM_UPDTRG_e PWM_UPDTRG_t

Definition at line 1149 of file drv_mcc_extension_pwm.h.

## ◆ RPnR_SOURCE_t

typedef enum RPnR_SOURCE_e RPnR_SOURCE_t

Definition at line 577 of file drv_mcc_extension_pwm.h.

## ◆ RPnR_VIRTUAL_PIN_t

typedef enum RPnR_VIRTUAL_PIN_e RPnR_VIRTUAL_PIN_t

Definition at line 593 of file drv_mcc_extension_pwm.h.

## ◆ RPx_INPUT_t

typedef enum RPx_INPUT_e RPx_INPUT_t

Definition at line 724 of file drv_mcc_extension_pwm.h.