![](http://datasheet.mmic.net.cn/Analog-Devices-Inc/ADUC836BCPZ_datasheet_96322/ADUC836BCPZ_31.png)
ADuC836
–30–
ADuC836
–31–
User Download Mode (ULOAD)
In Figure 17 we can see that it was possible to use the 62 Kbytes
of Flash/EE program memory available to the user as one 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 19.
ULOAD mode can be used to upgrade your code in the field via
any user defined download protocol. Configuring the SPI port on
the ADuC836 as a slave, it is possible to completely reprogram
the 56 Kbytes of Flash/EE program memory in only 5 seconds
(see 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 ADuC836 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 only programmable via serial download or parallel program-
ming.This means that this space appears as read-only to user
code.Therefore, it cannot be accidently erased or reprogrammed
by erroneous code execution.This 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 also
in Application Note uC007.
FFFFH
E000H
DFFFH
0000H
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
6 KBYTE
F800H
F7FFH
USER DOWNLOAD SPACE
EITHER THE DOWNLOAD/DEBUG KERNEL
OR USER CODE (IN ULOAD MODE) CAN
PROGRAM THIS SPACE.
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.
56 KBYTE
2 KBYTE
62 KBYTES
OF USER
CODE
MEMORY
Figure 19. Flash/EE Program Memory Map in
ULOAD Mode
Flash/EE Program Memory Security
The ADuC836 facilitates three modes of Flash/EE program memory
security.These modes can be independently activated, restrict-
ing 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
ADuC836 offers the following security modes:
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 an “erase code and data” command in Serial Down-
load or Parallel Programming modes.
Secure Mode
This mode locks the code memory, disabling parallel program-
ming of the program memory. Reading/verifying the memory
in Parallel mode and reading the internal memory via a MOVC
command from external memory is also disabled.This mode is
deactivated by initiating an “erase code and data” 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
deasserted with PSEN low, the part will interpret the serial down-
load reset as a normal reset only. It will therefore not enter Serial
Download mode, but only execute a normal reset sequence.
Serial Safe mode can only be disabled by initiating an “erase code
and data” command in parallel programming mode.
REV. A