![]() |
NUC472_NUC442_BSP V3.03.003
The Board Support Package for NUC472/NUC442
|

Macros | |
| #define | EPWM_ENABLE_COMPLEMENTARY_MODE(pwm) |
| This macro enable complementary mode. More... | |
| #define | EPWM_DISABLE_COMPLEMENTARY_MODE(pwm) |
| This macro disable complementary mode, and enable independent mode. More... | |
| #define | EPWM_ENABLE_GROUP_MODE(pwm) |
| This macro enable group mode. More... | |
| #define | EPWM_DISABLE_GROUP_MODE(pwm) |
| This macro disable group mode. More... | |
| #define | EPWM_ENABLE_SYNC_MODE(pwm) |
| This macro enable synchronous mode. More... | |
| #define | EPWM_DISABLE_SYNC_MODE(pwm) |
| This macro disable synchronous mode, and enable independent mode. More... | |
| #define | EPWM_ENABLE_OUTPUT_INVERTER(pwm, u32ChannelMask) |
| This macro enable output inverter of specified channel(s) More... | |
| #define | EPWM_MASK_OUTPUT(pwm, u32ChannelMask, u32LevelMask) |
| This macro mask output output logic to high or low. More... | |
| #define | EPWM_SET_DIVIDER(pwm, u32ChannelNum, u32Divider) |
| This macro set the divider of the selected channel. More... | |
| #define | EPWM_SET_CMR(pwm, u32ChannelNum, u32CMR) |
| This macro set the duty of the selected channel. More... | |
| #define | EPWM_SET_CNR(pwm, u32ChannelNum, u32CNR) |
| This macro set the period of the selected channel. More... | |
| #define | EPWM_SET_ALIGNED_TYPE(pwm, u32ChannelMask, u32AlignedType) |
| This macro set the PWM aligned type. More... | |
Functions | |
| uint32_t | EPWM_ConfigOutputChannel (EPWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle) |
| This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode. More... | |
| void | EPWM_Start (EPWM_T *pwm, uint32_t u32ChannelMask) |
| This function start PWM module. More... | |
| void | EPWM_Stop (EPWM_T *pwm, uint32_t u32ChannelMask) |
| This function stop PWM module. More... | |
| void | EPWM_ForceStop (EPWM_T *pwm, uint32_t u32ChannelMask) |
| This function stop PWM generation immediately by clear channel enable bit. More... | |
| void | EPWM_EnableFaultBrake (EPWM_T *pwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource) |
| This function enable fault brake of selected channels. More... | |
| void | EPWM_ClearFaultBrakeFlag (EPWM_T *pwm, uint32_t u32BrakeSource) |
| This function clear fault brake flag. More... | |
| void | EPWM_EnableOutput (EPWM_T *pwm, uint32_t u32ChannelMask) |
| This function enables PWM output generation of selected channels. More... | |
| void | EPWM_DisableOutput (EPWM_T *pwm, uint32_t u32ChannelMask) |
| This function disables PWM output generation of selected channels. More... | |
| void | EPWM_EnableDeadZone (EPWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration) |
| This function enable Dead zone of selected channel. More... | |
| void | EPWM_DisableDeadZone (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function disable Dead zone of selected channel. More... | |
| void | EPWM_EnableDutyInt (EPWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType) |
| This function enable duty interrupt of selected channel. More... | |
| void | EPWM_DisableDutyInt (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function disable duty interrupt of selected channel. More... | |
| void | EPWM_ClearDutyIntFlag (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function clears duty interrupt flag of selected channel. More... | |
| uint32_t | EPWM_GetDutyIntFlag (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function get duty interrupt flag of selected channel. More... | |
| void | EPWM_EnableFaultBrakeInt (EPWM_T *pwm, uint32_t u32BrakeSource) |
| This function enable fault brake interrupt. More... | |
| void | EPWM_DisableFaultBrakeInt (EPWM_T *pwm, uint32_t u32BrakeSource) |
| This function disable fault brake interrupt. More... | |
| void | EPWM_ClearFaultBrakeIntFlag (EPWM_T *pwm, uint32_t u32BrakeSource) |
| This function clear fault brake interrupt of selected source. More... | |
| uint32_t | EPWM_GetFaultBrakeIntFlag (EPWM_T *pwm, uint32_t u32BrakeSource) |
| This function get fault brake interrupt of selected source. More... | |
| void | EPWM_EnablePeriodInt (EPWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType) |
| This function enable period interrupt of selected channel. More... | |
| void | EPWM_DisablePeriodInt (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function disable period interrupt of selected channel. More... | |
| void | EPWM_ClearPeriodIntFlag (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function clear period interrupt of selected channel. More... | |
| uint32_t | EPWM_GetPeriodIntFlag (EPWM_T *pwm, uint32_t u32ChannelNum) |
| This function get period interrupt of selected channel. More... | |
| #define EPWM_DISABLE_COMPLEMENTARY_MODE | ( | pwm | ) |
| #define EPWM_DISABLE_GROUP_MODE | ( | pwm | ) |
| #define EPWM_DISABLE_SYNC_MODE | ( | pwm | ) |
| #define EPWM_ENABLE_COMPLEMENTARY_MODE | ( | pwm | ) |
| #define EPWM_ENABLE_GROUP_MODE | ( | pwm | ) |
| #define EPWM_ENABLE_OUTPUT_INVERTER | ( | pwm, | |
| u32ChannelMask | |||
| ) |
This macro enable output inverter of specified channel(s)
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelMask | Combination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1... |
| #define EPWM_ENABLE_SYNC_MODE | ( | pwm | ) |
| #define EPWM_MASK_OUTPUT | ( | pwm, | |
| u32ChannelMask, | |||
| u32LevelMask | |||
| ) |
This macro mask output output logic to high or low.
| [in] | pwm | The base address of PWM 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 |
| #define EPWM_SET_ALIGNED_TYPE | ( | pwm, | |
| u32ChannelMask, | |||
| u32AlignedType | |||
| ) |
This macro set the PWM aligned type.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelMask | This parameter is not used |
| [in] | u32AlignedType | PWM aligned type, valid values are: |
| #define EPWM_SET_CMR | ( | pwm, | |
| u32ChannelNum, | |||
| u32CMR | |||
| ) |
This macro set the duty of the selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| [in] | u32CMR | Duty of specified channel. Valid values are between 0~0xFFFF |
| #define EPWM_SET_CNR | ( | pwm, | |
| u32ChannelNum, | |||
| u32CNR | |||
| ) |
This macro set the period of the selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| [in] | u32CNR | Period of specified channel. Valid values are between 0~0xFFFF |
| #define EPWM_SET_DIVIDER | ( | pwm, | |
| u32ChannelNum, | |||
| u32Divider | |||
| ) |
This macro set the divider of the selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| [in] | u32Divider | Clock divider of specified channel. Valid values are |
| void EPWM_ClearDutyIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
| void EPWM_ClearFaultBrakeFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32BrakeSource | ||
| ) |
| void EPWM_ClearFaultBrakeIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32BrakeSource | ||
| ) |
This function clear fault brake interrupt of selected source.
| [in] | pwm | The base address of PWM module |
| [in] | u32BrakeSource | Fault brake source, could be either |
| void EPWM_ClearPeriodIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
| uint32_t EPWM_ConfigOutputChannel | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum, | ||
| uint32_t | u32Frequency, | ||
| uint32_t | u32DutyCycle | ||
| ) |
This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM 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_DisableDeadZone | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
| void EPWM_DisableDutyInt | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
| void EPWM_DisableFaultBrakeInt | ( | EPWM_T * | pwm, |
| uint32_t | u32BrakeSource | ||
| ) |
| void EPWM_DisableOutput | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelMask | ||
| ) |
This function disables PWM output generation of selected channels.
| [in] | pwm | The base address of PWM 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... |
| void EPWM_DisablePeriodInt | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
| void EPWM_EnableDeadZone | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum, | ||
| uint32_t | u32Duration | ||
| ) |
This function enable Dead zone of selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| [in] | u32Duration | Dead Zone length in PWM clock count, valid values are between 0~0x7FF |
| void EPWM_EnableDutyInt | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum, | ||
| uint32_t | u32IntDutyType | ||
| ) |
| void EPWM_EnableFaultBrake | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelMask, | ||
| uint32_t | u32LevelMask, | ||
| uint32_t | u32BrakeSource | ||
| ) |
This function enable fault brake of selected channels.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelMask | This parameter is not used |
| [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... , bit 5 represent channel 5 |
| [in] | u32BrakeSource | Fault brake source, could be one of following source |
| void EPWM_EnableFaultBrakeInt | ( | EPWM_T * | pwm, |
| uint32_t | u32BrakeSource | ||
| ) |
| void EPWM_EnableOutput | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelMask | ||
| ) |
This function enables PWM output generation of selected channels.
| [in] | pwm | The base address of PWM 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... |
| void EPWM_EnablePeriodInt | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum, | ||
| uint32_t | u32IntPeriodType | ||
| ) |
This function enable period interrupt of selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | This parameter is not used |
| [in] | u32IntPeriodType | This parameter is not used |
| void EPWM_ForceStop | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelMask | ||
| ) |
| uint32_t EPWM_GetDutyIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
This function get duty interrupt flag of selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| 0 | Duty interrupt did not occurred |
| 1 | Duty interrupt occurred |
| uint32_t EPWM_GetFaultBrakeIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32BrakeSource | ||
| ) |
This function get fault brake interrupt of selected source.
| [in] | pwm | The base address of PWM module |
| [in] | u32BrakeSource | Fault brake source, could be either |
| 0 | Fault brake interrupt did not occurred |
| 1 | Fault brake interrupt occurred |
| uint32_t EPWM_GetPeriodIntFlag | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelNum | ||
| ) |
This function get period interrupt of selected channel.
| [in] | pwm | The base address of PWM module |
| [in] | u32ChannelNum | PWM channel number. Valid values are between 0~5 |
| 0 | Period interrupt did not occurred |
| 1 | Period interrupt occurred |
| void EPWM_Start | ( | EPWM_T * | pwm, |
| uint32_t | u32ChannelMask | ||
| ) |