![]() |
M480 BSP
V3.05.001
The Board Support Package for M480 Series
|
M480 series PWM driver header file. More...
Go to the source code of this file.
Macros | |
| #define | BPWM_CHANNEL_NUM |
| #define | BPWM_CH_0_MASK |
| #define | BPWM_CH_1_MASK |
| #define | BPWM_CH_2_MASK |
| #define | BPWM_CH_3_MASK |
| #define | BPWM_CH_4_MASK |
| #define | BPWM_CH_5_MASK |
| #define | BPWM_UP_COUNTER |
| #define | BPWM_DOWN_COUNTER |
| #define | BPWM_UP_DOWN_COUNTER |
| #define | BPWM_EDGE_ALIGNED |
| #define | BPWM_CENTER_ALIGNED |
| #define | BPWM_OUTPUT_NOTHING |
| #define | BPWM_OUTPUT_LOW |
| #define | BPWM_OUTPUT_HIGH |
| #define | BPWM_OUTPUT_TOGGLE |
| #define | BPWM_SSCTL_SSRC_PWM0 (0UL<<BPWM_SSCTL_SSRC_Pos) |
| #define | BPWM_SSCTL_SSRC_PWM1 (1UL<<BPWM_SSCTL_SSRC_Pos) |
| #define | BPWM_SSCTL_SSRC_BPWM0 (2UL<<BPWM_SSCTL_SSRC_Pos) |
| #define | BPWM_SSCTL_SSRC_BPWM1 (3UL<<BPWM_SSCTL_SSRC_Pos) |
| #define | BPWM_TRIGGER_ADC_EVEN_ZERO_POINT |
| #define | BPWM_TRIGGER_ADC_EVEN_PERIOD_POINT |
| #define | BPWM_TRIGGER_ADC_EVEN_ZERO_OR_PERIOD_POINT |
| #define | BPWM_TRIGGER_ADC_EVEN_CMP_UP_COUNT_POINT |
| #define | BPWM_TRIGGER_ADC_EVEN_CMP_DOWN_COUNT_POINT |
| #define | BPWM_TRIGGER_ADC_ODD_CMP_UP_COUNT_POINT |
| #define | BPWM_TRIGGER_ADC_ODD_CMP_DOWN_COUNT_POINT |
| #define | BPWM_CAPTURE_INT_RISING_LATCH |
| #define | BPWM_CAPTURE_INT_FALLING_LATCH |
| #define | BPWM_DUTY_INT_DOWN_COUNT_MATCH_CMP |
| #define | BPWM_DUTY_INT_UP_COUNT_MATCH_CMP |
| #define | BPWM_LOAD_MODE_IMMEDIATE |
| #define | BPWM_LOAD_MODE_CENTER |
| #define | BPWM_CLKSRC_BPWM_CLK |
| #define | BPWM_CLKSRC_TIMER0 |
| #define | BPWM_CLKSRC_TIMER1 |
| #define | BPWM_CLKSRC_TIMER2 |
| #define | BPWM_CLKSRC_TIMER3 |
| #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... | |
M480 series PWM driver header file.
Definition in file bpwm.h.
1.8.15