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...
 

Variables

const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
 PWM Configuration structure declaration. More...
 
const struct Pwm_ConfigType_s PwmChannelConfigSet_ChannelConfig
 

Typedefs

typedef uint32 Pwm_PeriodType
 typedef of period value More...
 
typedef uint32 Pwm_ChannelType
 PWM Channel type. 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...
 

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_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_TIMEOUT_DURATION   (32000U)
 timeout. Each tick is 31.25us (for 32K Counter). Wait for 5s which comes to below value More...
 
#define PwmConf_PwmChannelConfiguration_PwmChannel_0   (10U)
 Channel ID Symbolic Names Configured channel ID(s) More...
 
#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet_ChannelConfig
 Pre Compile config macro name. 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_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_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_PwmChannelConfiguration_PwmChannel_0

#define PwmConf_PwmChannelConfiguration_PwmChannel_0   (10U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ PWM_INIT_CONFIG_PC

#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet_ChannelConfig

Pre Compile config macro name.

Typedef Documentation

◆ Pwm_PeriodType

typedef uint32 Pwm_PeriodType

typedef of period value

◆ Pwm_ChannelType

typedef uint32 Pwm_ChannelType

PWM Channel type.

◆ 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

Variable Documentation

◆ PwmChannelConfigSet_PC

const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC

PWM Configuration structure declaration.

◆ PwmChannelConfigSet_ChannelConfig

const struct Pwm_ConfigType_s PwmChannelConfigSet_ChannelConfig