Philips Semiconductors
Preliminary data
XA-G39
XA 16-bit microcontroller family
32K Flash/1K RAM, watchdog, 2 UARTs
2002 Mar 13
13
operation indicated by the record type is not performed until the
entire record has been received. Should an error occur in the
checksum, the XA-G39 will send an “X” out the serial port indicating
a checksum error. If the checksum calculation is found to match the
checksum in the record, then the command will be executed. In
most cases, successful reception of the record will be indicated by
transmitting a “.” character out the serial port (displaying the
contents of the internal program memory is an exception).
In the case of a Data Record (record type 00), an additional check is
made. A “.” character will NOT be sent unless the record checksum
matched the calculated checksum and all of the bytes in the record
were successfully programmed. For a data record, an “X” indicates
that the checksum failed to match, and an “R” character indicates
that one of the bytes did not properly program.
The ISP facility was designed so that specific crystal frequencies
were not required in order to generate baud rates or time the
programming pulses.
User Supplied Loader
A user program can simply decide at any time, for any reason, to
begin Flash programming operations. All it has to do in advance is to
instruct external circuitry to apply +5 V or +12 V to the V
PP
pin, and
make certain that the Boot ROM is enabled. User code may contain
a loader designed to replace the application code contained in the
Flash memory by loading new code through any communication
medium available in the application. This is completely flexible and
defined by the designer of the system. It could be done serially using
RS-232, serially using some other method, or even parallel over a
user defined I/O port. The user has the freedom to choose a method
that does not interfere with the application circuit. As an added
feature, the application program may also use the Flash memory as
a long term data storage, saving configuration information, sensor
readings, or any other desired data.
The actual loader code would typically be programmed by the user
into the microcontroller in a parallel fashion or via the default loader
during their manufacturing process. The entire initial Flash contents
may be programmed at that time, or the rest of the application may
be programmed into the Flash memory at a later time, possibly
using the loader code to do the programming.
This application controlled programming capability allows for the
possibility of changing the application code in the field. If the
application circuit is embedded in a PC, or has a way to establish a
telephone data link to a user’s or manufacturer’s computer, new
code could be downloaded from diskette or a manufacturer’s
support system. There is even the possibility of conducting very
specialized remote testing of a failing circuit board by the
manufacturer by remotely programming a series of detailed test
programs into the application board and checking the results.
Any user supplied loader should take the watchdog timer into
account. Typically, the watchdog timer would be disabled upon entry
to the loader if it might be running, in order to prevent a watchdog
reset from occurring during programming.