![]() |
M480 BSP V3.05.006
The Board Support Package for M480 Series
|
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... | |
#define BPWM_CLR_COUNTER | ( | bpwm, | |
u32ChannelMask | |||
) |
#define BPWM_DISABLE_TIMER_SYNC | ( | bpwm, | |
u32ChannelMask | |||
) |
Disable timer synchronous start counting function of specified channel(s)
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
This macro is used to disable timer synchronous start counting function of specified channel(s).
#define BPWM_ENABLE_OUTPUT_INVERTER | ( | bpwm, | |
u32ChannelMask | |||
) |
This macro enable output inverter of specified channel(s)
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
#define BPWM_ENABLE_TIMER_SYNC | ( | bpwm, | |
u32ChannelMask, | |||
u32SyncSrc | |||
) |
Enable timer synchronous start counting function of specified channel(s)
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
[in] | u32SyncSrc | Synchronous start source selection, valid values are: |
This macro is used to enable timer synchronous start counting function of specified channel(s).
#define BPWM_GET_CAPTURE_FALLING_DATA | ( | bpwm, | |
u32ChannelNum | |||
) |
#define BPWM_GET_CAPTURE_RISING_DATA | ( | bpwm, | |
u32ChannelNum | |||
) |
#define BPWM_GET_CMR | ( | bpwm, | |
u32ChannelNum | |||
) |
#define BPWM_GET_CNR | ( | bpwm, | |
u32ChannelNum | |||
) |
#define BPWM_MASK_OUTPUT | ( | bpwm, | |
u32ChannelMask, | |||
u32LevelMask | |||
) |
This macro mask output logic to high or low.
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
[in] | u32LevelMask | Output logic to high or low |
This macro is used to mask output logic to high or low of specified channel(s).
#define BPWM_SET_ALIGNED_TYPE | ( | bpwm, | |
u32ChannelMask, | |||
u32AlignedType | |||
) |
This macro set the BPWM aligned type.
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
[in] | u32AlignedType | BPWM aligned type, valid values are: |
#define BPWM_SET_CMR | ( | bpwm, | |
u32ChannelNum, | |||
u32CMR | |||
) |
This macro set the duty of the selected channel.
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32CMR | Duty of specified channel. Valid values are between 0~0xFFFF |
#define BPWM_SET_CNR | ( | bpwm, | |
u32ChannelNum, | |||
u32CNR | |||
) |
This macro set the period of all channels.
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
[in] | u32CNR | Period of specified channel. Valid values are between 0~0xFFFF |
#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)
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
[in] | u32ZeroLevel | output level at zero point, valid values are: |
[in] | u32CmpUpLevel | output level at compare up point, valid values are: |
[in] | u32PeriodLevel | output level at period(center) point, valid values are: |
[in] | u32CmpDownLevel | output level at compare down point, valid values are: |
This macro is used to Set output level at zero, compare up, period(center) and compare down of specified channel(s)
#define BPWM_SET_PRESCALER | ( | bpwm, | |
u32ChannelNum, | |||
u32Prescaler | |||
) |
This macro set the prescaler of all channels.
[in] | bpwm | The pointer of the specified BPWM module |
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
[in] | u32Prescaler | Clock prescaler of specified channel. Valid values are between 1 ~ 0xFFF |
#define BPWM_TRIGGER_SYNC_START | ( | bpwm | ) |
This macro enable BPWM counter synchronous start counting function.
[in] | bpwm | The pointer of the specified BPWM module |
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().
void BPWM_ClearADCTriggerFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Clear selected channel trigger ADC flag.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Condition | This parameter is not used |
This function is used to clear selected channel trigger ADC flag
void BPWM_ClearCaptureIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Clear capture interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Edge | Rising or falling edge to latch counter. |
This function is used to clear capture interrupt of selected channel.
void BPWM_ClearDutyIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Clear duty interrupt flag of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
This function is used to clear duty interrupt flag of selected channel
void BPWM_ClearPeriodIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Clear period interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to clear period interrupt of selected channel
void BPWM_ClearWrapAroundFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Clear the time-base counter reached its maximum value flag of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to clear the time-base counter reached its maximum value flag of selected channel.
void BPWM_ClearZeroIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Clear zero interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to clear zero interrupt of selected channel.
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.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32UnitTimeNsec | The unit time of counter |
[in] | u32CaptureEdge | The condition to latch the counter. This parameter is not used |
This function is used to Configure BPWM capture and get the nearest unit time.
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.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Frequency | Target generator frequency |
[in] | u32DutyCycle | Target generator duty cycle percentage. Valid range are between 0 ~ 100. 10 means 10%, 20 means 20%... |
void BPWM_DisableADCTrigger | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Disable selected channel to trigger ADC.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~3 |
This function is used to disable selected channel to trigger ADC
void BPWM_DisableCapture | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Disable capture of selected channel(s)
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1... |
This function is used to disable capture of selected channel(s)
void BPWM_DisableCaptureInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Disable capture interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Edge | Rising or falling edge to latch counter. |
This function is used to disable capture interrupt of selected channel.
void BPWM_DisableDutyInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Disable duty interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
This function is used to disable duty interrupt of selected channel
void BPWM_DisableLoadMode | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32LoadMode | ||
) |
Disable load mode of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32LoadMode | PWM counter loading mode. |
This function is used to disable load mode of selected channel.
void BPWM_DisableOutput | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Disables BPWM output generation of selected channel(s)
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination 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... |
This function is used to disables BPWM output generation of selected channel(s)
void BPWM_DisablePeriodInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Disable period interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to disable period interrupt of selected channel.
void BPWM_DisableZeroInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Disable zero interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to disable zero interrupt of selected channel.
void BPWM_EnableADCTrigger | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Enable selected channel to trigger ADC.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Condition | The condition to trigger ADC. Combination of following conditions: |
This function is used to enable selected channel to trigger ADC
void BPWM_EnableCapture | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Enable capture of selected channel(s)
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1... |
This function is used to enable capture of selected channel(s)
void BPWM_EnableCaptureInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Enable capture interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32Edge | Rising or falling edge to latch counter. |
This function is used to enable capture interrupt of selected channel.
void BPWM_EnableDutyInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32IntDutyType | ||
) |
Enable duty interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32IntDutyType | Duty interrupt type, could be either |
This function is used to enable duty interrupt of selected channel.
void BPWM_EnableLoadMode | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32LoadMode | ||
) |
Enable load mode of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
[in] | u32LoadMode | BPWM counter loading mode. |
This function is used to enable load mode of selected channel.
void BPWM_EnableOutput | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Enables BPWM output generation of selected channel(s)
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination 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... |
This function is used to enables BPWM output generation of selected channel(s)
void BPWM_EnablePeriodInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32IntPeriodType | ||
) |
Enable period interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
[in] | u32IntPeriodType | Period interrupt type. This parameter is not used. |
This function is used to enable period interrupt of selected channel.
void BPWM_EnableZeroInt | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Enable zero interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
This function is used to enable zero interrupt of selected channel.
void BPWM_ForceStop | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Stop BPWM generation immediately by clear channel enable bit.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
This function is used to stop BPWM generation immediately by clear channel enable bit.
uint32_t BPWM_GetADCTriggerFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get selected channel trigger ADC flag.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
0 | The specified channel trigger ADC to start of conversion flag is not set |
1 | The 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
uint32_t BPWM_GetCaptureIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get capture interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
0 | No capture interrupt |
1 | Rising edge latch interrupt |
2 | Falling edge latch interrupt |
3 | Rising and falling latch interrupt |
This function is used to get capture interrupt of selected channel.
uint32_t BPWM_GetDutyIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get duty interrupt flag of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. Valid values are between 0~5 |
0 | Duty interrupt did not occur |
1 | Duty interrupt occurred |
This function is used to get duty interrupt flag of selected channel
uint32_t BPWM_GetPeriodIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get period interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
0 | Period interrupt did not occur |
1 | Period interrupt occurred |
This function is used to get period interrupt of selected channel
uint32_t BPWM_GetWrapAroundFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get the time-base counter reached its maximum value flag of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
0 | Count to max interrupt did not occur |
1 | Count to max interrupt occurred |
This function is used to get the time-base counter reached its maximum value flag of selected channel.
uint32_t BPWM_GetZeroIntFlag | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum | ||
) |
Get zero interrupt of selected channel.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
0 | zero interrupt did not occur |
1 | zero interrupt occurred |
This function is used to get zero interrupt of selected channel.
void BPWM_SetClockSource | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32ClkSrcSel | ||
) |
Set BPWM clock source.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelNum | BPWM channel number. This parameter is not used. |
[in] | u32ClkSrcSel | BPWM external clock source. |
This function is used to set BPWM clock source.
void BPWM_Start | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Start BPWM module.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
This function is used to start BPWM module.
void BPWM_Stop | ( | BPWM_T * | bpwm, |
uint32_t | u32ChannelMask | ||
) |
Stop BPWM module.
[in] | bpwm | The pointer of the specified BPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. This parameter is not used. |
This function is used to stop BPWM module.