MINI58_BSP V3.01.005
The Board Support Package for Mini58 Series MCU
Macros | Functions
Collaboration diagram for PWM Exported Functions:

Macros

#define PWM_ENABLE_COMPLEMENTARY_MODE(pwm)
 This macro enable complementary mode. More...
 
#define PWM_DISABLE_COMPLEMENTARY_MODE(pwm)
 This macro disable complementary mode, and enable independent mode. More...
 
#define PWM_ENABLE_GROUP_MODE(pwm)
 This macro enable group mode. More...
 
#define PWM_DISABLE_GROUP_MODE(pwm)
 This macro disable group mode. More...
 
#define PWM_ENABLE_SYNC_MODE(pwm)
 This macro enable synchronous mode. More...
 
#define PWM_DISABLE_SYNC_MODE(pwm)
 This macro disable synchronous mode, and enable independent mode. More...
 
#define PWM_ENABLE_OUTPUT_INVERTER(pwm, u32ChannelMask)
 This macro enable output inverter of specified channel(s) More...
 
#define PWM_SET_PRESCALER(pwm, u32ChannelNum, u32Prescaler)
 This macro set the prescaler of the selected channel. More...
 
#define PWM_SET_DIVIDER(pwm, u32ChannelNum, u32Divider)
 This macro set the divider of the selected channel. More...
 
#define PWM_SET_CMR(pwm, u32ChannelNum, u32CMR)
 This macro set the duty of the selected channel. More...
 
#define PWM_SET_CNR(pwm, u32ChannelNum, u32CNR)
 This macro set the period of the selected channel. More...
 
#define PWM_SET_CMRD(pwm, u32ChannelNum, u32CMRD)
 This macro set the duty of the selected channel for PWM asymmetric Mode. More...
 
#define PWM_SET_ALIGNED_TYPE(pwm, u32ChannelMask, u32AlignedType)
 This macro set the PWM aligned type. More...
 
#define PWM_ENABLE_ASYMMETRIC_MODE(pwm)
 This macro enables PWM asymmetric mode. More...
 
#define PWM_ENABLE_PCAEN(pwm)
 This macro enables PWM Precise Center-Aligned Type. More...
 

Functions

uint32_t PWM_ConfigOutputChannel (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
 This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode. More...
 
void PWM_Start (PWM_T *pwm, uint32_t u32ChannelMask)
 This function start PWM module. More...
 
void PWM_Stop (PWM_T *pwm, uint32_t u32ChannelMask)
 This function stop PWM module. More...
 
void PWM_ForceStop (PWM_T *pwm, uint32_t u32ChannelMask)
 This function stop PWM generation immediately by clear channel enable bit. More...
 
void PWM_EnableADCTrigger (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 This function enable selected channel to trigger ADC. More...
 
void PWM_DisableADCTrigger (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable selected channel to trigger ADC. More...
 
void PWM_ClearADCTriggerFlag (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 This function clear selected channel trigger ADC flag. More...
 
uint32_t PWM_GetADCTriggerFlag (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 This function get selected channel trigger ADC flag. More...
 
void PWM_EnableFaultBrake (PWM_T *pwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource)
 This function enable fault brake of selected channels. More...
 
void PWM_ClearFaultBrakeFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function clear fault brake flag. More...
 
void PWM_EnableOutput (PWM_T *pwm, uint32_t u32ChannelMask)
 This function enables PWM output generation of selected channels. More...
 
void PWM_DisableOutput (PWM_T *pwm, uint32_t u32ChannelMask)
 This function disables PWM output generation of selected channels. More...
 
void PWM_EnableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration)
 This function enable Dead zone of selected channel. More...
 
void PWM_DisableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable Dead zone of selected channel. More...
 
void PWM_EnableDutyInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
 This function enable duty interrupt of selected channel. More...
 
void PWM_DisableDutyInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable duty interrupt of selected channel. More...
 
void PWM_ClearDutyIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clears duty interrupt flag of selected channel. More...
 
uint32_t PWM_GetDutyIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get duty interrupt flag of selected channel. More...
 
void PWM_EnableFaultBrakeInt (PWM_T *pwm, uint32_t u32BrakeSource)
 This function enable fault brake interrupt. More...
 
void PWM_DisableFaultBrakeInt (PWM_T *pwm, uint32_t u32BrakeSource)
 This function disable fault brake interrupt. More...
 
void PWM_ClearFaultBrakeIntFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function clear fault brake interrupt of selected source. More...
 
uint32_t PWM_GetFaultBrakeIntFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function get fault brake interrupt of selected source. More...
 
void PWM_EnablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function enable Period interrupt of selected channel. More...
 
void PWM_DisablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable Period interrupt of selected channel. More...
 
void PWM_ClearPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clears Period interrupt flag of selected channel. More...
 
uint32_t PWM_GetPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get Period interrupt flag of selected channel. More...
 
void PWM_EnableCenterInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
 This function enable Central interrupt of selected channel. More...
 
void PWM_DisableCenterInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable Central interrupt of selected channel. More...
 
void PWM_ClearCenterIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clear Central interrupt of selected channel. More...
 
uint32_t PWM_GetCenterIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get Central interrupt of selected channel. More...
 
void PWM_EnableRiseInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function enable Rise interrupt of selected channel. More...
 
void PWM_DisableRiseInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable Rise interrupt of selected channel. More...
 
void PWM_ClearRiseIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clears Rise interrupt flag of selected channel. More...
 
uint32_t PWM_GetRiseIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get Rise interrupt flag of selected channel. More...
 

Detailed Description

Macro Definition Documentation

◆ PWM_DISABLE_COMPLEMENTARY_MODE

#define PWM_DISABLE_COMPLEMENTARY_MODE (   pwm)

This macro disable complementary mode, and enable independent mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 81 of file pwm.h.

◆ PWM_DISABLE_GROUP_MODE

#define PWM_DISABLE_GROUP_MODE (   pwm)

This macro disable group mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 97 of file pwm.h.

◆ PWM_DISABLE_SYNC_MODE

#define PWM_DISABLE_SYNC_MODE (   pwm)

This macro disable synchronous mode, and enable independent mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 113 of file pwm.h.

◆ PWM_ENABLE_ASYMMETRIC_MODE

#define PWM_ENABLE_ASYMMETRIC_MODE (   pwm)

This macro enables PWM asymmetric mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 215 of file pwm.h.

◆ PWM_ENABLE_COMPLEMENTARY_MODE

#define PWM_ENABLE_COMPLEMENTARY_MODE (   pwm)

This macro enable complementary mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 73 of file pwm.h.

◆ PWM_ENABLE_GROUP_MODE

#define PWM_ENABLE_GROUP_MODE (   pwm)

This macro enable group mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 89 of file pwm.h.

◆ PWM_ENABLE_OUTPUT_INVERTER

#define PWM_ENABLE_OUTPUT_INVERTER (   pwm,
  u32ChannelMask 
)

This macro enable output inverter of specified channel(s)

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
Returns
None

Definition at line 123 of file pwm.h.

◆ PWM_ENABLE_PCAEN

#define PWM_ENABLE_PCAEN (   pwm)

This macro enables PWM Precise Center-Aligned Type.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 223 of file pwm.h.

◆ PWM_ENABLE_SYNC_MODE

#define PWM_ENABLE_SYNC_MODE (   pwm)

This macro enable synchronous mode.

Parameters
[in]pwmThe base address of PWM module
Returns
None

Definition at line 105 of file pwm.h.

◆ PWM_SET_ALIGNED_TYPE

#define PWM_SET_ALIGNED_TYPE (   pwm,
  u32ChannelMask,
  u32AlignedType 
)

This macro set the PWM aligned type.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskThis parameter is not used
[in]u32AlignedTypePWM aligned type, valid values are:
Returns
None

Definition at line 206 of file pwm.h.

◆ PWM_SET_CMR

#define PWM_SET_CMR (   pwm,
  u32ChannelNum,
  u32CMR 
)

This macro set the duty of the selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32CMRDuty of specified channel. Valid values are between 0~0xFFFF
Returns
None
Note
This new setting will take effect on next PWM period

Definition at line 171 of file pwm.h.

◆ PWM_SET_CMRD

#define PWM_SET_CMRD (   pwm,
  u32ChannelNum,
  u32CMRD 
)

This macro set the duty of the selected channel for PWM asymmetric Mode.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32CMRDDown counter in Asymmetric Mode. Valid values are between 0~0xFFFF
Returns
None
Note
This new setting will take effect on next PWM period

Definition at line 194 of file pwm.h.

◆ PWM_SET_CNR

#define PWM_SET_CNR (   pwm,
  u32ChannelNum,
  u32CNR 
)

This macro set the period of the selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32CNRPeriod of specified channel. Valid values are between 0~0xFFFF
Returns
None
Note
This new setting will take effect on next PWM period
PWM counter will stop if period length set to 0

Definition at line 183 of file pwm.h.

◆ PWM_SET_DIVIDER

#define PWM_SET_DIVIDER (   pwm,
  u32ChannelNum,
  u32Divider 
)

This macro set the divider of the selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32DividerClock divider of specified channel. Valid values are
Returns
None

Definition at line 159 of file pwm.h.

◆ PWM_SET_PRESCALER

#define PWM_SET_PRESCALER (   pwm,
  u32ChannelNum,
  u32Prescaler 
)

This macro set the prescaler of the selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32PrescalerClock prescaler of specified channel. Valid values are between 1 ~ 0xFF
Returns
None
Note
Every even channel N, and channel (N + 1) share a prescaler. So if channel 0 prescaler changed, channel 1 will also be affected.

Definition at line 143 of file pwm.h.

Function Documentation

◆ PWM_ClearADCTriggerFlag()

void PWM_ClearADCTriggerFlag ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

This function clear selected channel trigger ADC flag.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32ConditionPWM triggered ADC flag to be cleared.
Returns
None

Definition at line 227 of file pwm.c.

◆ PWM_ClearCenterIntFlag()

void PWM_ClearCenterIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function clear Central interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 569 of file pwm.c.

◆ PWM_ClearDutyIntFlag()

void PWM_ClearDutyIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function clears duty interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 377 of file pwm.c.

◆ PWM_ClearFaultBrakeFlag()

void PWM_ClearFaultBrakeFlag ( PWM_T pwm,
uint32_t  u32BrakeSource 
)

This function clear fault brake flag.

Parameters
[in]pwmThe base address of PWM module
[in]u32BrakeSourceThis parameter is not used
Returns
None
Note
After fault brake occurred, application must clear fault brake source before re-enable PWM output

Definition at line 287 of file pwm.c.

◆ PWM_ClearFaultBrakeIntFlag()

void PWM_ClearFaultBrakeIntFlag ( PWM_T pwm,
uint32_t  u32BrakeSource 
)

This function clear fault brake interrupt of selected source.

Parameters
[in]pwmThe base address of PWM module
[in]u32BrakeSourceFault brake source, could be either
Returns
None

Definition at line 517 of file pwm.c.

◆ PWM_ClearPeriodIntFlag()

void PWM_ClearPeriodIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function clears Period interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 423 of file pwm.c.

◆ PWM_ClearRiseIntFlag()

void PWM_ClearRiseIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function clears Rise interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 469 of file pwm.c.

◆ PWM_ConfigOutputChannel()

uint32_t PWM_ConfigOutputChannel ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32Frequency,
uint32_t  u32DutyCycle 
)

This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32FrequencyTarget generator frequency
[in]u32DutyCycleTarget generator duty cycle percentage. Valid range are between 0 ~ 100. 10 means 10%, 20 means 20%...
Returns
Nearest frequency clock in nano second
Note
Since every two channels, (0 & 1), (2 & 3), (4 & 5), shares a prescaler. Call this API to configure PWM frequency may affect existing frequency of other channel.

Definition at line 37 of file pwm.c.

◆ PWM_DisableADCTrigger()

void PWM_DisableADCTrigger ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable selected channel to trigger ADC.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 202 of file pwm.c.

◆ PWM_DisableCenterInt()

void PWM_DisableCenterInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable Central interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 558 of file pwm.c.

◆ PWM_DisableDeadZone()

void PWM_DisableDeadZone ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable Dead zone of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 340 of file pwm.c.

◆ PWM_DisableDutyInt()

void PWM_DisableDutyInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable duty interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 366 of file pwm.c.

◆ PWM_DisableFaultBrakeInt()

void PWM_DisableFaultBrakeInt ( PWM_T pwm,
uint32_t  u32BrakeSource 
)

This function disable fault brake interrupt.

Parameters
[in]pwmThe base address of PWM module
[in]u32BrakeSourceThis parameter is not used
Returns
None

Definition at line 504 of file pwm.c.

◆ PWM_DisableOutput()

void PWM_DisableOutput ( PWM_T pwm,
uint32_t  u32ChannelMask 
)

This function disables PWM output generation of selected channels.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Set bit 0 to 1 disables channel 0 output, set bit 1 to 1 disables channel 1 output...
Returns
None

Definition at line 311 of file pwm.c.

◆ PWM_DisablePeriodInt()

void PWM_DisablePeriodInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable Period interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 412 of file pwm.c.

◆ PWM_DisableRiseInt()

void PWM_DisableRiseInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function disable Rise interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 458 of file pwm.c.

◆ PWM_EnableADCTrigger()

void PWM_EnableADCTrigger ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

This function enable selected channel to trigger ADC.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32ConditionThe condition to trigger ADC. Combination of following conditions:
Returns
None

Definition at line 178 of file pwm.c.

◆ PWM_EnableCenterInt()

void PWM_EnableCenterInt ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntPeriodType 
)

This function enable Central interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32IntPeriodTypePeriod interrupt type, could be either
Returns
None
Note
All channels share the same Central interrupt type setting.

Definition at line 547 of file pwm.c.

◆ PWM_EnableDeadZone()

void PWM_EnableDeadZone ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32Duration 
)

This function enable Dead zone of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32DurationDead Zone length in PWM clock count, valid values are between 0~0xFF, but 0 means there is no dead zone.
Returns
None

Definition at line 324 of file pwm.c.

◆ PWM_EnableDutyInt()

void PWM_EnableDutyInt ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntDutyType 
)

This function enable duty interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32IntDutyTypeThis parameter is not used
Returns
None

Definition at line 355 of file pwm.c.

◆ PWM_EnableFaultBrake()

void PWM_EnableFaultBrake ( PWM_T pwm,
uint32_t  u32ChannelMask,
uint32_t  u32LevelMask,
uint32_t  u32BrakeSource 
)

This function enable fault brake of selected channels.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskThis parameter is not used
[in]u32LevelMaskOutput high or low while fault brake occurs, each bit represent the level of a channel while fault brake occur. Bit 0 represents channel 0, bit 1 represents channel 1... , bit 6 represent D6, and bit 7 represents D7
[in]u32BrakeSourceFault brake source, could be one of following source
Returns
None

Definition at line 272 of file pwm.c.

◆ PWM_EnableFaultBrakeInt()

void PWM_EnableFaultBrakeInt ( PWM_T pwm,
uint32_t  u32BrakeSource 
)

This function enable fault brake interrupt.

Parameters
[in]pwmThe base address of PWM module
[in]u32BrakeSourceThis parameter is not used
Returns
None

Definition at line 493 of file pwm.c.

◆ PWM_EnableOutput()

void PWM_EnableOutput ( PWM_T pwm,
uint32_t  u32ChannelMask 
)

This function enables PWM output generation of selected channels.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Set bit 0 to 1 enables channel 0 output, set bit 1 to 1 enables channel 1 output...
Returns
None

Definition at line 299 of file pwm.c.

◆ PWM_EnablePeriodInt()

void PWM_EnablePeriodInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function enable Period interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 401 of file pwm.c.

◆ PWM_EnableRiseInt()

void PWM_EnableRiseInt ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function enable Rise interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 447 of file pwm.c.

◆ PWM_ForceStop()

void PWM_ForceStop ( PWM_T pwm,
uint32_t  u32ChannelMask 
)

This function stop PWM generation immediately by clear channel enable bit.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

Definition at line 153 of file pwm.c.

◆ PWM_GetADCTriggerFlag()

uint32_t PWM_GetADCTriggerFlag ( PWM_T pwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

This function get selected channel trigger ADC flag.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
[in]u32ConditionPWM triggered ADC flag to be selected.
Returns
Get status of the selected channel trigger ADC

Definition at line 246 of file pwm.c.

◆ PWM_GetCenterIntFlag()

uint32_t PWM_GetCenterIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function get Central interrupt of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
Central interrupt flag of specified channel
Return values
0Central interrupt did not occurred
1Central interrupt occurred

Definition at line 582 of file pwm.c.

◆ PWM_GetDutyIntFlag()

uint32_t PWM_GetDutyIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function get duty interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
Duty interrupt flag of specified channel
Return values
0Duty interrupt did not occurred
1Duty interrupt occurred

Definition at line 390 of file pwm.c.

◆ PWM_GetFaultBrakeIntFlag()

uint32_t PWM_GetFaultBrakeIntFlag ( PWM_T pwm,
uint32_t  u32BrakeSource 
)

This function get fault brake interrupt of selected source.

Parameters
[in]pwmThe base address of PWM module
[in]u32BrakeSourceFault brake source, could be either
Returns
Fault brake interrupt flag of specified source
Return values
0Fault brake interrupt did not occurred
1Fault brake interrupt occurred

Definition at line 532 of file pwm.c.

◆ PWM_GetPeriodIntFlag()

uint32_t PWM_GetPeriodIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function get Period interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
Period interrupt flag of specified channel
Return values
0Period interrupt did not occurred
1Period interrupt occurred

Definition at line 436 of file pwm.c.

◆ PWM_GetRiseIntFlag()

uint32_t PWM_GetRiseIntFlag ( PWM_T pwm,
uint32_t  u32ChannelNum 
)

This function get Rise interrupt flag of selected channel.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelNumPWM channel number. Valid values are between 0~5
Returns
Rise interrupt flag of specified channel
Return values
0Rise interrupt did not occurred
1Rise interrupt occurred

Definition at line 482 of file pwm.c.

◆ PWM_Start()

void PWM_Start ( PWM_T pwm,
uint32_t  u32ChannelMask 
)

This function start PWM module.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

Definition at line 112 of file pwm.c.

◆ PWM_Stop()

void PWM_Stop ( PWM_T pwm,
uint32_t  u32ChannelMask 
)

This function stop PWM module.

Parameters
[in]pwmThe base address of PWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

Definition at line 133 of file pwm.c.