M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros | Functions

Macros

#define BPWM_ENABLE_TIMER_SYNC(bpwm, u32ChannelMask, u32SyncSrc)
 Enable timer synchronous start counting function of specified channel(s) More...
 
#define BPWM_DISABLE_TIMER_SYNC(bpwm, u32ChannelMask)
 Disable timer synchronous start counting function of specified channel(s) More...
 
#define BPWM_TRIGGER_SYNC_START(bpwm)
 This macro enable BPWM counter synchronous start counting function. More...
 
#define BPWM_ENABLE_OUTPUT_INVERTER(bpwm, u32ChannelMask)
 This macro enable output inverter of specified channel(s) More...
 
#define BPWM_GET_CAPTURE_RISING_DATA(bpwm, u32ChannelNum)
 This macro get captured rising data. More...
 
#define BPWM_GET_CAPTURE_FALLING_DATA(bpwm, u32ChannelNum)
 This macro get captured falling data. More...
 
#define BPWM_MASK_OUTPUT(bpwm, u32ChannelMask, u32LevelMask)
 This macro mask output logic to high or low. More...
 
#define BPWM_SET_PRESCALER(bpwm, u32ChannelNum, u32Prescaler)
 This macro set the prescaler of all channels. More...
 
#define BPWM_SET_CMR(bpwm, u32ChannelNum, u32CMR)
 This macro set the duty of the selected channel. More...
 
#define BPWM_GET_CMR(bpwm, u32ChannelNum)
 This macro get the duty of the selected channel. More...
 
#define BPWM_SET_CNR(bpwm, u32ChannelNum, u32CNR)
 This macro set the period of all channels. More...
 
#define BPWM_GET_CNR(bpwm, u32ChannelNum)
 This macro get the period of all channels. More...
 
#define BPWM_SET_ALIGNED_TYPE(bpwm, u32ChannelMask, u32AlignedType)
 This macro set the BPWM aligned type. More...
 
#define BPWM_CLR_COUNTER(bpwm, u32ChannelMask)
 Clear counter of channel 0. More...
 
#define BPWM_SET_OUTPUT_LEVEL(bpwm, u32ChannelMask, u32ZeroLevel, u32CmpUpLevel, u32PeriodLevel, u32CmpDownLevel)
 Set output level at zero, compare up, period(center) and compare down of specified channel(s) More...
 

Functions

uint32_t BPWM_ConfigCaptureChannel (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge)
 Configure BPWM capture and get the nearest unit time. More...
 
uint32_t BPWM_ConfigOutputChannel (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
 This function Configure BPWM generator and get the nearest frequency in edge aligned auto-reload mode. More...
 
void BPWM_Start (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Start BPWM module. More...
 
void BPWM_Stop (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Stop BPWM module. More...
 
void BPWM_ForceStop (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Stop BPWM generation immediately by clear channel enable bit. More...
 
void BPWM_EnableADCTrigger (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Enable selected channel to trigger ADC. More...
 
void BPWM_DisableADCTrigger (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Disable selected channel to trigger ADC. More...
 
void BPWM_ClearADCTriggerFlag (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Clear selected channel trigger ADC flag. More...
 
uint32_t BPWM_GetADCTriggerFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get selected channel trigger ADC flag. More...
 
void BPWM_EnableCapture (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Enable capture of selected channel(s) More...
 
void BPWM_DisableCapture (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Disable capture of selected channel(s) More...
 
void BPWM_EnableOutput (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Enables BPWM output generation of selected channel(s) More...
 
void BPWM_DisableOutput (BPWM_T *bpwm, uint32_t u32ChannelMask)
 Disables BPWM output generation of selected channel(s) More...
 
void BPWM_EnableCaptureInt (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Enable capture interrupt of selected channel. More...
 
void BPWM_DisableCaptureInt (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Disable capture interrupt of selected channel. More...
 
void BPWM_ClearCaptureIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Clear capture interrupt of selected channel. More...
 
uint32_t BPWM_GetCaptureIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get capture interrupt of selected channel. More...
 
void BPWM_EnableDutyInt (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
 Enable duty interrupt of selected channel. More...
 
void BPWM_DisableDutyInt (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Disable duty interrupt of selected channel. More...
 
void BPWM_ClearDutyIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Clear duty interrupt flag of selected channel. More...
 
uint32_t BPWM_GetDutyIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get duty interrupt flag of selected channel. More...
 
void BPWM_EnablePeriodInt (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
 Enable period interrupt of selected channel. More...
 
void BPWM_DisablePeriodInt (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Disable period interrupt of selected channel. More...
 
void BPWM_ClearPeriodIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Clear period interrupt of selected channel. More...
 
uint32_t BPWM_GetPeriodIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get period interrupt of selected channel. More...
 
void BPWM_EnableZeroInt (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Enable zero interrupt of selected channel. More...
 
void BPWM_DisableZeroInt (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Disable zero interrupt of selected channel. More...
 
void BPWM_ClearZeroIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Clear zero interrupt of selected channel. More...
 
uint32_t BPWM_GetZeroIntFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get zero interrupt of selected channel. More...
 
void BPWM_EnableLoadMode (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
 Enable load mode of selected channel. More...
 
void BPWM_DisableLoadMode (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
 Disable load mode of selected channel. More...
 
void BPWM_SetClockSource (BPWM_T *bpwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel)
 Set BPWM clock source. More...
 
uint32_t BPWM_GetWrapAroundFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Get the time-base counter reached its maximum value flag of selected channel. More...
 
void BPWM_ClearWrapAroundFlag (BPWM_T *bpwm, uint32_t u32ChannelNum)
 Clear the time-base counter reached its maximum value flag of selected channel. More...
 

Detailed Description

Macro Definition Documentation

◆ BPWM_CLR_COUNTER

#define BPWM_CLR_COUNTER (   bpwm,
  u32ChannelMask 
)

Clear counter of channel 0.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
Returns
None

This macro is used to clear counter of channel 0

Definition at line 265 of file bpwm.h.

◆ BPWM_DISABLE_TIMER_SYNC

#define BPWM_DISABLE_TIMER_SYNC (   bpwm,
  u32ChannelMask 
)

Disable timer synchronous start counting function of specified channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
Returns
None

This macro is used to disable timer synchronous start counting function of specified channel(s).

Note
All channels share channel 0's setting.

Definition at line 136 of file bpwm.h.

◆ BPWM_ENABLE_OUTPUT_INVERTER

#define BPWM_ENABLE_OUTPUT_INVERTER (   bpwm,
  u32ChannelMask 
)

This macro enable output inverter of specified channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM 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 156 of file bpwm.h.

◆ BPWM_ENABLE_TIMER_SYNC

#define BPWM_ENABLE_TIMER_SYNC (   bpwm,
  u32ChannelMask,
  u32SyncSrc 
)

Enable timer synchronous start counting function of specified channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
[in]u32SyncSrcSynchronous start source selection, valid values are:
Returns
None

This macro is used to enable timer synchronous start counting function of specified channel(s).

Note
All channels share channel 0's setting.

Definition at line 125 of file bpwm.h.

◆ BPWM_GET_CAPTURE_FALLING_DATA

#define BPWM_GET_CAPTURE_FALLING_DATA (   bpwm,
  u32ChannelNum 
)

This macro get captured falling data.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 174 of file bpwm.h.

◆ BPWM_GET_CAPTURE_RISING_DATA

#define BPWM_GET_CAPTURE_RISING_DATA (   bpwm,
  u32ChannelNum 
)

This macro get captured rising data.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 165 of file bpwm.h.

◆ BPWM_GET_CMR

#define BPWM_GET_CMR (   bpwm,
  u32ChannelNum 
)

This macro get the duty of the selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
None

Definition at line 221 of file bpwm.h.

◆ BPWM_GET_CNR

#define BPWM_GET_CNR (   bpwm,
  u32ChannelNum 
)

This macro get the period of all channels.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

Definition at line 242 of file bpwm.h.

◆ BPWM_MASK_OUTPUT

#define BPWM_MASK_OUTPUT (   bpwm,
  u32ChannelMask,
  u32LevelMask 
)

This macro mask output logic to high or low.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32LevelMaskOutput logic to high or low
Returns
None

This macro is used to mask output logic to high or low of specified channel(s).

Note
If u32ChannelMask parameter is 0, then mask function will be disabled.

Definition at line 187 of file bpwm.h.

◆ BPWM_SET_ALIGNED_TYPE

#define BPWM_SET_ALIGNED_TYPE (   bpwm,
  u32ChannelMask,
  u32AlignedType 
)

This macro set the BPWM aligned type.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
[in]u32AlignedTypeBPWM aligned type, valid values are:
Returns
None
Note
All channels share channel 0's setting.

Definition at line 255 of file bpwm.h.

◆ BPWM_SET_CMR

#define BPWM_SET_CMR (   bpwm,
  u32ChannelNum,
  u32CMR 
)

This macro set the duty of the selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM 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 BPWM period

Definition at line 212 of file bpwm.h.

◆ BPWM_SET_CNR

#define BPWM_SET_CNR (   bpwm,
  u32ChannelNum,
  u32CNR 
)

This macro set the period of all channels.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. This parameter is not used.
[in]u32CNRPeriod of specified channel. Valid values are between 0~0xFFFF
Returns
None
Note
This new setting will take effect on next BPWM period
BPWM counter will stop if period length set to 0

Definition at line 233 of file bpwm.h.

◆ BPWM_SET_OUTPUT_LEVEL

#define BPWM_SET_OUTPUT_LEVEL (   bpwm,
  u32ChannelMask,
  u32ZeroLevel,
  u32CmpUpLevel,
  u32PeriodLevel,
  u32CmpDownLevel 
)

Set output level at zero, compare up, period(center) and compare down of specified channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32ZeroLeveloutput level at zero point, valid values are:
[in]u32CmpUpLeveloutput level at compare up point, valid values are:
[in]u32PeriodLeveloutput level at period(center) point, valid values are:
[in]u32CmpDownLeveloutput level at compare down point, valid values are:
Returns
None

This macro is used to Set output level at zero, compare up, period(center) and compare down of specified channel(s)

Definition at line 296 of file bpwm.h.

◆ BPWM_SET_PRESCALER

#define BPWM_SET_PRESCALER (   bpwm,
  u32ChannelNum,
  u32Prescaler 
)

This macro set the prescaler of all channels.

Parameters
[in]bpwmThe pointer of the specified BPWM module
[in]u32ChannelNumBPWM channel number. This parameter is not used.
[in]u32PrescalerClock prescaler of specified channel. Valid values are between 1 ~ 0xFFF
Returns
None

Definition at line 201 of file bpwm.h.

◆ BPWM_TRIGGER_SYNC_START

#define BPWM_TRIGGER_SYNC_START (   bpwm)

This macro enable BPWM counter synchronous start counting function.

Parameters
[in]bpwmThe pointer of the specified BPWM module
Returns
None

This macro is used to make selected BPWM0 and BPWM1 channel(s) start counting at the same time. To configure synchronous start counting channel(s) by BPWM_ENABLE_TIMER_SYNC() and BPWM_DISABLE_TIMER_SYNC().

Definition at line 146 of file bpwm.h.

Function Documentation

◆ BPWM_ClearADCTriggerFlag()

void BPWM_ClearADCTriggerFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Clear selected channel trigger ADC flag.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32ConditionThis parameter is not used
Returns
None

This function is used to clear selected channel trigger ADC flag

Definition at line 314 of file bpwm.c.

◆ BPWM_ClearCaptureIntFlag()

void BPWM_ClearCaptureIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Clear capture interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to clear capture interrupt of selected channel.

Definition at line 442 of file bpwm.c.

◆ BPWM_ClearDutyIntFlag()

void BPWM_ClearDutyIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Clear duty interrupt flag of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear duty interrupt flag of selected channel

Definition at line 505 of file bpwm.c.

◆ BPWM_ClearPeriodIntFlag()

void BPWM_ClearPeriodIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Clear period interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to clear period interrupt of selected channel

Note
All channels share channel 0's setting.

Definition at line 567 of file bpwm.c.

◆ BPWM_ClearWrapAroundFlag()

void BPWM_ClearWrapAroundFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Clear the time-base counter reached its maximum value flag of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to clear the time-base counter reached its maximum value flag of selected channel.

Note
All channels share channel 0's setting.

Definition at line 733 of file bpwm.c.

◆ BPWM_ClearZeroIntFlag()

void BPWM_ClearZeroIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Clear zero interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to clear zero interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 629 of file bpwm.c.

◆ BPWM_ConfigCaptureChannel()

uint32_t BPWM_ConfigCaptureChannel ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32UnitTimeNsec,
uint32_t  u32CaptureEdge 
)

Configure BPWM capture and get the nearest unit time.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32UnitTimeNsecThe unit time of counter
[in]u32CaptureEdgeThe condition to latch the counter. This parameter is not used
Returns
The nearest unit time in nano second.

This function is used to Configure BPWM capture and get the nearest unit time.

Definition at line 35 of file bpwm.c.

◆ BPWM_ConfigOutputChannel()

uint32_t BPWM_ConfigOutputChannel ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Frequency,
uint32_t  u32DutyCycle 
)

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

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM 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 all channels shares a prescaler. Call this API to configure BPWM frequency may affect existing frequency of other channel.

Definition at line 130 of file bpwm.c.

◆ BPWM_DisableADCTrigger()

void BPWM_DisableADCTrigger ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Disable selected channel to trigger ADC.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~3
Returns
None

This function is used to disable selected channel to trigger ADC

Definition at line 292 of file bpwm.c.

◆ BPWM_DisableCapture()

void BPWM_DisableCapture ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Disable capture of selected channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to disable capture of selected channel(s)

Definition at line 360 of file bpwm.c.

◆ BPWM_DisableCaptureInt()

void BPWM_DisableCaptureInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Disable capture interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to disable capture interrupt of selected channel.

Definition at line 425 of file bpwm.c.

◆ BPWM_DisableDutyInt()

void BPWM_DisableDutyInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Disable duty interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable duty interrupt of selected channel

Definition at line 490 of file bpwm.c.

◆ BPWM_DisableLoadMode()

void BPWM_DisableLoadMode ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32LoadMode 
)

Disable load mode of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32LoadModePWM counter loading mode.
Returns
None

This function is used to disable load mode of selected channel.

Definition at line 680 of file bpwm.c.

◆ BPWM_DisableOutput()

void BPWM_DisableOutput ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Disables BPWM output generation of selected channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[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

This function is used to disables BPWM output generation of selected channel(s)

Definition at line 391 of file bpwm.c.

◆ BPWM_DisablePeriodInt()

void BPWM_DisablePeriodInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Disable period interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to disable period interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 552 of file bpwm.c.

◆ BPWM_DisableZeroInt()

void BPWM_DisableZeroInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Disable zero interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to disable zero interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 614 of file bpwm.c.

◆ BPWM_EnableADCTrigger()

void BPWM_EnableADCTrigger ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Enable selected channel to trigger ADC.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32ConditionThe condition to trigger ADC. Combination of following conditions:
Returns
None

This function is used to enable selected channel to trigger ADC

Definition at line 269 of file bpwm.c.

◆ BPWM_EnableCapture()

void BPWM_EnableCapture ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Enable capture of selected channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to enable capture of selected channel(s)

Definition at line 344 of file bpwm.c.

◆ BPWM_EnableCaptureInt()

void BPWM_EnableCaptureInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Enable capture interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to enable capture interrupt of selected channel.

Definition at line 408 of file bpwm.c.

◆ BPWM_EnableDutyInt()

void BPWM_EnableDutyInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntDutyType 
)

Enable duty interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32IntDutyTypeDuty interrupt type, could be either
Returns
None

This function is used to enable duty interrupt of selected channel.

Definition at line 476 of file bpwm.c.

◆ BPWM_EnableLoadMode()

void BPWM_EnableLoadMode ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32LoadMode 
)

Enable load mode of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
[in]u32LoadModeBPWM counter loading mode.
Returns
None

This function is used to enable load mode of selected channel.

Definition at line 663 of file bpwm.c.

◆ BPWM_EnableOutput()

void BPWM_EnableOutput ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Enables BPWM output generation of selected channel(s)

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[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

This function is used to enables BPWM output generation of selected channel(s)

Definition at line 376 of file bpwm.c.

◆ BPWM_EnablePeriodInt()

void BPWM_EnablePeriodInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntPeriodType 
)

Enable period interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
[in]u32IntPeriodTypePeriod interrupt type. This parameter is not used.
Returns
None

This function is used to enable period interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 537 of file bpwm.c.

◆ BPWM_EnableZeroInt()

void BPWM_EnableZeroInt ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Enable zero interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
None

This function is used to enable zero interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 599 of file bpwm.c.

◆ BPWM_ForceStop()

void BPWM_ForceStop ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Stop BPWM generation immediately by clear channel enable bit.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
Returns
None

This function is used to stop BPWM generation immediately by clear channel enable bit.

Note
All channels share one counter.

Definition at line 247 of file bpwm.c.

◆ BPWM_GetADCTriggerFlag()

uint32_t BPWM_GetADCTriggerFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get selected channel trigger ADC flag.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Return values
0The specified channel trigger ADC to start of conversion flag is not set
1The specified channel trigger ADC to start of conversion flag is set

This function is used to get BPWM trigger ADC to start of conversion flag for specified channel

Definition at line 329 of file bpwm.c.

◆ BPWM_GetCaptureIntFlag()

uint32_t BPWM_GetCaptureIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get capture interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Return values
0No capture interrupt
1Rising edge latch interrupt
2Falling edge latch interrupt
3Rising and falling latch interrupt

This function is used to get capture interrupt of selected channel.

Definition at line 459 of file bpwm.c.

◆ BPWM_GetDutyIntFlag()

uint32_t BPWM_GetDutyIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get duty interrupt flag of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. Valid values are between 0~5
Returns
Duty interrupt flag of specified channel
Return values
0Duty interrupt did not occur
1Duty interrupt occurred

This function is used to get duty interrupt flag of selected channel

Definition at line 521 of file bpwm.c.

◆ BPWM_GetPeriodIntFlag()

uint32_t BPWM_GetPeriodIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get period interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
Period interrupt flag of specified channel
Return values
0Period interrupt did not occur
1Period interrupt occurred

This function is used to get period interrupt of selected channel

Note
All channels share channel 0's setting.

Definition at line 584 of file bpwm.c.

◆ BPWM_GetWrapAroundFlag()

uint32_t BPWM_GetWrapAroundFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get the time-base counter reached its maximum value flag of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
Count to max interrupt flag of specified channel
Return values
0Count to max interrupt did not occur
1Count to max interrupt occurred

This function is used to get the time-base counter reached its maximum value flag of selected channel.

Note
All channels share channel 0's setting.

Definition at line 718 of file bpwm.c.

◆ BPWM_GetZeroIntFlag()

uint32_t BPWM_GetZeroIntFlag ( BPWM_T bpwm,
uint32_t  u32ChannelNum 
)

Get zero interrupt of selected channel.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
Returns
zero interrupt flag of specified channel
Return values
0zero interrupt did not occur
1zero interrupt occurred

This function is used to get zero interrupt of selected channel.

Note
All channels share channel 0's setting.

Definition at line 646 of file bpwm.c.

◆ BPWM_SetClockSource()

void BPWM_SetClockSource ( BPWM_T bpwm,
uint32_t  u32ChannelNum,
uint32_t  u32ClkSrcSel 
)

Set BPWM clock source.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelNumBPWM channel number. This parameter is not used.
[in]u32ClkSrcSelBPWM external clock source.
Returns
None

This function is used to set BPWM clock source.

Note
All channels share channel 0's setting.

Definition at line 701 of file bpwm.c.

◆ BPWM_Start()

void BPWM_Start ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Start BPWM module.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
Returns
None

This function is used to start BPWM module.

Note
All channels share one counter.

Definition at line 217 of file bpwm.c.

◆ BPWM_Stop()

void BPWM_Stop ( BPWM_T bpwm,
uint32_t  u32ChannelMask 
)

Stop BPWM module.

Parameters
[in]bpwmThe pointer of the specified BPWM module
  • BPWM0 : BPWM Group 0
  • BPWM1 : BPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. This parameter is not used.
Returns
None

This function is used to stop BPWM module.

Note
All channels share one period.

Definition at line 232 of file bpwm.c.