ADuC841/ADuC842/ADuC843
Rev. 0 | Page 33 of 88
User Download Mode (ULOAD)
Figure 39 shows that it is possible to use the 62 kBytes of
Flash/EE program memory available to the user as a single
block of memory. In this mode, all of the Flash/EE memory is
read-only to user code.
However, the Flash/EE program memory can also be written to
during runtime simply by entering ULOAD mode. In ULOAD
mode, the lower 56 kBytes of program memory can be erased and
reprogrammed by user software as shown in
Figure 39. ULOAD
mode can be used to upgrade your code in the field via any user
defined download protocol. By configuring the SPI port on the
part as a slave, it is possible to completely reprogram the
56 kBytes of Flash/EE program memory in only 5 seconds (refer
to Application Note uC007).
Alternatively, ULOAD mode can be used to save data to the
56 kBytes of Flash/EE memory. This can be extremely useful in
data logging applications where the part can provide up to
60 kBytes of NV data memory on chip (4 kBytes of dedicated
Flash/EE data memory also exist).
The upper 6 kBytes of the 62 kBytes of Flash/EE program
memory are programmable only via serial download or parallel
programming. This means that this space appears as read-only
to user code. Therefore, it cannot be accidentally erased or
reprogrammed by erroneous code execution, which makes it
very suitable to use the 6 kBytes as a bootloader.
A bootload enable option exists in the serial downloader to
“always run from E000H after reset.” If using a bootloader, this
option is recommended to ensure that the bootloader always
executes correct code after reset. Programming the Flash/EE
program memory via ULOAD mode is described in more detail
in the description of ECON and in Application Note uC007.
EMBEDDED DOWNLOAD/DEBUG KERNEL
PERMANENTLY EMBEDDED FIRMWARE ALLOWS
CODE TO BE DOWNLOADED TO ANY OF THE
62 kBYTES OF ON-CHIP PROGRAM MEMORY.
THE KERNEL PROGRAM APPEARS AS 'NOP'
INSTRUCTIONS TO USER CODE
USER BOOTLOADER SPACE
THE USER BOOTLOADER
SPACE CAN BE PROGRAMMED IN
DOWNLOAD/DEBUG MODE VIA THE
KERNEL BUT IS READ ONLY WHEN
EXECUTING USER CODE
USER DOWNLOADER SPACE
EITHER THE DOWNLOAD/DEBUG
KERNEL OR USER CODE (IN
ULOAD MODE) CAN PROGRAM
THIS SPACE
FFFFH
2kBYTE
F800H
F7FFH
6kBYTE
E000H
dFFFH
56kBYTE
0000H
03260-0-038
62 kBYTES
OF USER
CODE
MEMORY
Figure 39. Flash/EE Program Memory Map in ULOAD Mode
(62 kByte Part)
EMBEDDED DOWNLOAD/DEBUG KERNEL
PERMANENTLY EMBEDDED FIRMWARE ALLOWS
CODE TO BE DOWNLOADED TO ANY OF THE
32 kBYTES OF ON-CHIP PROGRAM MEMORY.
THE KERNEL PROGRAM APPEARS AS 'NOP'
INSTRUCTIONS TO USER CODE
USER BOOTLOADER SPACE
THE USER BOOTLOADER
SPACE CAN BE PROGRAMMED IN
DOWNLOAD/DEBUG MODE VIA THE
KERNEL BUT IS READ ONLY WHEN
EXECUTING USER CODE
USER DOWNLOADER SPACE
EITHER THE DOWNLOAD/DEBUG
KERNEL OR USER CODE (IN
ULOAD MODE) CAN PROGRAM
THIS SPACE
FFFFH
2kBYTE
F800H
F7FFH
NOP'S
8000H
5FFFH
26kBYTE
0000H
03260-0-039
7FFFH
8kBYTE
6000H
32 kBYTES
OF USER
CODE
MEMORY
Figure 40. Flash/EE Program Memory Map in ULOAD Mode
(32 kByte Part)
Flash/EE Program Memory Security
The ADuC841/ADuC842/ADuC843 facilitate three modes of
Flash/EE program memory security. These modes can be
independently activated, restricting access to the internal code
space. These security modes can be enabled as part of serial
download protocol as described in Application Note uC004 or
via parallel programming. The security modes available on the
parts are as follows:
Lock Mode
This mode locks the code memory, disabling parallel program-
ming of the program memory. However, reading the memory in
parallel mode and reading the memory via a MOVC command
from external memory is still allowed. This mode is deactivated
by initiating a code-erase command in serial download or
parallel programming modes.
Secure Mode
This mode locks code in memory, disabling parallel program-
ming (program and verify/read commands) as well as disabling
the execution of a MOVC instruction from external memory,
which is attempting to read the op codes from internal memory.
Read/write of internal data Flash/EE from external memory is
also disabled. This mode is deactivated by initiating a code-erase
command in serial download or parallel programming modes.
Serial Safe Mode
This mode disables serial download capability on the device. If
serial safe mode is activated and an attempt is made to reset the
part into serial download mode, i.e., RESET asserted and de-
asserted with PSEN low, the part interprets the serial download
reset as a normal reset only. It therefore cannot enter serial
download mode but can only execute as a normal reset
sequence. Serial safe mode can be disabled only by initiating a
code-erase command in parallel programming mode.