NUTINY-SDK-M0516 Nuvoton Technology Corporation of America, NUTINY-SDK-M0516 Datasheet - Page 199

no-image

NUTINY-SDK-M0516

Manufacturer Part Number
NUTINY-SDK-M0516
Description
BOARD EVAL NUMICRO M051 SERIES
Manufacturer
Nuvoton Technology Corporation of America
Series
NuMicro M051™r
Type
MCUr
Datasheets

Specifications of NUTINY-SDK-M0516

Contents
Board, Cable
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
M051™ Series, M052/M054/M058/M0516
6.6.4.7 PWM-Timer Start Procedure
6.6.4.8 PWM-Timer Stop Procedure
NuMicro M051
The following procedure is recommended for starting a PWM drive.
1.
2.
3.
4.
5.
6.
7.
8.
Method 1 :
Set 16-bit down counter (CNR) as 0, and monitor PDR (current value of 16-bit down-counter).
When PDR reaches to 0, disable PWM-Timer (CHxEN in PCR). (Recommended)
Method 2:
Set 16-bit down counter (CNR) as 0. When interrupt request happens, disable PWM-Timer
(CHxEN in PCR). (Recommended)
Method 3:
Disable PWM-Timer directly ((CHxEN in PCR). (Not recommended)
The reason why method 3 is not recommended is that disable CHxEN will immediately stop PWM
output signal and lead to change the duty of the PWM output, this may cause damage to the
control circuit of motor
Setup clock selector (CSR)
Setup prescaler (PPR)
Setup inverter on/off, dead zone generator on/off, auto-reload/one-shot mode and Stop
PWM-timer (PCR)
Setup comparator register (CMR) for setting PWM duty.
Setup PWM down-counter register (CNR) for setting PWM period.
Setup interrupt enable register (PIER)
Setup corresponding GPIO pins as PWM function (enable POE and disable CAPENR) for the
corresponding PWM channel.
Enable PWM timer start running (Set CHxEN = 1 in PCR)
Series Technical Reference Manual
- 199 -
Publication Release Date: Sept 14, 2010
Revision V1.2

Related parts for NUTINY-SDK-M0516