199
XMEGA B [DATASHEET]
8291B–AVR–01/2013
16.
Hi-Res – High-Resolution Extension
16.1
Features
Increases waveform generator resolution up to 8x (3 bits)
Supports frequency, single-slope PWM, and dual-slope PWM generation
Supports the AWeX when this is used for the same timer/counter
16.2
Overview
The high-resolution (hi-res) extension can be used to increase the resolution of the waveform generation output
from a timer/counter by four or eight. It can be used for a timer/counter doing frequency, single-slope PWM, or
dual-slope PWM generation. It can also be used with the AWeX if this is used for the same timer/counter.
The hi-res extension uses the peripheral 4x clock (Clk
PER4
). The system clock prescalers must be configured so the
peripheral 4x clock frequency is four times higher than the peripheral and CPU clock frequency when the hi-res
extension is enabled. Refer to
“System Clock Selection and Prescalers” on page 78
Figure 16-1. Timer/counter operation with hi-res extension enabled.
When the hi-res extension is enabled, the timer/counter must run from a non-prescaled peripheral clock. The
timer/counter will ignore its two least-significant bits (lsb) in the counter, and counts by four for each peripheral clock
cycle. Overflow/underflow and compare match of the 14 most-significant bits (msb) is done in the timer/counter. Count
and compare of the two lsb is handled and compared in the hi-res extension running from the peripheral 4x clock.
The two lsb of the timer/counter period register must be set to zero to ensure correct operation. If the count register is
read from the application code, the two lsb will always be read as zero, since the timer/counter run from the peripheral
clock. The two lsb are also ignored when generating events.
When the hi-res plus feature is enabled, the function is the same as with the hi-res extension, but the resolution will
increase by eight instead of four. This also means that the 3 lsb are handled by the hi-res extension instead of 2 lsb, as
when only hi-res is enabled. The extra resolution is achieved by counting on both edges of the peripheral 4x clock.
The hi-res extension will not output any pulse shorter than one peripheral clock cycle; i.e., a compare value lower than
four will have no visible output.
CNT[15:2]
HiRes
CCxBUF[15:0]
=
= 0
" match"
=
PER[15:2]
0
Waveform
Generation
TOP
BOTTOM
Time /Counter
CCx[15:2]
[1:0]
2
2
2
0
AWeX
Fault
Protection
Dead - Time
Insertion
Pattern
Generation
clk
PER
clk
PER4
Pxn
Summary of Contents for XMEGA B
Page 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Page 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Page 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Page 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Page 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...