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

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.8.4
6.8.4.1 One –Shot mode
6.8.4.2 Periodic mode
6.8.4.3 Toggle mode
NuMicro M051
Timer controller provides one-shot, period and toggle modes operation. Each operating function
mode is shown as following:
If timer is operated at one-shot mode and CEN (timer enable bit) is set to 1, the timer counter
starts up counting. Once the timer counter value reaches timer compare register (TCMPR) value,
if IE (interrupt enable bit) is set to 1’b1, then the timer interrupt flag is set and the interrupt signal
is generated and sent to NVIC to inform CPU. It indicates that the timer counting overflow
happens. If IE (interrupt enable bit) is set to 0, no interrupt signal is generated. In this operating
mode, once the timer counter value reaches timer compare register (TCMPR) value, the timer
counter value goes back to counting initial value and CEN (timer enable bit) is cleared to 0 by
timer controller. Timer counting operation stops, once the timer counter value reaches timer
compare register (TCMPR) value. That is to say, timer operates timer counting and compares
with TCMPR value function only one time after programming the timer compare register (TCMPR)
value and CEN (timer enable bit) is set to 1. So, this operating mode is called One-Shot mode.
If timer is operated at period mode and CEN (timer enable bit) is set to 1, the timer counter starts
up counting. Once the timer counter value reaches timer compare register (TCMPR) value, if IE
(interrupt enable bit) is set to 1’b1, then the timer interrupt flag is set and the interrupt signal is
generated and sent to NVIC to inform CPU. It indicates that the timer counting overflow happens.
If IE (interrupt enable bit) is set to 0, no interrupt signal is generated. In this operating mode, once
the timer counter value reaches timer compare register (TCMPR) value, the timer counter value
goes back to counting initial value and CEN is kept at 1 (counting enable continuously). The timer
counter operates up counting again. If the interrupt flag is cleared by software, once the timer
counter value reaches timer compare register (TCMPR) value and IE (interrupt enable bit) is set
to 1’b1, then the timer interrupt flag is set and the interrupt signal is generated and sent to NVIC
to inform CPU again. That is to say, timer operates timer counting and compares with TCMPR
value function periodically. The timer counting operation doesn’t stop until the CEN is set to 0.
The interrupt signal is also generated periodically. So, this operating mode is called Periodic
mode.
If timer is operated at toggle mode and CEN (timer enable bit) is set to 1, the timer counter starts
up counting. Once the timer counter value reaches timer compare register (TCMPR) value, if IE
(interrupt enable bit) is set to 1’b1, then the timer interrupt flag is set and the interrupt signal is
generated and sent to NVIC to inform CPU. It indicates that the timer counting overflow happens.
The associated toggle output (tout) signal is set to 1. In this operating mode, once the timer
counter value reaches timer compare register (TCMPR) value, the timer counter value goes back
to counting initial value and CEN is kept at 1 (counting enable continuously). The timer counter
operates up counting again. If the interrupt flag is cleared by software, once the timer counter
value reaches timer compare register (TCMPR) value and IE (interrupt enable bit) is set to 1, then
the timer interrupt flag is set and the interrupt signal is generated and sent to NVIC to inform CPU
Timer Operation Mode
Series Technical Reference Manual
- 257 -
Publication Release Date: Sept 14, 2010
Revision V1.2

Related parts for NUTINY-SDK-M0516