English
Language : 

EVAL-ADUC831QSZ Datasheet, PDF (28/76 Pages) Analog Devices – MicroConverter®, 12-Bit ADCs and DACs with Embedded 62 kBytes Flash MCU
ADuC831
Using the Flash/EE Program Memory
The 62 kByte Flash/EE program memory array is mapped into the
lower 62 kBytes of the 64 kBytes program space addressable by
the ADuC831, and is used to hold user code in typical applications.
The program memory Flash/EE memory arrays can be programmed
in three ways:
(1) Serial Downloading (In-Circuit Programming)
The ADuC831 facilitates code download via the standard
UART serial port. The ADuC831 will enter serial download
mode after a reset or power cycle if the PSEN pin is pulled low
through an external 1 k⍀ resistor. Once in serial download
mode, the user can download code to the full 62 kBytes of
Flash/EE program memory while the device is in circuit in its
target application hardware.
A PC serial download executable is provided as part of the ADuC831
QuickStart development system. The Serial Download protocol
is detailed in a MicroConverter Applications Note uC004.
(2) Parallel Programming
The parallel programming mode is fully compatible with con-
ventional third party Flash or EEPROM device programmers.
In this mode Ports P0, P1, and P2 operate as the external data
and address bus interface, ALE operates as the Write Enable
strobe, and Port P3 is used as a general configuration port that
configures the device for various program and erase operations
during parallel programming. The high voltage (12 V) supply
required for Flash programming is generated using on-chip charge
pumps to supply the high voltage program lines.
The complete parallel programming specification is available on the
MicroConverter home page at www.analog.com/microconverter.
(3) User Download Mode (ULOAD)
In Figure 19 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 ADuC831 as a slave, it is possible to completely repro-
gram the 56 kBytes of Flash/EE program memory in only
5 seconds (see 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 ADuC831 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 is only programmable 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. 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 the 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 technical 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' INSTRUC-
TIONS TO USER CODE.
62 kBYTES
OF USER
CODE
MEMORY
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 DOWNLOAD SPACE
EITHER THE DOWNLOAD/DEBUG
KERNEL OR USER CODE (IN
ULOAD MODE) CAN PROGRAM
THIS SPACE.
FFFFH
2 kBYTE
F800H
F7FFH
6 kBYTE
E000H
DFFFH
56 kBYTE
0000H
Figure 19. Flash/EE Program Memory Map in
ULOAD Mode
Flash/EE Program Memory Security
The ADuC831 facilitates three modes of Flash/EE program
memory security. These modes can be independently acti-
vated, restricting access to the internal code space. These
security modes can be enabled as part of serial download
protocol as described in technical note uC004 or via parallel
programming. The security modes available on the ADuC831
are described 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 programming
(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 will interpret the serial
download 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 a code-erase
command in parallel programming mode.
–28–
REV. 0