Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

Pulse Width Modulation Driver using dsPIC MCUs. More...

+ Collaboration diagram for PWM Driver:

Files

file  pwm_types.h
 This is the generated driver types header file for the PWM driver.
 
file  sccp3.h
 This is the generated driver header file for the SCCP3 driver.
 
file  sccp3.c
 This is the generated driver source file for SCCP3 driver.
 

Data Structures

struct  PWM_INTERFACE
 Structure containing the function pointers of PWM generator driver. More...
 

Macros

#define FAN_PWM_Initialize   SCCP3_PWM_Initialize
 This macro defines the Custom Name for SCCP3_PWM_Initialize API.
 
#define FAN_PWM_Deinitialize   SCCP3_PWM_Deinitialize
 This macro defines the Custom Name for SCCP3_PWM_Deinitialize API.
 
#define FAN_PWM_Enable   SCCP3_PWM_Enable
 This macro defines the Custom Name for SCCP3_PWM_Enable API.
 
#define FAN_PWM_Disable   SCCP3_PWM_Disable
 This macro defines the Custom Name for SCCP3_PWM_Disable API.
 
#define FAN_PWM_PeriodSet   SCCP3_PWM_PeriodSet
 This macro defines the Custom Name for SCCP3_PWM_PeriodSet API.
 
#define FAN_PWM_DutyCycleSet   SCCP3_PWM_DutyCycleSet
 This macro defines the Custom Name for SCCP3_PWM_DutyCycleSet API.
 
#define FAN_PWM_DeadTimeSet   SCCP3_PWM_DeadTimeSet
 This macro defines the Custom Name for SCCP3_PWM_DeadTimeSet API.
 
#define FAN_PWM_OutputModeSet   SCCP3_PWM_OutputModeSet
 This macro defines the Custom Name for SCCP3_PWM_OutputModeSet API.
 
#define FAN_PWM_SoftwareTriggerSet   SCCP3_PWM_SoftwareTriggerSet
 This macro defines the Custom Name for SCCP3_PWM_SoftwareTriggerSet API.
 
#define FAN_PWM_Tasks   SCCP3_PWM_Tasks
 This macro defines the Custom Name for SCCP3_PWM_Tasks API.
 
#define FAN_PWM_PWM_CallbackRegister   SCCP3_PWM_CallbackRegister
 This macro defines the Custom Name for SCCP3_PWM_CallbackRegister API.
 
#define PWM_HS_Initialize   PWM_Initialize
 This macro defines the Custom Name for PWM_Initialize API.
 
#define PWM_HS_Deinitialize   PWM_Deinitialize
 This macro defines the Custom Name for PWM_Deinitialize API.
 
#define PWM_HS_Disable   PWM_Disable
 This macro defines the Custom Name for PWM_Disable API.
 
#define PWM_HS_Enable   PWM_Enable
 This macro defines the Custom Name for PWM_Enable API.
 
#define PWM_HS_MasterPeriodSet   PWM_MasterPeriodSet
 This macro defines the Custom Name for PWM_MasterPeriodSet API.
 
#define PWM_HS_MasterDutyCycleSet   PWM_MasterDutyCycleSet
 This macro defines the Custom Name for PWM_MasterDutyCycleSet API.
 
#define PWM_HS_MasterPhaseSet   PWM_MasterPhaseSet
 This macro defines the Custom Name for PWM_MasterPhaseSet API.
 
#define PWM_HS_PeriodSet   PWM_PeriodSet
 This macro defines the Custom Name for PWM_PeriodSet API.
 
#define PWM_HS_ModeSet   PWM_ModeSet
 This macro defines the Custom Name for PWM_ModeSet API.
 
#define PWM_HS_DutyCycleSet   PWM_DutyCycleSet
 This macro defines the Custom Name for PWM_DutyCycleSet API.
 
#define PWM_HS_PhaseSelect   PWM_PhaseSelect
 This macro defines the Custom Name for PWM_PhaseSelect API.
 
#define PWM_HS_PhaseSet   PWM_PhaseSet
 This macro defines the Custom Name for PWM_PhaseSet API.
 
#define PWM_HS_OverrideDataSet   PWM_OverrideDataSet
 This macro defines the Custom Name for PWM_OverrideDataSet API.
 
#define PWM_HS_OverrideDataHighSet   PWM_OverrideDataHighSet
 This macro defines the Custom Name for PWM_OverrideDataHighSet API.
 
#define PWM_HS_OverrideDataLowSet   PWM_OverrideDataLowSet
 This macro defines the Custom Name for PWM_OverrideDataLowSet API.
 
#define PWM_HS_OverrideDataGet   PWM_OverrideDataGet
 This macro defines the Custom Name for PWM_OverrideDataGet API.
 
#define PWM_HS_OverrideHighEnable   PWM_OverrideHighEnable
 This macro defines the Custom Name for PWM_OverrideHighEnable API.
 
#define PWM_HS_OverrideLowEnable   PWM_OverrideLowEnable
 This macro defines the Custom Name for PWM_OverrideLowEnable API.
 
#define PWM_HS_OverrideHighDisable   PWM_OverrideHighDisable
 This macro defines the Custom Name for PWM_OverrideHighDisable API.
 
#define PWM_HS_OverrideLowDisable   PWM_OverrideLowDisable
 This macro defines the Custom Name for PWM_OverrideLowDisable API.
 
#define PWM_HS_DeadTimeLowSet   PWM_DeadTimeLowSet
 This macro defines the Custom Name for PWM_DeadTimeLowSet API.
 
#define PWM_HS_DeadTimeHighSet   PWM_DeadTimeHighSet
 This macro defines the Custom Name for PWM_DeadTimeHighSet API.
 
#define PWM_HS_DeadTimeSet   PWM_DeadTimeSet
 This macro defines the Custom Name for PWM_DeadTimeSet API.
 
#define PWM_HS_TriggerCompareValueSet   PWM_TriggerCompareValueSet
 This macro defines the Custom Name for PWM_TriggerCompareValueSet API.
 
#define PWM_HS_GeneratorInterruptEnable   PWM_GeneratorInterruptEnable
 This macro defines the Custom Name for PWM_GeneratorInterruptEnable API.
 
#define PWM_HS_GeneratorInterruptDisable   PWM_GeneratorInterruptDisable
 This macro defines the Custom Name for PWM_GeneratorInterruptDisable API.
 
#define PWM_HS_GeneratorEventStatusGet   PWM_GeneratorEventStatusGet
 This macro defines the Custom Name for PWM_GeneratorEventStatusGet API.
 
#define PWM_HS_GeneratorEventStatusClear   PWM_GeneratorEventStatusClear
 This macro defines the Custom Name for PWM_GeneratorEventStatusClear API.
 
#define PWM_HS_GeneratorDisable   PWM_GeneratorDisable
 This macro defines the Custom Name for PWM_GeneratorDisable API.
 
#define PWM_HS_GeneratorEnable   PWM_GeneratorEnable
 This macro defines the Custom Name for PWM_GeneratorEnable API.
 
#define PWM_HS_TriggerACompareValueSet   PWM_TriggerACompareValueSet
 This macro defines the Custom Name for PWM_TriggerACompareValueSet API.
 
#define PWM_HS_TriggerBCompareValueSet   PWM_TriggerBCompareValueSet
 This macro defines the Custom Name for PWM_TriggerBCompareValueSet API.
 
#define PWM_HS_TriggerCCompareValueSet   PWM_TriggerCCompareValueSet
 This macro defines the Custom Name for PWM_TriggerCCompareValueSet API.
 
#define PWM_HS_SoftwareUpdateRequest   PWM_SoftwareUpdateRequest
 This macro defines the Custom Name for PWM_SoftwareUpdateRequest API.
 
#define PWM_HS_SoftwareUpdatePending   PWM_SoftwareUpdatePending
 This macro defines the Custom Name for PWM_SoftwareUpdatePending API.
 
#define PWM_HS_FaultModeLatchClear   PWM_FaultModeLatchClear
 This macro defines the Custom Name for PWM_FaultModeLatchClear API.
 
#define PWM_HS_Trigger1Enable   PWM_Trigger1Enable
 This macro defines the Custom Name for PWM_Trigger1Enable API.
 
#define PWM_HS_Trigger1Disable   PWM_Trigger1Disable
 This macro defines the Custom Name for PWM_Trigger1Disable API.
 
#define PWM_HS_Trigger2Enable   PWM_Trigger2Enable
 This macro defines the Custom Name for PWM_Trigger2Enable API.
 
#define PWM_HS_Trigger2Disable   PWM_Trigger2Disable
 This macro defines the Custom Name for PWM_Trigger2Disable API.
 
#define PWM_HS_GeneratorEOCEventCallbackRegister   PWM_GeneratorEOCEventCallbackRegister
 This macro defines the Custom Name for PWM_GeneratorEOCEventCallbackRegister API.
 
#define PWM_HS_GeneratorTasks   PWM_GeneratorTasks
 This macro defines the Custom Name for PWM_GeneratorTasks API.
 

Functions

void SCCP3_PWM_Initialize (void)
 Initializes the SCCP3 Pulse driver. This function must be called before any other SCCP3 function is called.
 
void SCCP3_PWM_Deinitialize (void)
 Deinitializes the SCCP3 to POR values.
 
void SCCP3_PWM_Enable (void)
 Enables the SCCP3 module.
 
void SCCP3_PWM_Disable (void)
 Disables the SCCP3 module.
 
void SCCP3_PWM_PeriodSet (size_t periodCount)
 Sets the cycle width.
 
void SCCP3_PWM_DutyCycleSet (size_t dutyCycleCount)
 Sets the ON pulse width.
 
void SCCP3_PWM_SoftwareTriggerSet (void)
 This function sets the manual trigger.
 
void SCCP3_PWM_CallbackRegister (void(*handler)(void))
 This function can be used to override default callback and to define custom callback for SCCP3 PWM event.
 
void SCCP3_PWM_Callback (void)
 This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SCCP3_PWM_CallbackRegister.
 
void SCCP3_PWM_Tasks (void)
 This function is used to implement the tasks for polled implementations.
 

Variables

const struct PWM_INTERFACE FAN_PWM
 Structure object of type PWM_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. PWM1 can be changed by the user in the MCCP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
 

Detailed Description

Macro Definition Documentation

◆ FAN_PWM_DeadTimeSet

#define FAN_PWM_DeadTimeSet   SCCP3_PWM_DeadTimeSet

Definition at line 95 of file sccp3.h.

◆ FAN_PWM_Deinitialize

#define FAN_PWM_Deinitialize   SCCP3_PWM_Deinitialize

Definition at line 70 of file sccp3.h.

◆ FAN_PWM_Disable

#define FAN_PWM_Disable   SCCP3_PWM_Disable

Definition at line 80 of file sccp3.h.

◆ FAN_PWM_DutyCycleSet

#define FAN_PWM_DutyCycleSet   SCCP3_PWM_DutyCycleSet

Definition at line 90 of file sccp3.h.

◆ FAN_PWM_Enable

#define FAN_PWM_Enable   SCCP3_PWM_Enable

Definition at line 75 of file sccp3.h.

◆ FAN_PWM_Initialize

#define FAN_PWM_Initialize   SCCP3_PWM_Initialize

Definition at line 65 of file sccp3.h.

◆ FAN_PWM_OutputModeSet

#define FAN_PWM_OutputModeSet   SCCP3_PWM_OutputModeSet

Definition at line 100 of file sccp3.h.

◆ FAN_PWM_PeriodSet

#define FAN_PWM_PeriodSet   SCCP3_PWM_PeriodSet

Definition at line 85 of file sccp3.h.

◆ FAN_PWM_PWM_CallbackRegister

#define FAN_PWM_PWM_CallbackRegister   SCCP3_PWM_CallbackRegister

Definition at line 115 of file sccp3.h.

◆ FAN_PWM_SoftwareTriggerSet

#define FAN_PWM_SoftwareTriggerSet   SCCP3_PWM_SoftwareTriggerSet

Definition at line 105 of file sccp3.h.

◆ FAN_PWM_Tasks

#define FAN_PWM_Tasks   SCCP3_PWM_Tasks

Definition at line 110 of file sccp3.h.

◆ PWM_HS_DeadTimeHighSet

#define PWM_HS_DeadTimeHighSet   PWM_DeadTimeHighSet

Definition at line 174 of file pwm.h.

◆ PWM_HS_DeadTimeLowSet

#define PWM_HS_DeadTimeLowSet   PWM_DeadTimeLowSet

Definition at line 169 of file pwm.h.

◆ PWM_HS_DeadTimeSet

#define PWM_HS_DeadTimeSet   PWM_DeadTimeSet

Definition at line 179 of file pwm.h.

◆ PWM_HS_Deinitialize

#define PWM_HS_Deinitialize   PWM_Deinitialize

Definition at line 74 of file pwm.h.

◆ PWM_HS_Disable

#define PWM_HS_Disable   PWM_Disable

Definition at line 79 of file pwm.h.

◆ PWM_HS_DutyCycleSet

#define PWM_HS_DutyCycleSet   PWM_DutyCycleSet

Definition at line 114 of file pwm.h.

◆ PWM_HS_Enable

#define PWM_HS_Enable   PWM_Enable

Definition at line 84 of file pwm.h.

◆ PWM_HS_FaultModeLatchClear

#define PWM_HS_FaultModeLatchClear   PWM_FaultModeLatchClear

Definition at line 244 of file pwm.h.

◆ PWM_HS_GeneratorDisable

#define PWM_HS_GeneratorDisable   PWM_GeneratorDisable

Definition at line 209 of file pwm.h.

◆ PWM_HS_GeneratorEnable

#define PWM_HS_GeneratorEnable   PWM_GeneratorEnable

Definition at line 214 of file pwm.h.

◆ PWM_HS_GeneratorEOCEventCallbackRegister

#define PWM_HS_GeneratorEOCEventCallbackRegister   PWM_GeneratorEOCEventCallbackRegister

Definition at line 269 of file pwm.h.

◆ PWM_HS_GeneratorEventStatusClear

#define PWM_HS_GeneratorEventStatusClear   PWM_GeneratorEventStatusClear

Definition at line 204 of file pwm.h.

◆ PWM_HS_GeneratorEventStatusGet

#define PWM_HS_GeneratorEventStatusGet   PWM_GeneratorEventStatusGet

Definition at line 199 of file pwm.h.

◆ PWM_HS_GeneratorInterruptDisable

#define PWM_HS_GeneratorInterruptDisable   PWM_GeneratorInterruptDisable

Definition at line 194 of file pwm.h.

◆ PWM_HS_GeneratorInterruptEnable

#define PWM_HS_GeneratorInterruptEnable   PWM_GeneratorInterruptEnable

Definition at line 189 of file pwm.h.

◆ PWM_HS_GeneratorTasks

#define PWM_HS_GeneratorTasks   PWM_GeneratorTasks

Definition at line 275 of file pwm.h.

◆ PWM_HS_Initialize

#define PWM_HS_Initialize   PWM_Initialize

Definition at line 69 of file pwm.h.

◆ PWM_HS_MasterDutyCycleSet

#define PWM_HS_MasterDutyCycleSet   PWM_MasterDutyCycleSet

Definition at line 94 of file pwm.h.

◆ PWM_HS_MasterPeriodSet

#define PWM_HS_MasterPeriodSet   PWM_MasterPeriodSet

Definition at line 89 of file pwm.h.

◆ PWM_HS_MasterPhaseSet

#define PWM_HS_MasterPhaseSet   PWM_MasterPhaseSet

Definition at line 99 of file pwm.h.

◆ PWM_HS_ModeSet

#define PWM_HS_ModeSet   PWM_ModeSet

Definition at line 109 of file pwm.h.

◆ PWM_HS_OverrideDataGet

#define PWM_HS_OverrideDataGet   PWM_OverrideDataGet

Definition at line 144 of file pwm.h.

◆ PWM_HS_OverrideDataHighSet

#define PWM_HS_OverrideDataHighSet   PWM_OverrideDataHighSet

Definition at line 134 of file pwm.h.

◆ PWM_HS_OverrideDataLowSet

#define PWM_HS_OverrideDataLowSet   PWM_OverrideDataLowSet

Definition at line 139 of file pwm.h.

◆ PWM_HS_OverrideDataSet

#define PWM_HS_OverrideDataSet   PWM_OverrideDataSet

Definition at line 129 of file pwm.h.

◆ PWM_HS_OverrideHighDisable

#define PWM_HS_OverrideHighDisable   PWM_OverrideHighDisable

Definition at line 159 of file pwm.h.

◆ PWM_HS_OverrideHighEnable

#define PWM_HS_OverrideHighEnable   PWM_OverrideHighEnable

Definition at line 149 of file pwm.h.

◆ PWM_HS_OverrideLowDisable

#define PWM_HS_OverrideLowDisable   PWM_OverrideLowDisable

Definition at line 164 of file pwm.h.

◆ PWM_HS_OverrideLowEnable

#define PWM_HS_OverrideLowEnable   PWM_OverrideLowEnable

Definition at line 154 of file pwm.h.

◆ PWM_HS_PeriodSet

#define PWM_HS_PeriodSet   PWM_PeriodSet

Definition at line 104 of file pwm.h.

◆ PWM_HS_PhaseSelect

#define PWM_HS_PhaseSelect   PWM_PhaseSelect

Definition at line 119 of file pwm.h.

◆ PWM_HS_PhaseSet

#define PWM_HS_PhaseSet   PWM_PhaseSet

Definition at line 124 of file pwm.h.

◆ PWM_HS_SoftwareUpdatePending

#define PWM_HS_SoftwareUpdatePending   PWM_SoftwareUpdatePending

Definition at line 239 of file pwm.h.

◆ PWM_HS_SoftwareUpdateRequest

#define PWM_HS_SoftwareUpdateRequest   PWM_SoftwareUpdateRequest

Definition at line 234 of file pwm.h.

◆ PWM_HS_Trigger1Disable

#define PWM_HS_Trigger1Disable   PWM_Trigger1Disable

Definition at line 254 of file pwm.h.

◆ PWM_HS_Trigger1Enable

#define PWM_HS_Trigger1Enable   PWM_Trigger1Enable

Definition at line 249 of file pwm.h.

◆ PWM_HS_Trigger2Disable

#define PWM_HS_Trigger2Disable   PWM_Trigger2Disable

Definition at line 264 of file pwm.h.

◆ PWM_HS_Trigger2Enable

#define PWM_HS_Trigger2Enable   PWM_Trigger2Enable

Definition at line 259 of file pwm.h.

◆ PWM_HS_TriggerACompareValueSet

#define PWM_HS_TriggerACompareValueSet   PWM_TriggerACompareValueSet

Definition at line 219 of file pwm.h.

◆ PWM_HS_TriggerBCompareValueSet

#define PWM_HS_TriggerBCompareValueSet   PWM_TriggerBCompareValueSet

Definition at line 224 of file pwm.h.

◆ PWM_HS_TriggerCCompareValueSet

#define PWM_HS_TriggerCCompareValueSet   PWM_TriggerCCompareValueSet

Definition at line 229 of file pwm.h.

◆ PWM_HS_TriggerCompareValueSet

#define PWM_HS_TriggerCompareValueSet   PWM_TriggerCompareValueSet

Definition at line 184 of file pwm.h.

Function Documentation

◆ SCCP3_PWM_Callback()

void SCCP3_PWM_Callback ( void  )
Parameters
none
Returns
none
+ Here is the caller graph for this function:

◆ SCCP3_PWM_CallbackRegister()

void SCCP3_PWM_CallbackRegister ( void(*)(void)  handler)
Parameters
[in]handler- Address of the callback function
Returns
none

Definition at line 147 of file sccp3.c.

+ Here is the caller graph for this function:

◆ SCCP3_PWM_Deinitialize()

void SCCP3_PWM_Deinitialize ( void  )
Parameters
none
Returns
none

Definition at line 101 of file sccp3.c.

◆ SCCP3_PWM_Disable()

void SCCP3_PWM_Disable ( void  )
Parameters
none
Returns
none

Definition at line 127 of file sccp3.c.

◆ SCCP3_PWM_DutyCycleSet()

void SCCP3_PWM_DutyCycleSet ( size_t  dutyCycleCount)
Parameters
[in]dutyCycleCount- number of cycles of ON time
Returns
none

Definition at line 137 of file sccp3.c.

◆ SCCP3_PWM_Enable()

void SCCP3_PWM_Enable ( void  )
Parameters
none
Returns
none

Definition at line 121 of file sccp3.c.

◆ SCCP3_PWM_Initialize()

void SCCP3_PWM_Initialize ( void  )
Parameters
none
Returns
none

Definition at line 66 of file sccp3.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SCCP3_PWM_PeriodSet()

void SCCP3_PWM_PeriodSet ( size_t  periodCount)
Parameters
[in]periodCount- number of clock counts for PWM Period
Returns
none

Definition at line 132 of file sccp3.c.

◆ SCCP3_PWM_SoftwareTriggerSet()

void SCCP3_PWM_SoftwareTriggerSet ( void  )
Parameters
none
Returns
none

Definition at line 142 of file sccp3.c.

◆ SCCP3_PWM_Tasks()

void SCCP3_PWM_Tasks ( void  )
Parameters
none
Returns
none

Definition at line 161 of file sccp3.c.

Variable Documentation

◆ FAN_PWM

const struct PWM_INTERFACE FAN_PWM
extern

Definition at line 50 of file sccp3.c.