MCUSW
Loading...
Searching...
No Matches
PWM Configuration

Introduction

This files defines PWM MCAL configuration structures

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

Pwm_ChannelType Pwm_ChannelConfigType_PC::channelId
 
Pwm_ChannelConfigType_PC Pwm_ConfigType_PC::chCfg [PWM_NUM_CHANNELS]
 
uint32 Pwm_ChannelConfigType::instanceClkHz
 
uint16 Pwm_ChannelConfigType::dutyCycle
 
uint32 Pwm_ChannelConfigType::hwPeriod
 
Pwm_OutputStateType Pwm_ChannelConfigType::polarity
 
Pwm_OutputStateType Pwm_ChannelConfigType::idleState
 
Pwm_ChannelClassType Pwm_ChannelConfigType::channelClass
 
uint32 Pwm_ChannelConfigType::prescale
 
Pwm_NotifyFuncType Pwm_ChannelConfigType::notificationHandler
 
Pwm_ChannelConfigType Pwm_ConfigType::chCfg [PWM_NUM_CHANNELS]
 

Macros

#define PWM_PRE_COMPILE_VARIANT   (STD_ON )
 PWM Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)
 
#define PWM_PRE_COMPILE_VARIANT   (STD_ON )
 PWM Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)
 
#define PWM_VARIANT_POST_BUILD   (STD_OFF)
 

PWM Driver State Values

The PWM Driver State Values

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

 
typedef uint32 Pwm_FrequencyType
 typedef of frequency value (Frequency in Hz)
 
typedef void(* Pwm_NotifyFuncType) (void)
 Notification callback function pointer

 
void Pwm_Init (const Pwm_ConfigType *CfgPtr)
 Service for PWM initialization.
 
void Pwm_DeInit (void)
 Service for PWM de-initialization.
 
void Pwm_SetDutyCycle (Pwm_ChannelType ChannelNumber, uint16 DutyCycle)
 Service for setting Duty Cycle.
 
void Pwm_SetPeriodAndDuty (Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle)
 Service for setting Period and Duty Cycle.
 
void Pwm_SetOutputToIdle (Pwm_ChannelType ChannelNumber)
 Service to set the output of a channel immediately to idle.
 
Pwm_OutputStateType Pwm_GetOutputState (Pwm_ChannelType ChannelNumber)
 
void Pwm_DisableNotification (Pwm_ChannelType ChannelNumber)
 Service to disable the Edge Notification.
 
void Pwm_EnableNotification (Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification)
 Service to enable the Edge Notification.
 
void Pwm_GetVersionInfo (Std_VersionInfoType *versioninfo)
 This service returns the version information of this module.
 
Std_ReturnType Pwm_RegisterReadback (Pwm_ChannelType ChannelNumber, Pwm_RegisterReadbackType *RegRbPtr)
 This function reads the important registers of the hardware unit and returns the value in the structure.
 

PWM Driver ISR category level

Defines for PWM Driver ISR ISR category level

const uint32 Pwm_HwUnitBaseAddr [PWM_MAX_NUM_CHANNELS]
 
const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
 PWM Configuration structure declaration.
 
const struct Pwm_ConfigType_s PwmChannelConfigSet
 
void Pwm_Ch11Isr (void)
 PWM Channel 11 ISR.
 
#define PWM_OS_COUNTER_ID   ((CounterType)OsCounter_0)
 Counter ID for counter used to count wait ticks.
 
#define PWM_USE_GPT
 
#define PWM_CHANNEL11   (10U)
 GP timer 11 instance, in MCU DOMAIN.
 

PWM Driver ISR category level

Defines for PWM Driver ISR ISR category level

const uint32 Pwm_HwUnitBaseAddr [PWM_MAX_NUM_CHANNELS]
 
const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
 PWM Configuration structure declaration.
 
const struct Pwm_ConfigType_s PwmChannelConfigSet
 
void Pwm_Ch0Notify (void)
 PWM ISR.
 
#define PWM_ISR_VOID   (0x00U)
 void ISR type
 
#define PWM_ISR_CAT1   (0x01U)
 Category 1 ISR type.
 
#define PWM_ISR_CAT2   (0x02U)
 Category 2 ISR type.
 
#define PWM_DEINIT_API   (STD_ON)
 Enable/Disable PWM DeInit API.
 
#define PWM_SET_DUTY_CYCLE_API   (STD_ON)
 Enable/Disable PWM SetDutyCycle API.
 
#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)
 Enable/Disable PWM SetOutputToIdle API.
 
#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)
 Enable/Disable PWM SetPeriodAndDuty API.
 
#define PWM_VERSION_INFO_API   (STD_ON)
 Enable/Disable PWM VersionInfo API.
 
#define PWM_REGISTER_READBACK_API   (STD_ON)
 Enable/Disable PWM RegisterReadback API.
 
#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Dutycycle update always at the end of the period.
 
#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Period update always at the end of the period.
 
#define PWM_ISR_TYPE   (PWM_ISR_CAT1)
 ISR type.
 
#define PWM_NUM_CHANNELS   (1U)
 Number of configured channels.
 
#define PWM_DEV_ERROR_DETECT   (STD_ON)
 Enable/Disable PWM dev detect error.
 
#define PWM_NOTIFICATION_SUPPORTED   (STD_ON)
 Enable/Disable PWM notifications.
 
#define PWM_INDEX   (1U)
 Instance ID for driver module to toggle between GPT and EPWM usage.
 
#define PWM_INSTANCE_ID   (PWM_INDEX)
 
#define PWM_TIMEOUT_DURATION   (32000U)
 timeout. Each tick is 31.25us (for 32K Counter). Wait for 5s which comes to below value
 
#define PwmConf_PwmChannel_PwmChannel_0   (10U)
 Channel ID Symbolic Names Configured channel ID(s)
 
#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet
 Pre Compile config macro name.
 
#define PWM_MAX_NUM_CHANNELS   (30U)
 
#define PWM_ISR_VOID   (0x00U)
 void ISR type
 
#define PWM_ISR_CAT1   (0x01U)
 Category 1 ISR type.
 
#define PWM_ISR_CAT2   (0x02U)
 Category 2 ISR type.
 
#define PWM_DEINIT_API   (STD_ON)
 Enable/Disable PWM DeInit API.
 
#define PWM_SET_DUTY_CYCLE_API   (STD_ON)
 Enable/Disable PWM SetDutyCycle API.
 
#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)
 Enable/Disable PWM SetOutputToIdle API.
 
#define PWM_GET_OUTPUT_STATE_API   (STD_OFF)
 Enable/Disable PWM GetOutputState API.
 
#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)
 Enable/Disable PWM SetPeriodAndDuty API.
 
#define PWM_VERSION_INFO_API   (STD_ON)
 Enable/Disable PWM VersionInfo API.
 
#define PWM_REGISTER_READBACK_API   (STD_ON)
 Enable/Disable PWM RegisterReadback API.
 
#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Dutycycle update always at the end of the period.
 
#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)
 Enable/Disable PWM Period update always at the end of the period.
 
#define PWM_ISR_TYPE   (PWM_ISR_CAT2)
 ISR type.
 
#define PWM_NUM_CHANNELS   (1U)
 Number of configured channels.
 
#define PWM_DEV_ERROR_DETECT   (STD_ON)
 Enable/Disable PWM dev detect error.
 
#define PWM_NOTIFICATION_SUPPORTED   (STD_ON)
 Enable/Disable PWM notifications.
 
#define PWM_INDEX   (0U)
 Instance ID for driver module for EPWM usage.
 
#define PWM_INSTANCE_ID   (PWM_INDEX)
 
#define PWM_USE_EPWM
 
#define PWM_TIMEOUT_DURATION   (32000U)
 timeout. Each tick is 31.25us (for 32K Counter). Wait for 5s which comes to below value
 
#define PwmConf_PwmChannel_PwmChannel_0   (0U)
 Channel ID Symbolic Names Configured channel ID(s)
 
#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet
 Pre Compile config macro name.
 
#define EHRPWM_BASE_OFFSET   0x0U
 
#define PWM_MAX_NUM_CHANNELS   (3U)
 
#define PWM_CHANNEL0   (0U)
 EPWM Channel 0, in MAIN DOMAIN.
 

Macro Definition Documentation

◆ PWM_PRE_COMPILE_VARIANT [1/2]

#define PWM_PRE_COMPILE_VARIANT   (STD_ON )

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

◆ PWM_ISR_VOID [1/2]

#define PWM_ISR_VOID   (0x00U)

void ISR type

◆ PWM_ISR_CAT1 [1/2]

#define PWM_ISR_CAT1   (0x01U)

Category 1 ISR type.

◆ PWM_ISR_CAT2 [1/2]

#define PWM_ISR_CAT2   (0x02U)

Category 2 ISR type.

◆ PWM_DEINIT_API [1/2]

#define PWM_DEINIT_API   (STD_ON)

Enable/Disable PWM DeInit API.

◆ PWM_SET_DUTY_CYCLE_API [1/2]

#define PWM_SET_DUTY_CYCLE_API   (STD_ON)

Enable/Disable PWM SetDutyCycle API.

◆ PWM_SET_OUTPUT_TO_IDLE_API [1/2]

#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)

Enable/Disable PWM SetOutputToIdle API.

◆ PWM_SET_PERIOD_AND_DUTY_API [1/2]

#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)

Enable/Disable PWM SetPeriodAndDuty API.

◆ PWM_VERSION_INFO_API [1/2]

#define PWM_VERSION_INFO_API   (STD_ON)

Enable/Disable PWM VersionInfo API.

◆ PWM_REGISTER_READBACK_API [1/2]

#define PWM_REGISTER_READBACK_API   (STD_ON)

Enable/Disable PWM RegisterReadback API.

◆ PWM_DUTYCYCLE_UPDATED_ENDPERIOD [1/2]

#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)

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

◆ PWM_PERIOD_UPDATED_ENDPERIOD [1/2]

#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)

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

◆ PWM_ISR_TYPE [1/2]

#define PWM_ISR_TYPE   (PWM_ISR_CAT1)

ISR type.

◆ PWM_NUM_CHANNELS [1/2]

#define PWM_NUM_CHANNELS   (1U)

Number of configured channels.

◆ PWM_DEV_ERROR_DETECT [1/2]

#define PWM_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable PWM dev detect error.

◆ PWM_NOTIFICATION_SUPPORTED [1/2]

#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 [1/2]

#define PWM_INDEX   (1U)

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

Instance ID for driver module for EPWM usage.

◆ PWM_INSTANCE_ID [1/2]

#define PWM_INSTANCE_ID   (PWM_INDEX)

◆ PWM_USE_GPT

#define PWM_USE_GPT

◆ PWM_TIMEOUT_DURATION [1/2]

#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 [1/2]

#define PwmConf_PwmChannel_PwmChannel_0   (10U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ PWM_INIT_CONFIG_PC [1/2]

#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet

Pre Compile config macro name.

◆ PWM_MAX_NUM_CHANNELS [1/2]

#define PWM_MAX_NUM_CHANNELS   (30U)

◆ PWM_CHANNEL11

#define PWM_CHANNEL11   (10U)

GP timer 11 instance, in MCU DOMAIN.

◆ PWM_PRE_COMPILE_VARIANT [2/2]

#define PWM_PRE_COMPILE_VARIANT   (STD_ON )

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

◆ PWM_VARIANT_POST_BUILD

#define PWM_VARIANT_POST_BUILD   (STD_OFF)

◆ PWM_ISR_VOID [2/2]

#define PWM_ISR_VOID   (0x00U)

void ISR type

◆ PWM_ISR_CAT1 [2/2]

#define PWM_ISR_CAT1   (0x01U)

Category 1 ISR type.

◆ PWM_ISR_CAT2 [2/2]

#define PWM_ISR_CAT2   (0x02U)

Category 2 ISR type.

◆ PWM_DEINIT_API [2/2]

#define PWM_DEINIT_API   (STD_ON)

Enable/Disable PWM DeInit API.

◆ PWM_SET_DUTY_CYCLE_API [2/2]

#define PWM_SET_DUTY_CYCLE_API   (STD_ON)

Enable/Disable PWM SetDutyCycle API.

◆ PWM_SET_OUTPUT_TO_IDLE_API [2/2]

#define PWM_SET_OUTPUT_TO_IDLE_API   (STD_ON)

Enable/Disable PWM SetOutputToIdle API.

◆ PWM_GET_OUTPUT_STATE_API

#define PWM_GET_OUTPUT_STATE_API   (STD_OFF)

Enable/Disable PWM GetOutputState API.

◆ PWM_SET_PERIOD_AND_DUTY_API [2/2]

#define PWM_SET_PERIOD_AND_DUTY_API   (STD_ON)

Enable/Disable PWM SetPeriodAndDuty API.

◆ PWM_VERSION_INFO_API [2/2]

#define PWM_VERSION_INFO_API   (STD_ON)

Enable/Disable PWM VersionInfo API.

◆ PWM_REGISTER_READBACK_API [2/2]

#define PWM_REGISTER_READBACK_API   (STD_ON)

Enable/Disable PWM RegisterReadback API.

◆ PWM_DUTYCYCLE_UPDATED_ENDPERIOD [2/2]

#define PWM_DUTYCYCLE_UPDATED_ENDPERIOD   (STD_ON)

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

◆ PWM_PERIOD_UPDATED_ENDPERIOD [2/2]

#define PWM_PERIOD_UPDATED_ENDPERIOD   (STD_ON)

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

◆ PWM_ISR_TYPE [2/2]

#define PWM_ISR_TYPE   (PWM_ISR_CAT2)

ISR type.

◆ PWM_NUM_CHANNELS [2/2]

#define PWM_NUM_CHANNELS   (1U)

Number of configured channels.

◆ PWM_DEV_ERROR_DETECT [2/2]

#define PWM_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable PWM dev detect error.

◆ PWM_NOTIFICATION_SUPPORTED [2/2]

#define PWM_NOTIFICATION_SUPPORTED   (STD_ON)

Enable/Disable PWM notifications.

◆ PWM_INDEX [2/2]

#define PWM_INDEX   (0U)

Instance ID for driver module for EPWM usage.

◆ PWM_INSTANCE_ID [2/2]

#define PWM_INSTANCE_ID   (PWM_INDEX)

◆ PWM_USE_EPWM

#define PWM_USE_EPWM

◆ PWM_TIMEOUT_DURATION [2/2]

#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 [2/2]

#define PwmConf_PwmChannel_PwmChannel_0   (0U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ PWM_INIT_CONFIG_PC [2/2]

#define PWM_INIT_CONFIG_PC   PwmChannelConfigSet

Pre Compile config macro name.

◆ EHRPWM_BASE_OFFSET

#define EHRPWM_BASE_OFFSET   0x0U

◆ PWM_MAX_NUM_CHANNELS [2/2]

#define PWM_MAX_NUM_CHANNELS   (3U)

◆ PWM_CHANNEL0

#define PWM_CHANNEL0   (0U)

EPWM Channel 0, in MAIN 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_Init()

void Pwm_Init ( const Pwm_ConfigType * CfgPtr)

Service for PWM initialization.

*  Service name        : Pwm_Init
*  Syntax              : Pwm_Init(P2CONST(Pwm_ConfigType,
*                                  AUTOMATIC, PWM_PBCFG) ConfigPtr)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x00
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : Pointer to the configuration
*  Parameters (out)    : None
*  Return value        : void
*  Description         : Initializes internal variables
*                        and the PWM unit of the micro controller.
*                        The function can be called on task level.
*  

◆ Pwm_DeInit()

void Pwm_DeInit ( void )

Service for PWM de-initialization.

*  Service name        : Pwm_DeInit
*  Syntax              : Pwm_DeInit(void)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x01
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : None
*  Parameters (out)    : None
*  Return value        : void
*  Description         : After DeInit output states should be in idle level
*                       (it is configurable whether reset state is restored or
*                        if channel output states are really set to idle).
*                        The function can be called on task level.
*  

◆ Pwm_SetDutyCycle()

void Pwm_SetDutyCycle ( Pwm_ChannelType ChannelNumber,
uint16 DutyCycle )

Service for setting Duty Cycle.

*  Service name        : Pwm_SetDutyCycle
*  Syntax              : Pwm_SetDutyCycle(Pwm_ChannelType Channel,
*                                         uint16 DutyCycle)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x02
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Pwm_ChannelType Channel
*  Parameters (in)     : uint16 DutyCycle
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service sets the duty cycle for a channel
*                        if DutyCycle is 0%, set output to inverse of polarity
*                        if DutyCycle is >= 100%, set output to polarity
*                        if 0% < DutyCycle < 100%, set output accordingly
*                        The function can be called on task level.
*  

◆ Pwm_SetPeriodAndDuty()

void Pwm_SetPeriodAndDuty ( Pwm_ChannelType ChannelNumber,
Pwm_PeriodType Period,
uint16 DutyCycle )

Service for setting Period and Duty Cycle.

*  Service name        : Pwm_SetPeriodAndDuty
*  Syntax              : Pwm_SetPeriodAndDuty(Pwm_ChannelType Channel,
*                                  Pwm_PeriodType Period, uint16 DutyCycle)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x03
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Pwm_ChannelType Channel
*  Parameters (in)     : Pwm_PeriodType Period
*  Parameters (in)     : uint16 DutyCycle
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service sets period and duty cycle for a channel
*                        if DutyCycle is 0%, set output to inverse of polarity
*                        if DutyCycle is >= 100%, set output to polarity
*                        if 0% < DutyCycle < 100%, set output accordingly
*                        The function can be called on task level.
*  

◆ Pwm_SetOutputToIdle()

void Pwm_SetOutputToIdle ( Pwm_ChannelType ChannelNumber)

Service to set the output of a channel immediately to idle.

*  Service name        : Pwm_SetOutputToIdle
*  Syntax              : Pwm_SetOutputToIdle(Pwm_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x04
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Pwm_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service sets the output of a channel
*                        immediately to idle. The idle output level
*                        is configured in driver configuration.
*                        The function can be called on task level.
*  

◆ Pwm_GetOutputState()

Pwm_OutputStateType Pwm_GetOutputState ( Pwm_ChannelType ChannelNumber)

◆ Pwm_DisableNotification()

void Pwm_DisableNotification ( Pwm_ChannelType ChannelNumber)

Service to disable the Edge Notification.

*  Service name        : Pwm_DisableNotification
*  Syntax              : Pwm_DisableNotification(Pwm_ChannelType ChannelNumber)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x06
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Pwm_ChannelType ChannelNumber
*  Parameters (out)    : None
*  Return value        : None
*  Description         : Disables the Edge Notification
*                        This service deactivates the Edge Notification for the
*                        pwm channel specified by the ChannelNumber Parameter.
*                        The function can be called on task level.
*  

◆ Pwm_EnableNotification()

void Pwm_EnableNotification ( Pwm_ChannelType ChannelNumber,
Pwm_EdgeNotificationType Notification )

Service to enable the Edge Notification.

*  Service name        : Pwm_EnableNotification
*  Syntax              : Pwm_EnableNotification (Pwm_ChannelType Channel,
*                        Pwm_EdgeNotificationType Notification)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x07
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Pwm_ChannelType ChannelNumber
*  Parameters (in)     : Pwm_EdgeNotificationType  Notification
*  Parameters (out)    : None
*  Return value        : None
*  Description         : Enables the Edge Notification
*                        This service enables the notification of the chosen
*                        edges for the Pwm channel specified by the
*                        ChannelNumber.The function can be called on task level
*  

◆ Pwm_GetVersionInfo()

void Pwm_GetVersionInfo ( Std_VersionInfoType * versioninfo)

This service returns the version information of this module.

*  Service name        : Pwm_GetVersionInfo
*  Syntax              : Pwm_GetVersionInfo(P2VAR(Std_VersionInfoType,
*                           AUTOMATIC, PWM_APPL_DATA) versioninfo)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x08
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Std_VersionInfoType - Version info.
*  Parameters (out)    : None
*  Return value        : void
*  Description         : Returns the version information of this module.
*                        The function can be called on task level.
*  

◆ Pwm_RegisterReadback()

Std_ReturnType Pwm_RegisterReadback ( Pwm_ChannelType ChannelNumber,
Pwm_RegisterReadbackType * RegRbPtr )

This function reads the important registers of the hardware unit and returns the value in the structure.

*  Service name        : Pwm_RegisterReadback(Pwm_ChannelType ChannelNumber,
*                                          Pwm_RegisterReadbackType *RegRbPtr)
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Service ID[hex]     : 0x0D
*  Parameters (in)     : Pwm_ChannelType ChannelNumber
*  Parameters (inout)  : RegRbPtr - Pointer to where to store the readback
*                        values. If this pointer is NULL, then the API
*                        will return E_NOT_OK.
*  Description         : This API is used to check the status of critical
                         registers which donot change during program execution.
*  Return value        : Std_ReturnType
*                        E_OK: Register read back has been done successfully
*                        E_NOT_OK: Register read back failed
*  

◆ Pwm_Ch11Isr()

void Pwm_Ch11Isr ( void )

PWM Channel 11 ISR.

◆ Pwm_Ch0Notify()

void Pwm_Ch0Notify ( void )

PWM ISR.

PWM Channel 0 ISR

Variable Documentation

◆ channelId

Pwm_ChannelType Pwm_ChannelConfigType_PC::channelId

◆ chCfg [1/2]

Pwm_ChannelConfigType_PC Pwm_ConfigType_PC::chCfg[PWM_NUM_CHANNELS]

Channel configurations

◆ instanceClkHz

uint32 Pwm_ChannelConfigType::instanceClkHz

System clock frequency

◆ dutyCycle

uint16 Pwm_ChannelConfigType::dutyCycle

Initial dutycycle

◆ hwPeriod

uint32 Pwm_ChannelConfigType::hwPeriod

Number of HW Unit ticks value which sets initial period

◆ polarity

Pwm_OutputStateType Pwm_ChannelConfigType::polarity

Initial polarity

◆ idleState

Pwm_OutputStateType Pwm_ChannelConfigType::idleState

Initial idle state

◆ channelClass

Pwm_ChannelClassType Pwm_ChannelConfigType::channelClass

Fixed or Variable period

◆ prescale

uint32 Pwm_ChannelConfigType::prescale

Prescaler, part of PWM HW time-base clock Range - 0 <= prescale <= 7, TBCLK = SYSCLK / (prescale) 0x0 = /1 (No prescale) 0x1 = /2 0x2 = /4 0x3 = /8 0x4 = /16 0x5 = /32 0x6 = /64 0x7 = /128

◆ notificationHandler

Pwm_NotifyFuncType Pwm_ChannelConfigType::notificationHandler

Notification handler

◆ chCfg [2/2]

Pwm_ChannelConfigType Pwm_ConfigType::chCfg[PWM_NUM_CHANNELS]

Channel configurations

◆ Pwm_HwUnitBaseAddr [1/2]

const uint32 Pwm_HwUnitBaseAddr[PWM_MAX_NUM_CHANNELS]
extern

◆ PwmChannelConfigSet_PC [1/2]

const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
extern

PWM Configuration structure declaration.

◆ PwmChannelConfigSet [1/2]

const struct Pwm_ConfigType_s PwmChannelConfigSet
extern

◆ Pwm_HwUnitBaseAddr [2/2]

const uint32 Pwm_HwUnitBaseAddr[PWM_MAX_NUM_CHANNELS]
extern

◆ PwmChannelConfigSet_PC [2/2]

const struct Pwm_ConfigType_PC_s PwmChannelConfigSet_PC
extern

PWM Configuration structure declaration.

◆ PwmChannelConfigSet [2/2]

const struct Pwm_ConfigType_s PwmChannelConfigSet
extern