NUC472_NUC442_BSP V3.03.004
The Board Support Package for NUC472/NUC442
Macros | Functions
pwm.h File Reference

NUC472/NUC442 PWM driver header file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PWM_CHANNEL_NUM
 
#define PWM_CH0
 
#define PWM_CH1
 
#define PWM_CH2
 
#define PWM_CH3
 
#define PWM_CH4
 
#define PWM_CH5
 
#define PWM_CH_0_MASK
 
#define PWM_CH_1_MASK
 
#define PWM_CH_2_MASK
 
#define PWM_CH_3_MASK
 
#define PWM_CH_4_MASK
 
#define PWM_CH_5_MASK
 
#define PWM_CLK_DIV_1
 
#define PWM_CLK_DIV_2
 
#define PWM_CLK_DIV_4
 
#define PWM_CLK_DIV_8
 
#define PWM_CLK_DIV_16
 
#define PWM_EDGE_ALIGNED
 
#define PWM_CENTER_ALIGNED
 
#define PWM_TRIGGER_ADC_RISING_EDGE_POINT
 
#define PWM_TRIGGER_ADC_FALLING_EDGE_POINT
 
#define PWM_TRIGGER_ADC_CENTER_POINT
 
#define PWM_TRIGGER_ADC_PERIOD_POINT
 
#define PWM_BRK0_BKP0
 
#define PWM_BRK0_CPO0
 
#define PWM_BRK0_CPO1
 
#define PWM_BRK0_CPO2
 
#define PWM_BRK1_LVDBK
 
#define PWM_BK1SEL_BKP1
 
#define PWM_BK1SEL_CPO0
 
#define PWM_BK1SEL_CPO1
 
#define PWM_PERIOD_INT_UNDERFLOW
 
#define PWM_PERIOD_INT_MATCH_CNR
 
#define PWM_DUTY_INT_MATCH_CMR_DN
 
#define PWM_DUTY_INT_MATCH_CMR_UP
 
#define PWM_FALLING_LATCH_INT_ENABLE
 
#define PWM_RISING_LATCH_INT_ENABLE
 
#define PWM_RISING_FALLING_LATCH_INT_ENABLE
 
#define PWM_FALLING_LATCH_INT_FLAG
 
#define PWM_RISING_LATCH_INT_FLAG
 
#define PWM_RISING_FALLING_LATCH_INT_FLAG
 
#define PWM_TIMEOUT_ERR
 
#define PWM_ENABLE_COMPLEMENTARY_MODE(pwm)
 This macro enable complementary mode. More...
 
#define PWM_DISABLE_COMPLEMENTARY_MODE(pwm)
 This macro disable complementary mode, and enable independent mode. More...
 
#define PWM_ENABLE_GROUP_MODE(pwm)
 This macro enable group mode. More...
 
#define PWM_DISABLE_GROUP_MODE(pwm)
 This macro disable group mode. More...
 
#define PWM_ENABLE_SYNC_MODE(pwm)
 This macro enable synchronous mode. More...
 
#define PWM_DISABLE_SYNC_MODE(pwm)
 This macro disable synchronous mode, and enable independent mode. More...
 
#define PWM_ENABLE_OUTPUT_INVERTER(pwm, u32ChannelMask)
 This macro enable output inverter of specified channel(s) More...
 
#define PWM_GET_CAPTURE_RISING_DATA(pwm, u32ChannelNum)
 This macro get captured rising data. More...
 
#define PWM_GET_CAPTURE_FALLING_DATA(pwm, u32ChannelNum)
 This macro get captured falling data. More...
 
#define PWM_MASK_OUTPUT(pwm, u32ChannelMask, u32LevelMask)
 This macro mask output output logic to high or low. More...
 
#define PWM_SET_PRESCALER(pwm, u32ChannelNum, u32Prescaler)
 This macro set the prescaler of the selected channel. More...
 
#define PWM_SET_DIVIDER(pwm, u32ChannelNum, u32Divider)
 This macro set the divider of the selected channel. More...
 
#define PWM_SET_CMR(pwm, u32ChannelNum, u32CMR)
 This macro set the duty of the selected channel. More...
 
#define PWM_SET_CNR(pwm, u32ChannelNum, u32CNR)
 This macro set the period of the selected channel. More...
 
#define PWM_SET_ALIGNED_TYPE(pwm, u32ChannelMask, u32AlignedType)
 This macro set the PWM aligned type. More...
 

Functions

uint32_t PWM_ConfigOutputChannel (PWM_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...
 
uint32_t PWM_ConfigCaptureChannel (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge)
 This function config PWM capture and get the nearest unit time. More...
 
void PWM_Start (PWM_T *pwm, uint32_t u32ChannelMask)
 This function start PWM module. More...
 
void PWM_Stop (PWM_T *pwm, uint32_t u32ChannelMask)
 This function stop PWM module. More...
 
void PWM_ForceStop (PWM_T *pwm, uint32_t u32ChannelMask)
 This function stop PWM generation immediately by clear channel enable bit. More...
 
void PWM_EnableADCTrigger (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 This function enable selected channel to trigger ADC. More...
 
void PWM_DisableADCTrigger (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable selected channel to trigger ADC. More...
 
void PWM_ClearADCTriggerFlag (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 This function clear selected channel trigger ADC flag. More...
 
uint32_t PWM_GetADCTriggerFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get selected channel trigger ADC flag. More...
 
void PWM_EnableFaultBrake (PWM_T *pwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource)
 This function enable fault brake of selected channels. More...
 
void PWM_ClearFaultBrakeFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function clear fault brake flag. More...
 
void PWM_EnableCapture (PWM_T *pwm, uint32_t u32ChannelMask)
 This function enables PWM capture of selected channels. More...
 
void PWM_DisableCapture (PWM_T *pwm, uint32_t u32ChannelMask)
 This function disables PWM capture of selected channels. More...
 
void PWM_EnableOutput (PWM_T *pwm, uint32_t u32ChannelMask)
 This function enables PWM output generation of selected channels. More...
 
void PWM_DisableOutput (PWM_T *pwm, uint32_t u32ChannelMask)
 This function disables PWM output generation of selected channels. More...
 
void PWM_EnableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Duration)
 This function enable Dead zone of selected channel. More...
 
void PWM_DisableDeadZone (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable Dead zone of selected channel. More...
 
void PWM_EnableCaptureInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 This function enable capture interrupt of selected channel. More...
 
void PWM_DisableCaptureInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 This function disable capture interrupt of selected channel. More...
 
void PWM_ClearCaptureIntFlag (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 This function clear capture interrupt flag of selected channel. More...
 
uint32_t PWM_GetCaptureIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get capture interrupt flag of selected channel. More...
 
void PWM_EnableDutyInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
 This function enable duty interrupt of selected channel. More...
 
void PWM_DisableDutyInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable duty interrupt of selected channel. More...
 
void PWM_ClearDutyIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clears duty interrupt flag of selected channel. More...
 
uint32_t PWM_GetDutyIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get duty interrupt flag of selected channel. More...
 
void PWM_EnableFaultBrakeInt (PWM_T *pwm, uint32_t u32BrakeSource)
 This function enable fault brake interrupt. More...
 
void PWM_DisableFaultBrakeInt (PWM_T *pwm, uint32_t u32BrakeSource)
 This function disable fault brake interrupt. More...
 
void PWM_ClearFaultBrakeIntFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function clear fault brake interrupt of selected source. More...
 
uint32_t PWM_GetFaultBrakeIntFlag (PWM_T *pwm, uint32_t u32BrakeSource)
 This function get fault brake interrupt of selected source. More...
 
void PWM_EnablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
 This function enable period interrupt of selected channel. More...
 
void PWM_DisablePeriodInt (PWM_T *pwm, uint32_t u32ChannelNum)
 This function disable period interrupt of selected channel. More...
 
void PWM_ClearPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function clear period interrupt of selected channel. More...
 
uint32_t PWM_GetPeriodIntFlag (PWM_T *pwm, uint32_t u32ChannelNum)
 This function get period interrupt of selected channel. More...
 

Detailed Description

NUC472/NUC442 PWM driver header file.

Version
V1.00
Revision
22
Date
15/11/16 2:08p
Note
SPDX-License-Identifier: Apache-2.0 Copyright (C) 2013 Nuvoton Technology Corp. All rights reserved.

Definition in file pwm.h.