Dataflow Runtime API  3.0.3.0
Enumerations | Functions
SystemPeripherals_PWM.h File Reference
#include <Imt.Base.Core.Platform/Platform.h>
#include "SystemMemoryMap.h"

Enumerations

enum  PwmModuleAddress { PwmModuleAddress_Pwm0 = SOC_EPWM_0_REGS , PwmModuleAddress_Pwm1 = SOC_EPWM_1_REGS , PwmModuleAddress_Pwm2 = SOC_EPWM_2_REGS }
 Enhanced PWM (ePWM) peripheral module. More...
 
enum  PwmOutChannel { PwmOutChannel_A = 0 , PwmOutChannel_B }
 Id's of the available PWM output channels. More...
 

Functions

void PWM_Init (const PwmModuleAddress moduleBaseAddress, const PwmOutChannel channel, const uint32_t frequency, const bool isOutputInverted, const uint16_t initialDutyCycle)
 Initializes the PWM output according to the specified parameters. More...
 
void PWM_SetDutyCycle (const PwmModuleAddress moduleBaseAddress, const PwmOutChannel channel, uint16_t dutyCycle)
 Sets the duty cycle for a specific channel. More...
 

Enumeration Type Documentation

◆ PwmModuleAddress

Enhanced PWM (ePWM) peripheral module.

The ePWM module represents one complete PWM channel composed of two PWM outputs: EPWMxA and EPWMxB Enumeration of the available PWM modules

Enumerator
PwmModuleAddress_Pwm0 
PwmModuleAddress_Pwm1 
PwmModuleAddress_Pwm2 

◆ PwmOutChannel

Id's of the available PWM output channels.

Enumerator
PwmOutChannel_A 
PwmOutChannel_B 

Function Documentation

◆ PWM_Init()

void PWM_Init ( const PwmModuleAddress  moduleBaseAddress,
const PwmOutChannel  channel,
const uint32_t  frequency,
const bool  isOutputInverted,
const uint16_t  initialDutyCycle 
)

Initializes the PWM output according to the specified parameters.

Parameters
moduleBaseAddress
channel
frequency
isOutputInverted
initialDutyCycle

◆ PWM_SetDutyCycle()

void PWM_SetDutyCycle ( const PwmModuleAddress  moduleBaseAddress,
const PwmOutChannel  channel,
uint16_t  dutyCycle 
)

Sets the duty cycle for a specific channel.

Parameters
moduleBaseAddress
channel
dutyCycle- 0 means fully closed, 5000 means fully open. If > 5000, it's limited to 5000