![](http://datasheet.mmic.net.cn/Analog-Devices-Inc/ADUC7129BSTZ126_datasheet_96314/ADUC7129BSTZ126_44.png)
ADuC7128/ADuC7129
Rev. 0 | Page 44 of 92
RESET AND REMAP
The ARM exception vectors are all situated at the bottom of the
memory array, from Address 0x00000000 to Address 0x00000020,
KERNEL
INTERRUPT
SERVICE ROUTINES
INTERRUPT
SERVICE ROUTINES
ARM EXCEPTION
VECTOR ADDRESSES
0x00000020
0x00041FFF
0x0008FFFF
0xFFFFFFFF
FLASH/EE
SRAM
MIRROR SPACE
0x00000000 0x00000000
0x00040000
0x00080000
0602
0-
0
40
Figure 45. Remap for Exception Execution
By default and after any reset, the Flash/EE is mirrored at the
bottom of the memory array. The remap function allows the
programmer to mirror the SRAM at the bottom of the memory
array, facilitating execution of exception routines from SRAM
instead of from Flash/EE. This means exceptions are executed
twice as fast, with the exception being executed in ARM mode
(32 bits), and the SRAM being 32 bits wide instead of 16-bit
wide Flash/EE memory.
Remap Operation
When a reset occurs on the ADuC7128/ADuC7129, execution
starts automatically in factory-programmed internal configura-
tion code. This kernel is hidden and cannot be accessed by user
code. If the ADuC7128/ADuC7129 are in normal mode (the BM
pin is high), they execute the power-on configuration routine of
the kernel and then jump to the reset vector Address 0x00000000 to
execute the user’s reset exception routine. Because the Flash/EE is
mirrored at the bottom of the memory array at reset, the reset
interrupt routine must always be written in Flash/EE.
The remap is done from Flash/EE by setting Bit 0 of the REMAP
register. Precautions must be taken to execute this command
from Flash/EE, above Address 0x00080020, and not from the
bottom of the array because this is replaced by the SRAM.
This operation is reversible: the Flash/EE can be remapped at
Address 0x00000000 by clearing Bit 0 of the REMAP MMR.
Precaution must again be taken to execute the remap function
from outside the mirrored area. Any kind of reset remaps the
Flash/EE memory at the bottom of the array.
Reset Operation
There are four kinds of reset: external reset, power-on reset,
watchdog expiration, and software force. The RSTSTA register
indicates the source of the last reset and RSTCLR clears the
RSTSTA register. These registers can be used during a reset
exception service routine to identify the source of the reset.
If RSTSTA is null, the reset was external. Note that when
clearing RSTSTA, all bits that are currently 1 must be cleared.
Otherwise, a reset event occurs.
Table 47. REMAP MMR Bit Designations
Bit
Name
Description
0
Remap
Remap Bit.
Set by user to remap the SRAM to Address 0x00000000.
Cleared automatically after reset to remap the Flash/EE memory to Address 0x00000000.
Table 48. RSTSTA MMR Bit Designations
Bit
Description
7:3
Reserved.
2
Software Reset.
Set by user to force a software reset.
Cleared by setting the corresponding bit in RSTCLR.
1
Watchdog Timeout.
Set automatically when a watchdog timeout occurs.
Cleared by setting the corresponding bit in RSTCLR.
0
Power-On Reset.
Set automatically when a power-on reset occurs.
Cleared by setting the corresponding bit in RSTCLR.