![]() |
M480 BSP V3.05.005
The Board Support Package for M480 Series
|
Macros | |
#define | EPWM_ENABLE_COMPLEMENTARY_MODE(epwm) |
This macro enable complementary mode. More... | |
#define | EPWM_DISABLE_COMPLEMENTARY_MODE(epwm) |
This macro disable complementary mode, and enable independent mode. More... | |
#define | EPWM_ENABLE_GROUP_MODE(epwm) |
This macro enable group mode. More... | |
#define | EPWM_DISABLE_GROUP_MODE(epwm) |
This macro disable group mode. More... | |
#define | EPWM_ENABLE_TIMER_SYNC(epwm, u32ChannelMask, u32SyncSrc) |
Enable timer synchronous start counting function of specified channel(s) More... | |
#define | EPWM_DISABLE_TIMER_SYNC(epwm, u32ChannelMask) |
Disable timer synchronous start counting function of specified channel(s) More... | |
#define | EPWM_TRIGGER_SYNC_START(epwm) |
This macro enable EPWM counter synchronous start counting function. More... | |
#define | EPWM_ENABLE_OUTPUT_INVERTER(epwm, u32ChannelMask) |
This macro enable output inverter of specified channel(s) More... | |
#define | EPWM_GET_CAPTURE_RISING_DATA(epwm, u32ChannelNum) |
This macro get captured rising data. More... | |
#define | EPWM_GET_CAPTURE_FALLING_DATA(epwm, u32ChannelNum) |
This macro get captured falling data. More... | |
#define | EPWM_MASK_OUTPUT(epwm, u32ChannelMask, u32LevelMask) |
This macro mask output logic to high or low. More... | |
#define | EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescaler) |
This macro set the prescaler of the selected channel. More... | |
#define | EPWM_GET_PRESCALER(epwm, u32ChannelNum) |
This macro get the prescaler of the selected channel. More... | |
#define | EPWM_SET_CMR(epwm, u32ChannelNum, u32CMR) |
This macro set the comparator of the selected channel. More... | |
#define | EPWM_GET_CMR(epwm, u32ChannelNum) |
This macro get the comparator of the selected channel. More... | |
#define | EPWM_SET_FTCMR(epwm, u32ChannelNum, u32FTCMR) |
This macro set the free trigger comparator of the selected channel. More... | |
#define | EPWM_SET_CNR(epwm, u32ChannelNum, u32CNR) |
This macro set the period of the selected channel. More... | |
#define | EPWM_GET_CNR(epwm, u32ChannelNum) |
This macro get the period of the selected channel. More... | |
#define | EPWM_SET_ALIGNED_TYPE(epwm, u32ChannelMask, u32AlignedType) |
This macro set the EPWM aligned type. More... | |
#define | EPWM_SET_LOAD_WINDOW(epwm, u32ChannelMask) |
Set load window of window loading mode for specified channel(s) More... | |
#define | EPWM_TRIGGER_SYNC(epwm, u32ChannelNum) |
Trigger synchronous event from specified channel(s) More... | |
#define | EPWM_CLR_COUNTER(epwm, u32ChannelMask) |
Clear counter of specified channel(s) More... | |
#define | EPWM_SET_OUTPUT_LEVEL(epwm, u32ChannelMask, u32ZeroLevel, u32CmpUpLevel, u32PeriodLevel, u32CmpDownLevel) |
Set output level at zero, compare up, period(center) and compare down of specified channel(s) More... | |
#define | EPWM_TRIGGER_BRAKE(epwm, u32ChannelMask, u32BrakeType) |
Trigger brake event from specified channel(s) More... | |
#define | EPWM_SET_DEADZONE_CLK_SRC(epwm, u32ChannelNum, u32AfterPrescaler) |
Set Dead zone clock source. More... | |
Functions | |
uint32_t | EPWM_ConfigCaptureChannel (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge) |
Configure EPWM capture and get the nearest unit time. More... | |
uint32_t | EPWM_ConfigOutputChannel (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle) |
This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type) auto-reload mode. More... | |
void | EPWM_Start (EPWM_T *epwm, uint32_t u32ChannelMask) |
Start EPWM module. More... | |
void | EPWM_Stop (EPWM_T *epwm, uint32_t u32ChannelMask) |
Stop EPWM module. More... | |
void | EPWM_ForceStop (EPWM_T *epwm, uint32_t u32ChannelMask) |
Stop EPWM generation immediately by clear channel enable bit. More... | |
void | EPWM_EnableADCTrigger (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition) |
Enable selected channel to trigger ADC. More... | |
void | EPWM_DisableADCTrigger (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable selected channel to trigger ADC. More... | |
int32_t | EPWM_EnableADCTriggerPrescale (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, uint32_t u32PrescaleCnt) |
Enable and configure trigger ADC prescale. More... | |
void | EPWM_DisableADCTriggerPrescale (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable Trigger ADC prescale function. More... | |
void | EPWM_ClearADCTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition) |
Clear selected channel trigger ADC flag. More... | |
uint32_t | EPWM_GetADCTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get selected channel trigger ADC flag. More... | |
void | EPWM_EnableDACTrigger (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition) |
Enable selected channel to trigger DAC. More... | |
void | EPWM_DisableDACTrigger (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable selected channel to trigger DAC. More... | |
void | EPWM_ClearDACTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition) |
Clear selected channel trigger DAC flag. More... | |
uint32_t | EPWM_GetDACTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get selected channel trigger DAC flag. More... | |
void | EPWM_EnableFaultBrake (EPWM_T *epwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource) |
This function enable fault brake of selected channel(s) More... | |
void | EPWM_EnableCapture (EPWM_T *epwm, uint32_t u32ChannelMask) |
Enable capture of selected channel(s) More... | |
void | EPWM_DisableCapture (EPWM_T *epwm, uint32_t u32ChannelMask) |
Disable capture of selected channel(s) More... | |
void | EPWM_EnableOutput (EPWM_T *epwm, uint32_t u32ChannelMask) |
Enables EPWM output generation of selected channel(s) More... | |
void | EPWM_DisableOutput (EPWM_T *epwm, uint32_t u32ChannelMask) |
Disables EPWM output generation of selected channel(s) More... | |
void | EPWM_EnablePDMA (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode) |
Enables PDMA transfer of selected channel for EPWM capture. More... | |
void | EPWM_DisablePDMA (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disables PDMA transfer of selected channel for EPWM capture. More... | |
void | EPWM_EnableDeadZone (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Duration) |
Enable Dead zone of selected channel. More... | |
void | EPWM_DisableDeadZone (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable Dead zone of selected channel. More... | |
void | EPWM_EnableCaptureInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge) |
Enable capture interrupt of selected channel. More... | |
void | EPWM_DisableCaptureInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge) |
Disable capture interrupt of selected channel. More... | |
void | EPWM_ClearCaptureIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge) |
Clear capture interrupt of selected channel. More... | |
uint32_t | EPWM_GetCaptureIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get capture interrupt of selected channel. More... | |
void | EPWM_EnableDutyInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType) |
Enable duty interrupt of selected channel. More... | |
void | EPWM_DisableDutyInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable duty interrupt of selected channel. More... | |
void | EPWM_ClearDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear duty interrupt flag of selected channel. More... | |
uint32_t | EPWM_GetDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get duty interrupt flag of selected channel. More... | |
void | EPWM_EnableFaultBrakeInt (EPWM_T *epwm, uint32_t u32BrakeSource) |
This function enable fault brake interrupt. More... | |
void | EPWM_DisableFaultBrakeInt (EPWM_T *epwm, uint32_t u32BrakeSource) |
This function disable fault brake interrupt. More... | |
void | EPWM_ClearFaultBrakeIntFlag (EPWM_T *epwm, uint32_t u32BrakeSource) |
This function clear fault brake interrupt of selected source. More... | |
uint32_t | EPWM_GetFaultBrakeIntFlag (EPWM_T *epwm, uint32_t u32BrakeSource) |
This function get fault brake interrupt flag of selected source. More... | |
void | EPWM_EnablePeriodInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType) |
Enable period interrupt of selected channel. More... | |
void | EPWM_DisablePeriodInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable period interrupt of selected channel. More... | |
void | EPWM_ClearPeriodIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear period interrupt of selected channel. More... | |
uint32_t | EPWM_GetPeriodIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get period interrupt of selected channel. More... | |
void | EPWM_EnableZeroInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable zero interrupt of selected channel. More... | |
void | EPWM_DisableZeroInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable zero interrupt of selected channel. More... | |
void | EPWM_ClearZeroIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear zero interrupt of selected channel. More... | |
uint32_t | EPWM_GetZeroIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get zero interrupt of selected channel. More... | |
void | EPWM_EnableAcc (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc) |
Enable interrupt flag accumulator of selected channel. More... | |
void | EPWM_DisableAcc (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable interrupt flag accumulator of selected channel. More... | |
void | EPWM_EnableAccInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable interrupt flag accumulator interrupt of selected channel. More... | |
void | EPWM_DisableAccInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable interrupt flag accumulator interrupt of selected channel. More... | |
void | EPWM_ClearAccInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear interrupt flag accumulator interrupt of selected channel. More... | |
uint32_t | EPWM_GetAccInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get interrupt flag accumulator interrupt of selected channel. More... | |
void | EPWM_EnableAccPDMA (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable accumulator PDMA of selected channel. More... | |
void | EPWM_DisableAccPDMA (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable accumulator PDMA of selected channel. More... | |
void | EPWM_EnableAccStopMode (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable interrupt flag accumulator stop mode of selected channel. More... | |
void | EPWM_DisableAccStopMode (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable interrupt flag accumulator stop mode of selected channel. More... | |
void | EPWM_ClearFTDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear free trigger duty interrupt flag of selected channel. More... | |
uint32_t | EPWM_GetFTDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get free trigger duty interrupt flag of selected channel. More... | |
void | EPWM_EnableLoadMode (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode) |
Enable load mode of selected channel. More... | |
void | EPWM_DisableLoadMode (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode) |
Disable load mode of selected channel. More... | |
void | EPWM_ConfigSyncPhase (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase) |
Configure synchronization phase of selected channel. More... | |
void | EPWM_EnableSyncPhase (EPWM_T *epwm, uint32_t u32ChannelMask) |
Enable SYNC phase of selected channel(s) More... | |
void | EPWM_DisableSyncPhase (EPWM_T *epwm, uint32_t u32ChannelMask) |
Disable SYNC phase of selected channel(s) More... | |
void | EPWM_EnableSyncNoiseFilter (EPWM_T *epwm, uint32_t u32ClkCnt, uint32_t u32ClkDivSel) |
Enable EPWM SYNC_IN noise filter function. More... | |
void | EPWM_DisableSyncNoiseFilter (EPWM_T *epwm) |
Disable EPWM SYNC_IN noise filter function. More... | |
void | EPWM_EnableSyncPinInverse (EPWM_T *epwm) |
Enable EPWM SYNC input pin inverse function. More... | |
void | EPWM_DisableSyncPinInverse (EPWM_T *epwm) |
Disable EPWM SYNC input pin inverse function. More... | |
void | EPWM_SetClockSource (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel) |
Set EPWM clock source. More... | |
void | EPWM_EnableBrakeNoiseFilter (EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32ClkCnt, uint32_t u32ClkDivSel) |
Enable EPWM brake noise filter function. More... | |
void | EPWM_DisableBrakeNoiseFilter (EPWM_T *epwm, uint32_t u32BrakePinNum) |
Disable EPWM brake noise filter function. More... | |
void | EPWM_EnableBrakePinInverse (EPWM_T *epwm, uint32_t u32BrakePinNum) |
Enable EPWM brake pin inverse function. More... | |
void | EPWM_DisableBrakePinInverse (EPWM_T *epwm, uint32_t u32BrakePinNum) |
Disable EPWM brake pin inverse function. More... | |
void | EPWM_SetBrakePinSource (EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32SelAnotherModule) |
Set EPWM brake pin source. More... | |
void | EPWM_SetLeadingEdgeBlanking (EPWM_T *epwm, uint32_t u32TrigSrcSel, uint32_t u32TrigType, uint32_t u32BlankingCnt, uint32_t u32BlankingEnable) |
Set EPWM leading edge blanking function. More... | |
uint32_t | EPWM_GetWrapAroundFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get the time-base counter reached its maximum value flag of selected channel. More... | |
void | EPWM_ClearWrapAroundFlag (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear the time-base counter reached its maximum value flag of selected channel. More... | |
void | EPWM_EnableFaultDetect (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32AfterPrescaler, uint32_t u32ClkSel) |
Enable fault detect of selected channel. More... | |
void | EPWM_DisableFaultDetect (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable fault detect of selected channel. More... | |
void | EPWM_EnableFaultDetectOutput (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable fault detect output of selected channel. More... | |
void | EPWM_DisableFaultDetectOutput (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable fault detect output of selected channel. More... | |
void | EPWM_EnableFaultDetectDeglitch (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32DeglitchSmpCycle) |
Enable fault detect deglitch function of selected channel. More... | |
void | EPWM_DisableFaultDetectDeglitch (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable fault detect deglitch function of selected channel. More... | |
void | EPWM_EnableFaultDetectMask (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32MaskCnt) |
Enable fault detect mask function of selected channel. More... | |
void | EPWM_DisableFaultDetectMask (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable fault detect mask function of selected channel. More... | |
void | EPWM_EnableFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Enable fault detect interrupt of selected channel. More... | |
void | EPWM_DisableFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Disable fault detect interrupt of selected channel. More... | |
void | EPWM_ClearFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Clear fault detect interrupt of selected channel. More... | |
uint32_t | EPWM_GetFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum) |
Get fault detect interrupt of selected channel. More... | |
#define EPWM_CLR_COUNTER | ( | epwm, | |
u32ChannelMask | |||
) |
Clear counter of specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
This macro is used to clear counter of specified channel(s).
#define EPWM_DISABLE_COMPLEMENTARY_MODE | ( | epwm | ) |
#define EPWM_DISABLE_GROUP_MODE | ( | epwm | ) |
#define EPWM_DISABLE_TIMER_SYNC | ( | epwm, | |
u32ChannelMask | |||
) |
Disable timer synchronous start counting function of specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
This macro is used to disable timer synchronous start counting function of specified channel(s).
#define EPWM_ENABLE_COMPLEMENTARY_MODE | ( | epwm | ) |
#define EPWM_ENABLE_GROUP_MODE | ( | epwm | ) |
#define EPWM_ENABLE_OUTPUT_INVERTER | ( | epwm, | |
u32ChannelMask | |||
) |
This macro enable output inverter of specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
This macro is used to enable output inverter of specified channel(s).
#define EPWM_ENABLE_TIMER_SYNC | ( | epwm, | |
u32ChannelMask, | |||
u32SyncSrc | |||
) |
Enable timer synchronous start counting function of specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
[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 EPWM_GET_CAPTURE_FALLING_DATA | ( | epwm, | |
u32ChannelNum | |||
) |
#define EPWM_GET_CAPTURE_RISING_DATA | ( | epwm, | |
u32ChannelNum | |||
) |
#define EPWM_GET_CMR | ( | epwm, | |
u32ChannelNum | |||
) |
This macro get the comparator of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This macro is used to get the comparator of specified channel.
#define EPWM_GET_CNR | ( | epwm, | |
u32ChannelNum | |||
) |
This macro get the period of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This macro is used to get the period of specified channel.
#define EPWM_GET_PRESCALER | ( | epwm, | |
u32ChannelNum | |||
) |
This macro get the prescaler of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This macro is used to get the prescaler of specified channel.
#define EPWM_MASK_OUTPUT | ( | epwm, | |
u32ChannelMask, | |||
u32LevelMask | |||
) |
This macro mask output logic to high or low.
[in] | epwm | The pointer of the specified EPWM 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 EPWM_SET_ALIGNED_TYPE | ( | epwm, | |
u32ChannelMask, | |||
u32AlignedType | |||
) |
This macro set the EPWM aligned type.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
[in] | u32AlignedType | EPWM aligned type, valid values are: |
This macro is used to set the EPWM aligned type of specified channel(s).
#define EPWM_SET_CMR | ( | epwm, | |
u32ChannelNum, | |||
u32CMR | |||
) |
This macro set the comparator of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32CMR | Comparator of specified channel. Valid values are between 0~0xFFFF |
This macro is used to set the comparator of specified channel.
#define EPWM_SET_CNR | ( | epwm, | |
u32ChannelNum, | |||
u32CNR | |||
) |
This macro set the period of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32CNR | Period of specified channel. Valid values are between 0~0xFFFF |
This macro is used to set the period of specified channel.
#define EPWM_SET_DEADZONE_CLK_SRC | ( | epwm, | |
u32ChannelNum, | |||
u32AfterPrescaler | |||
) |
Set Dead zone clock source.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32AfterPrescaler | Dead zone clock source is from prescaler output. Valid values are TRUE (after prescaler) or FALSE (before prescaler). |
This macro is used to set Dead zone clock source. Every two channels share the same setting.
#define EPWM_SET_FTCMR | ( | epwm, | |
u32ChannelNum, | |||
u32FTCMR | |||
) |
This macro set the free trigger comparator of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32FTCMR | Free trigger comparator of specified channel. Valid values are between 0~0xFFFF |
This macro is used to set the free trigger comparator of specified channel.
#define EPWM_SET_LOAD_WINDOW | ( | epwm, | |
u32ChannelMask | |||
) |
Set load window of window loading mode for specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
This macro is used to set load window of window loading mode for specified channel(s).
#define EPWM_SET_OUTPUT_LEVEL | ( | epwm, | |
u32ChannelMask, | |||
u32ZeroLevel, | |||
u32CmpUpLevel, | |||
u32PeriodLevel, | |||
u32CmpDownLevel | |||
) |
Set output level at zero, compare up, period(center) and compare down of specified channel(s)
[in] | epwm | The pointer of the specified EPWM 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 EPWM_SET_PRESCALER | ( | epwm, | |
u32ChannelNum, | |||
u32Prescaler | |||
) |
This macro set the prescaler of the selected channel.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32Prescaler | Clock prescaler of specified channel. Valid values are between 0 ~ 0xFFF |
This macro is used to set the prescaler of specified channel.
#define EPWM_TRIGGER_BRAKE | ( | epwm, | |
u32ChannelMask, | |||
u32BrakeType | |||
) |
Trigger brake event from specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 2 and bit 2 represents channel 4 |
[in] | u32BrakeType | Type of brake trigger. |
This macro is used to trigger brake event from specified channel(s).
#define EPWM_TRIGGER_SYNC | ( | epwm, | |
u32ChannelNum | |||
) |
Trigger synchronous event from specified channel(s)
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32ChannelNum | EPWM channel number. Valid values are 0, 2, 4 Bit 0 represents channel 0, bit 1 represents channel 2 and bit 2 represents channel 4 |
This macro is used to trigger synchronous event from specified channel(s).
#define EPWM_TRIGGER_SYNC_START | ( | epwm | ) |
This macro enable EPWM counter synchronous start counting function.
[in] | epwm | The pointer of the specified EPWM module |
This macro is used to make selected EPWM0 and EPWM1 channel(s) start counting at the same time. To configure synchronous start counting channel(s) by EPWM_ENABLE_TIMER_SYNC() and EPWM_DISABLE_TIMER_SYNC().
void EPWM_ClearAccInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear interrupt flag accumulator interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear interrupt flag accumulator interrupt of selected channel.
void EPWM_ClearADCTriggerFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Clear selected channel trigger ADC flag.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_ClearCaptureIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Clear capture interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_ClearDACTriggerFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Clear selected channel trigger DAC flag.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. This parameter is not used |
[in] | u32Condition | The condition to trigger DAC. This parameter is not used |
This function is used to clear selected channel trigger DAC flag.
void EPWM_ClearDutyIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear duty interrupt flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear duty interrupt flag of selected channel.
void EPWM_ClearFaultBrakeIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32BrakeSource | ||
) |
This function clear fault brake interrupt of selected source.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32BrakeSource | Fault brake source. |
This function is used to clear fault brake interrupt of selected source. The write-protection function should be disabled before using this function.
void EPWM_ClearFaultDetectInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear fault detect interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to clear fault detect interrupt of selected channel.
void EPWM_ClearFTDutyIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear free trigger duty interrupt flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear free trigger duty interrupt flag of selected channel.
void EPWM_ClearPeriodIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear period interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear period interrupt of selected channel.
void EPWM_ClearWrapAroundFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear the time-base counter reached its maximum value flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear the time-base counter reached its maximum value flag of selected channel.
void EPWM_ClearZeroIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Clear zero interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to clear zero interrupt of selected channel.
uint32_t EPWM_ConfigCaptureChannel | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32UnitTimeNsec, | ||
uint32_t | u32CaptureEdge | ||
) |
Configure EPWM capture and get the nearest unit time.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM capture and get the nearest unit time.
uint32_t EPWM_ConfigOutputChannel | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Frequency, | ||
uint32_t | u32DutyCycle | ||
) |
This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type) auto-reload mode.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_ConfigSyncPhase | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32SyncSrc, | ||
uint32_t | u32Direction, | ||
uint32_t | u32StartPhase | ||
) |
Configure synchronization phase of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32SyncSrc | EPWM synchronize source selection. |
[in] | u32Direction | Phase direction. Control EPWM counter count decrement or increment after synchronizing. |
[in] | u32StartPhase | Synchronous start phase value. Valid values are between 0~65535. |
This function is used to configure synchronization phase of selected channel.
void EPWM_DisableAcc | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable interrupt flag accumulator of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to Disable interrupt flag accumulator of selected channel.
void EPWM_DisableAccInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable interrupt flag accumulator interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable interrupt flag accumulator interrupt of selected channel.
void EPWM_DisableAccPDMA | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable accumulator PDMA of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable accumulator interrupt trigger PDMA of selected channel.
void EPWM_DisableAccStopMode | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable interrupt flag accumulator stop mode of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable interrupt flag accumulator stop mode of selected channel.
void EPWM_DisableADCTrigger | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable selected channel to trigger ADC.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable selected channel to trigger ADC.
void EPWM_DisableADCTriggerPrescale | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable Trigger ADC prescale function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable trigger ADC prescale.
void EPWM_DisableBrakeNoiseFilter | ( | EPWM_T * | epwm, |
uint32_t | u32BrakePinNum | ||
) |
Disable EPWM brake noise filter function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32BrakePinNum | Brake pin selection. Valid values are 0 or 1. |
This function is used to disable EPWM brake noise filter function.
void EPWM_DisableBrakePinInverse | ( | EPWM_T * | epwm, |
uint32_t | u32BrakePinNum | ||
) |
Disable EPWM brake pin inverse function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32BrakePinNum | Brake pin selection. Valid values are 0 or 1. |
This function is used to disable EPWM brake pin inverse function.
void EPWM_DisableCapture | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Disable capture of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 EPWM_DisableCaptureInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Disable capture interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_DisableDACTrigger | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable selected channel to trigger DAC.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable selected channel to trigger DAC.
void EPWM_DisableDeadZone | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable Dead zone of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable Dead zone of selected channel. The write-protection function should be disabled before using this function.
void EPWM_DisableDutyInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable duty interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable duty interrupt of selected channel.
void EPWM_DisableFaultBrakeInt | ( | EPWM_T * | epwm, |
uint32_t | u32BrakeSource | ||
) |
This function disable fault brake interrupt.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32BrakeSource | Fault brake source. |
This function is used to disable fault brake interrupt. The write-protection function should be disabled before using this function.
void EPWM_DisableFaultDetect | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable fault detect of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to disable fault detect of selected channel.
void EPWM_DisableFaultDetectDeglitch | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable fault detect deglitch function of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to disable fault detect deglitch function of selected channel.
void EPWM_DisableFaultDetectInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable fault detect interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to disable fault detect interrupt of selected channel.
void EPWM_DisableFaultDetectMask | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable fault detect mask function of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to disable fault detect mask function of selected channel.
void EPWM_DisableFaultDetectOutput | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable fault detect output of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to disable fault detect output of selected channel.
void EPWM_DisableLoadMode | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32LoadMode | ||
) |
Disable load mode of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32LoadMode | EPWM counter loading mode. |
This function is used to disable load mode of selected channel.
void EPWM_DisableOutput | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Disables EPWM output generation of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 disable EPWM output generation of selected channel(s).
void EPWM_DisablePDMA | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disables PDMA transfer of selected channel for EPWM capture.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. |
This function is used to enable PDMA transfer of selected channel(s) for EPWM capture.
void EPWM_DisablePeriodInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable period interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable period interrupt of selected channel.
void EPWM_DisableSyncNoiseFilter | ( | EPWM_T * | epwm | ) |
void EPWM_DisableSyncPhase | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Disable SYNC phase of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 SYNC phase of selected channel(s).
void EPWM_DisableSyncPinInverse | ( | EPWM_T * | epwm | ) |
void EPWM_DisableZeroInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Disable zero interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to disable zero interrupt of selected channel.
void EPWM_EnableAcc | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32IntFlagCnt, | ||
uint32_t | u32IntAccSrc | ||
) |
Enable interrupt flag accumulator of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32IntFlagCnt | Interrupt flag counter. Valid values are between 0~65535. |
[in] | u32IntAccSrc | Interrupt flag accumulator source selection. |
This function is used to enable interrupt flag accumulator of selected channel.
void EPWM_EnableAccInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable interrupt flag accumulator interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to enable interrupt flag accumulator interrupt of selected channel.
void EPWM_EnableAccPDMA | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable accumulator PDMA of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to enable accumulator interrupt trigger PDMA of selected channel.
void EPWM_EnableAccStopMode | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable interrupt flag accumulator stop mode of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to enable interrupt flag accumulator stop mode of selected channel.
void EPWM_EnableADCTrigger | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Enable selected channel to trigger ADC.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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.
int32_t EPWM_EnableADCTriggerPrescale | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Prescale, | ||
uint32_t | u32PrescaleCnt | ||
) |
Enable and configure trigger ADC prescale.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
[in] | u32Prescale | ADC prescale. Valid values are between 0 to 0xF. |
[in] | u32PrescaleCnt | ADC prescale counter. Valid values are between 0 to 0xF. |
0 | Success. |
-1 | Failed. |
This function is used to enable and configure trigger ADC prescale.
void EPWM_EnableBrakeNoiseFilter | ( | EPWM_T * | epwm, |
uint32_t | u32BrakePinNum, | ||
uint32_t | u32ClkCnt, | ||
uint32_t | u32ClkDivSel | ||
) |
Enable EPWM brake noise filter function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32BrakePinNum | Brake pin selection. Valid values are 0 or 1. |
[in] | u32ClkCnt | SYNC Edge Detector Filter Count. This controls the counter number of edge detector |
[in] | u32ClkDivSel | SYNC Edge Detector Filter Clock Selection. |
This function is used to enable EPWM brake noise filter function.
void EPWM_EnableBrakePinInverse | ( | EPWM_T * | epwm, |
uint32_t | u32BrakePinNum | ||
) |
Enable EPWM brake pin inverse function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32BrakePinNum | Brake pin selection. Valid values are 0 or 1. |
This function is used to enable EPWM brake pin inverse function.
void EPWM_EnableCapture | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Enable capture of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 EPWM_EnableCaptureInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Edge | ||
) |
Enable capture interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_EnableDACTrigger | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Condition | ||
) |
Enable selected channel to trigger DAC.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32Condition | The condition to trigger DAC. Combination of following conditions: |
This function is used to enable selected channel to trigger DAC.
void EPWM_EnableDeadZone | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32Duration | ||
) |
Enable Dead zone of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32Duration | Dead zone length in EPWM clock count, valid values are between 0~0xFFF, but 0 means there is no Dead zone. |
This function is used to enable Dead zone of selected channel. The write-protection function should be disabled before using this function.
void EPWM_EnableDutyInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32IntDutyType | ||
) |
Enable duty interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_EnableFaultBrake | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask, | ||
uint32_t | u32LevelMask, | ||
uint32_t | u32BrakeSource | ||
) |
This function enable fault brake of selected channel(s)
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel. |
[in] | u32LevelMask | Output high or low while fault brake occurs, each bit represent the level of a channel while fault brake occurs. Bit 0 represents channel 0, bit 1 represents channel 1... |
[in] | u32BrakeSource | Fault brake source, could be one of following source
|
This function is used to enable fault brake of selected channel(s). The write-protection function should be disabled before using this function.
void EPWM_EnableFaultBrakeInt | ( | EPWM_T * | epwm, |
uint32_t | u32BrakeSource | ||
) |
This function enable fault brake interrupt.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32BrakeSource | Fault brake source. |
This function is used to enable fault brake interrupt. The write-protection function should be disabled before using this function.
void EPWM_EnableFaultDetect | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32AfterPrescaler, | ||
uint32_t | u32ClkSel | ||
) |
Enable fault detect of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
[in] | u32AfterPrescaler | Fault Detect Clock Source is from prescaler output. Valid values are TRUE (after prescaler) or FALSE (before prescaler). |
[in] | u32ClkSel | Fault Detect Clock Select. |
This function is used to enable fault detect of selected channel.
void EPWM_EnableFaultDetectDeglitch | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32DeglitchSmpCycle | ||
) |
Enable fault detect deglitch function of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
[in] | u32DeglitchSmpCycle | Deglitch Sampling Cycle. Valid values are between 0~7. |
This function is used to enable fault detect deglitch function of selected channel.
void EPWM_EnableFaultDetectInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable fault detect interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to enable fault detect interrupt of selected channel.
void EPWM_EnableFaultDetectMask | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32MaskCnt | ||
) |
Enable fault detect mask function of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
[in] | u32MaskCnt | Transition mask counter. Valid values are between 0~0x7F. |
This function is used to enable fault detect mask function of selected channel.
void EPWM_EnableFaultDetectOutput | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable fault detect output of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
This function is used to enable fault detect output of selected channel.
void EPWM_EnableLoadMode | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32LoadMode | ||
) |
Enable load mode of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32LoadMode | EPWM counter loading mode. |
This function is used to enable load mode of selected channel.
void EPWM_EnableOutput | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Enables EPWM output generation of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 enable EPWM output generation of selected channel(s).
void EPWM_EnablePDMA | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32RisingFirst, | ||
uint32_t | u32Mode | ||
) |
Enables PDMA transfer of selected channel for EPWM capture.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. |
[in] | u32RisingFirst | The capture order is rising, falling first. Every two channels share the same setting. Valid values are TRUE and FALSE. |
[in] | u32Mode | Captured data transferred by PDMA interrupt type. It could be either |
This function is used to enable PDMA transfer of selected channel(s) for EPWM capture.
void EPWM_EnablePeriodInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32IntPeriodType | ||
) |
Enable period interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32IntPeriodType | Period interrupt type. This parameter is not used. |
This function is used to enable period interrupt of selected channel.
void EPWM_EnableSyncNoiseFilter | ( | EPWM_T * | epwm, |
uint32_t | u32ClkCnt, | ||
uint32_t | u32ClkDivSel | ||
) |
Enable EPWM SYNC_IN noise filter function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ClkCnt | SYNC Edge Detector Filter Count. This controls the counter number of edge detector. The valid value is 0~7. |
[in] | u32ClkDivSel | SYNC Edge Detector Filter Clock Selection. |
This function is used to enable EPWM SYNC_IN noise filter function.
void EPWM_EnableSyncPhase | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Enable SYNC phase of selected channel(s)
[in] | epwm | The pointer of the specified EPWM 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 SYNC phase of selected channel(s).
void EPWM_EnableSyncPinInverse | ( | EPWM_T * | epwm | ) |
void EPWM_EnableZeroInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Enable zero interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
This function is used to enable zero interrupt of selected channel.
void EPWM_ForceStop | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Stop EPWM generation immediately by clear channel enable bit.
[in] | epwm | The pointer of the specified EPWM 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 stop EPWM generation immediately by clear channel enable bit.
uint32_t EPWM_GetAccInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get interrupt flag accumulator interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
0 | Accumulator interrupt did not occur |
1 | Accumulator interrupt occurred |
This function is used to Get interrupt flag accumulator interrupt of selected channel.
uint32_t EPWM_GetADCTriggerFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get selected channel trigger ADC flag.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM trigger ADC to start of conversion flag for specified channel.
uint32_t EPWM_GetCaptureIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get capture interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_GetDACTriggerFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get selected channel trigger DAC flag.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. This parameter is not used |
0 | The specified channel trigger DAC to start of conversion flag is not set |
1 | The specified channel trigger DAC to start of conversion flag is set |
This function is used to get selected channel trigger DAC flag.
uint32_t EPWM_GetDutyIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get duty interrupt flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM 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 EPWM_GetFaultBrakeIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32BrakeSource | ||
) |
This function get fault brake interrupt flag of selected source.
[in] | epwm | The pointer of the specified EPWM module |
[in] | u32BrakeSource | Fault brake source, could be either |
0 | Fault brake interrupt did not occurred |
1 | Fault brake interrupt occurred |
This function is used to get fault brake interrupt flag of selected source.
uint32_t EPWM_GetFaultDetectInt | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get fault detect interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module.
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5. |
0 | Fault detect interrupt did not occur. |
1 | Fault detect interrupt occurred. |
This function is used to Get fault detect interrupt of selected channel.
uint32_t EPWM_GetFTDutyIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get free trigger duty interrupt flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
0 | Free trigger duty interrupt did not occur |
1 | Free trigger duty interrupt occurred |
This function is used to get free trigger duty interrupt flag of selected channel.
uint32_t EPWM_GetPeriodIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get period interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
0 | Period interrupt did not occur |
1 | Period interrupt occurred |
This function is used to get period interrupt of selected channel.
uint32_t EPWM_GetWrapAroundFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get the time-base counter reached its maximum value flag of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
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 EPWM_GetZeroIntFlag | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum | ||
) |
Get zero interrupt of selected channel.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
0 | Zero interrupt did not occur |
1 | Zero interrupt occurred |
This function is used to get zero interrupt of selected channel.
void EPWM_SetBrakePinSource | ( | EPWM_T * | epwm, |
uint32_t | u32BrakePinNum, | ||
uint32_t | u32SelAnotherModule | ||
) |
Set EPWM brake pin source.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32BrakePinNum | Brake pin selection. Valid values are 0 or 1. |
[in] | u32SelAnotherModule | Select to another module. Valid values are TRUE or FALSE. |
This function is used to set EPWM brake pin source.
void EPWM_SetClockSource | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelNum, | ||
uint32_t | u32ClkSrcSel | ||
) |
Set EPWM clock source.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32ChannelNum | EPWM channel number. Valid values are between 0~5 |
[in] | u32ClkSrcSel | EPWM external clock source. |
This function is used to set EPWM clock source.
void EPWM_SetLeadingEdgeBlanking | ( | EPWM_T * | epwm, |
uint32_t | u32TrigSrcSel, | ||
uint32_t | u32TrigType, | ||
uint32_t | u32BlankingCnt, | ||
uint32_t | u32BlankingEnable | ||
) |
Set EPWM leading edge blanking function.
[in] | epwm | The pointer of the specified EPWM module
|
[in] | u32TrigSrcSel | Leading edge blanking source selection. |
[in] | u32TrigType | Leading edge blanking trigger type. |
[in] | u32BlankingCnt | Leading Edge Blanking Counter. Valid values are between 1~512. This counter value decides leading edge blanking window size, and this counter clock base is ECLK. |
[in] | u32BlankingEnable | Enable EPWM leading edge blanking function. Valid values are TRUE (ENABLE) or FALSE (DISABLE). |
This function is used to configure EPWM leading edge blanking function that blank the false trigger from ACMP brake source which may cause by EPWM output transition.
void EPWM_Start | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Start EPWM module.
[in] | epwm | The pointer of the specified EPWM 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 start EPWM module.
void EPWM_Stop | ( | EPWM_T * | epwm, |
uint32_t | u32ChannelMask | ||
) |
Stop EPWM module.
[in] | epwm | The pointer of the specified EPWM 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 stop EPWM module.