atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 176

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
16.10 Fault Protection Unit
176
ATmega32U4
Figure 16-18. Timer/Counter Timing Diagram, Setting of OCF1x, with Prescaler (f
Figure 16-19. Timer/Counter Timing Diagram, with Prescaler (f
The Timer/Counter4 incorporates a Fault Protection unit that can disable the PWM output pins, if
an external event is triggered. The external signal indicating an event can be applied via the
external interrupt INT0 pin or alternatively, via the analog-comparator unit. The Fault Protection
unit is illustrated by the block diagram shown in
that are not directly a part of the Fault Protection unit are gray shaded.
Figure 16-20. Fault Protection Unit Block Diagram
When the Fault Protection mode is enabled by the Fault Protection Enable (FPEN4) bit and a
change of the logic level (an event) occurs on the external interrupt pin (INT0), alternatively on
the Analog Comparator output (ACO), and this change confirms to the setting of the edge detec-
tor, a Fault Protection mode will be triggered. When a Fault Protection is triggered, the COM4x
bits are cleared, Output Comparators are disconnected from the PWM output pins and the
PORTB register bits are connected on the PWM output pins. The Fault Protection Enable
(FPEN4) is automatically cleared at the same system clock as the COM4nx bits are cleared. If
the Fault Protection Interrupt Enable bit (FPIE4) is set, a Fault Protection interrupt is generated
and the FPEN4 bit is cleared. Alternatively the FPEN4 bit can be polled by software to figure out
when the Timer/Counter has entered to Fault Protection mode.
TCNTn
TCNTn
(clk
(clk
TOVn
OCRnx
OCFnx
clk
clk
clk
clk
INT0
PCK
PCK
PCK
PCK
Tn
Tn
/8)
/8)
Comparator
Analog
BOTTOM + 1
ACO*
OCRnx - 1
FPAC4
BOTTOM + 1
Canceler
Noise
OCRnx
FPNC4
OCRnx Value
Figure
FPES4
16-20. The elements of the block diagram
Detector
Edge
OCRnx + 1
BOTTOM
FPEN4
clkT4
/8)
FAULT_PROTECTION (Int. Req.)
BOTTOM + 1
OCRnx + 2
Timer/Counter4
clkT4
7766A–AVR–03/08
/8)

Related parts for atmega32u4-16mu