MCUSW
PWM Configuration

Introduction

This files defines PWM MCAL configuration structures

Data Structures

struct  Pwm_ChannelConfigType_PC
 Pwm channel configuration. More...
 
struct  Pwm_ConfigType_PC
 Pwm configuration structure. More...
 
struct  Pwm_ChannelConfigType
 Pwm channel configuration. More...
 
struct  Pwm_ConfigType
 Pwm configuration structure. More...
 
struct  Pwm_RegisterReadbackType
 PWM register readback structure. More...
 

Functions

void Pwm_Ch11Isr (void)
 PWM Channel 11 ISR. More...
 

Variables

const uint32 Pwm_HwUnitBaseAddr [PWM_MAX_NUM_CHANNELS]
 
const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
 PWM Configuration structure declaration. More...
 
const struct Pwm_ConfigType_s PwmChannelConfigSet
 

Typedefs

typedef uint32 Pwm_PeriodType
 typedef of period value More...
 
typedef uint32 Pwm_ChannelType
 PWM Channel type. More...
 
typedef uint32 Pwm_FrequencyType
 typedef of frequency value (Frequency in Hz) More...
 
typedef void(* Pwm_NotifyFuncType) (void)
 Notification callback function pointer. More...
 

Enumerations

enum  Pwm_OutputStateType { PWM_LOW = 0U, PWM_HIGH }
 Possible output states of a PWM channel. More...
 
enum  Pwm_EdgeNotificationType { PWM_RISING_EDGE = 1U, PWM_FALLING_EDGE = 2U, PWM_BOTH_EDGES = 3U }
 Possible edge notification. More...
 
enum  Pwm_ChannelClassType { PWM_FIXED_PERIOD = 0U, PWM_FIXED_PERIOD_SHIFTED, PWM_VARIABLE_PERIOD }
 Period type for pwm channels. Fixed periods prohibit changes to the period length with Pwm_SetPeriod( ). PWM_FIXED_PERIOD_SHIFTED type is not supported due to hardware restrictions of the PWM unit. More...
 
enum  Pwm_epwmOutputCh_t { EPWM_OUTPUT_CH_A = 0U, EPWM_OUTPUT_CH_B = 1U, EPWM_OUTPUT_CH_BOTH_A_AND_B = 2U }
 EPWM outputs in a single epwm channel. More...
 

Macros

#define PWM_PRE_COMPILE_VARIANT   (STD_ON )
 PWM Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time) More...
 
#define PWM_DEINIT_API   (STD_ON)
 Enable/Disable PWM DeInit API. More...
 
#define PWM_SET_DUTY_CYCLE_API   (STD_ON)
 Enable/Disable PWM SetDutyCycle API. More...
 
#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)
 Enable/Disable PWM SetOutputToIdle API. More...
 
#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)
 Enable/Disable PWM SetPeriodAndDuty API. More...
 
#define PWM_VERSION_INFO_API   (STD_ON)
 Enable/Disable PWM VersionInfo API. More...
 
#define PWM_REGISTER_READBACK_API   (STD_ON)
 Enable/Disable PWM RegisterReadback API. More...
 
#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Dutycycle update always at the end of the period. More...
 
#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Period update always at the end of the period. More...
 
#define PWM_ISR_TYPE   (PWM_ISR_CAT1)
 ISR type. More...
 
#define PWM_NUM_CHANNELS   (1U)
 Number of configured channels. More...
 
#define PWM_DEV_ERROR_DETECT   (STD_ON)
 Enable/Disable PWM dev detect error. More...
 
#define PWM_NOTIFICATION_SUPPORTED   (STD_ON)
 Enable/Disable PWM notifications. More...
 
#define PWM_OS_COUNTER_ID   ((CounterType)OsCounter_0)
 Counter ID for counter used to count wait ticks. More...
 
#define PWM_INDEX   (1U)
 Instance ID for driver module to toggle between GPT and EPWM usage. More...
 
#define PWM_INSTANCE_ID   (PWM_INDEX)
 
#define PWM_USE_GPT
 
#define PWM_TIMEOUT_DURATION   (32000U)
 timeout. Each tick is 31.25us (for 32K Counter). Wait for 5s which comes to below value More...
 
#define PwmConf_PwmChannel_PwmChannel_0   (10U)
 Channel ID Symbolic Names Configured channel ID(s) More...
 
#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet
 Pre Compile config macro name. More...
 
#define PWM_MAX_NUM_CHANNELS   (30U)
 
#define PWM_CHANNEL11   (10U)
 GP timer 11 instance, in MCU DOMAIN. More...
 

Macro Definition Documentation

◆ PWM_PRE_COMPILE_VARIANT

#define PWM_PRE_COMPILE_VARIANT   (STD_ON )

PWM Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)

◆ PWM_DEINIT_API

#define PWM_DEINIT_API   (STD_ON)

Enable/Disable PWM DeInit API.

◆ PWM_SET_DUTY_CYCLE_API

#define PWM_SET_DUTY_CYCLE_API   (STD_ON)

Enable/Disable PWM SetDutyCycle API.

◆ PWM_SET_OUTPUT_TO_IDLE_API

#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)

Enable/Disable PWM SetOutputToIdle API.

◆ PWM_SET_PERIOD_AND_DUTY_API

#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)

Enable/Disable PWM SetPeriodAndDuty API.

◆ PWM_VERSION_INFO_API

#define PWM_VERSION_INFO_API   (STD_ON)

Enable/Disable PWM VersionInfo API.

◆ PWM_REGISTER_READBACK_API

#define PWM_REGISTER_READBACK_API   (STD_ON)

Enable/Disable PWM RegisterReadback API.

◆ PWM_DUTYCYCLE_UPDATED_ENDPERIOD

#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)

Enable/Disable PWM Dutycycle update always at the end of the period.

◆ PWM_PERIOD_UPDATED_ENDPERIOD

#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)

Enable/Disable PWM Period update always at the end of the period.

◆ PWM_ISR_TYPE

#define PWM_ISR_TYPE   (PWM_ISR_CAT1)

ISR type.

◆ PWM_NUM_CHANNELS

#define PWM_NUM_CHANNELS   (1U)

Number of configured channels.

◆ PWM_DEV_ERROR_DETECT

#define PWM_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable PWM dev detect error.

◆ PWM_NOTIFICATION_SUPPORTED

#define PWM_NOTIFICATION_SUPPORTED   (STD_ON)

Enable/Disable PWM notifications.

◆ PWM_OS_COUNTER_ID

#define PWM_OS_COUNTER_ID   ((CounterType)OsCounter_0)

Counter ID for counter used to count wait ticks.

◆ PWM_INDEX

#define PWM_INDEX   (1U)

Instance ID for driver module to toggle between GPT and EPWM usage.

◆ PWM_INSTANCE_ID

#define PWM_INSTANCE_ID   (PWM_INDEX)

◆ PWM_USE_GPT

#define PWM_USE_GPT

◆ PWM_TIMEOUT_DURATION

#define PWM_TIMEOUT_DURATION   (32000U)

timeout. Each tick is 31.25us (for 32K Counter). Wait for 5s which comes to below value

◆ PwmConf_PwmChannel_PwmChannel_0

#define PwmConf_PwmChannel_PwmChannel_0   (10U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ PWM_INIT_CONFIG_PC

#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet

Pre Compile config macro name.

◆ PWM_MAX_NUM_CHANNELS

#define PWM_MAX_NUM_CHANNELS   (30U)

◆ PWM_CHANNEL11

#define PWM_CHANNEL11   (10U)

GP timer 11 instance, in MCU DOMAIN.

Typedef Documentation

◆ Pwm_PeriodType

typedef uint32 Pwm_PeriodType

typedef of period value

◆ Pwm_ChannelType

typedef uint32 Pwm_ChannelType

PWM Channel type.

◆ Pwm_FrequencyType

typedef uint32 Pwm_FrequencyType

typedef of frequency value (Frequency in Hz)

◆ Pwm_NotifyFuncType

typedef void(* Pwm_NotifyFuncType) (void)

Notification callback function pointer.

Enumeration Type Documentation

◆ Pwm_OutputStateType

Possible output states of a PWM channel.

Enumerator
PWM_LOW 

LOW state

PWM_HIGH 

HIGH state

◆ Pwm_EdgeNotificationType

Possible edge notification.

Enumerator
PWM_RISING_EDGE 

Rising edges issue notification

PWM_FALLING_EDGE 

Falling edges issue notification

PWM_BOTH_EDGES 

Both edges issue notification

◆ Pwm_ChannelClassType

Period type for pwm channels. Fixed periods prohibit changes to the period length with Pwm_SetPeriod( ). PWM_FIXED_PERIOD_SHIFTED type is not supported due to hardware restrictions of the PWM unit.

Enumerator
PWM_FIXED_PERIOD 

Period is immutable

PWM_FIXED_PERIOD_SHIFTED 

Period is immutable with phase shift

PWM_VARIABLE_PERIOD 

Period is variable

◆ Pwm_epwmOutputCh_t

EPWM outputs in a single epwm channel.

Enumerator
EPWM_OUTPUT_CH_A 

Output channel A.

EPWM_OUTPUT_CH_B 

Output channel B.

EPWM_OUTPUT_CH_BOTH_A_AND_B 

Both Output channel A and B

Function Documentation

◆ Pwm_Ch11Isr()

void Pwm_Ch11Isr ( void  )

PWM Channel 11 ISR.

Variable Documentation

◆ Pwm_HwUnitBaseAddr

const uint32 Pwm_HwUnitBaseAddr[PWM_MAX_NUM_CHANNELS]

◆ PwmChannelConfigSet_PC

const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC

PWM Configuration structure declaration.

◆ PwmChannelConfigSet

const struct Pwm_ConfigType_s PwmChannelConfigSet