5
AVR084
2518A–AVR–06/02
Changes to
Watchdog Timer
The frequency of the Watchdog Oscillator in ATmega32 is close to 1.0 MHz for all sup-
ply voltages. The typical frequency of the Watchdog Oscillator in ATmega323 is close to
1.0 MHz @ 5 V, but the Time-out period increases with decreasing VCC. This means that
the selection of Time-out period for the Watchdog Timer (in terms of number of WDT
Oscillator cycles) must be reconsidered when porting the design to ATmega32. Refer to
the data sheet for ATmega32 for further information.
Improvements to
JTAG Interface
Both ATmega323 and ATmega32 support a JTAG TAP interface for On-Chip debug-
ging, Boundary-scan testing, and programming through the JTAG interface.
The number of scan cells in ATmega32 is higher than in ATmega323 to give better sup-
port for analog connections. Use the ATMEL provided Boundary-scan Description
Language (BSDL) file for the appropriate device when creating the production test for
the circuit board, and refer to the data sheet for description of the analog functions. As
shown in the BSDL file, also the JTAG Device-ID has been changed from ATmega323
to ATmega32.
JTAG instructions PROG_PAGELOAD and PROG_PAGEREAD have been changed
from using a virtual Flash Page Register in ATmega323 to accessing an 8-bit data regis-
ter in ATmega32. This improvement makes it possible to use JTAG Page Programming
regardless of where in the scan chain the AVR is. The improvement comes at an
expense of higher number of vectors to program the same amount of flash.
The instruction set is extended by a BREAK instruction that is interpreted by the On-chip
Debug system as an additional source of break. This makes the maximum number of
Break Points in ATmega32 unlimited, while the number of Break Points in ATmega323
is limited by the number of Break Point comparators.
Self-Programming Both ATmega32 and ATmega323 supports Self-Programming. In ATmega323 the CPU
is halted both during Page Erase and during Page Write. In ATmega32, the CPU is only
halted when programming the No-Read-While-Write – NRWW – section of the Flash
memory. The SPMEN bit in the SPMCR Register will be auto-cleared in both devices.
This means that a Boot Loader for ATmega323 can be written without polling for com-
pletion of the erase or the write operation. If this is the case, porting the code to
ATmega32 requires rewriting the code to poll for SPMEN to go low before starting a new
Page Erase, Page Write or writing the Lock bits command.
However, the data sheet for ATmega323 recommends this polling operation for compat-
ibility with future devices, so as long as this recommendation is followed, the Boot
Loader can be used in ATmega32 without modification.
Other Concerns The ATmega32 has a signature byte different from the one used in ATmega323. Make
sure you are using the signature byte of ATmega32 when porting the design.