TXZ Family
Flash Memory
2018-06-05
90 / 120
Rev. 2.0
How to Reprogram the Flash in Single Boot Mode
6.6.1. Single Boot Mode
The single boot mode utilizes a program contained in on-chip Boot ROM for reprogramming the flash memory. In
this mode, the Boot ROM is mapped to the area containing interrupt vector tables, and the flash memory is mapped
to another address area other than the Boot ROM area.
In the single boot mode, the flash memory is reprogrammed by the commands and data on serial transfer.
Table 6.3
Functions and Commands
Functions
/Commands
Basic
Operation
Description
Comment /Refer section
Communication
function
Communication
equipment
Use UART
Communication
Rate
The signal sent at the rate beforehand
decided from the external host controller is
analyzed, and a communication rate is set
up automatically.
RAM Transfer
Command
Transfer to
on-chip RAM
Connecting the pins of UART to the
external host, a programming routine is
copied from the external host device to the
on-chip RAM. A programming routine on
the RAM is executed to erasing/
programming the flash memory.
Password
Any data (8 bytes to 255 bytes) in the flash
memory can be used as a password. If did
not match password, generate error and
stop RAM transfer.
A part of user memory
use for password.
Flash memory
erasing command
Flash
memory
erasing
Erases on-chip flash memory except user
information area, regardless of a program/
erase protect condition or security status,
without a password.
Erasing for;
Data Flash
Code Flash
Protect bits
Memory swap bits
Security bit
UART (Note) of a target (TXZ microcontroller) and the external host controller (hereafter controller) are connected.
The "flash reprogramming program" sent from the controller is stored in on-chip RAM. The “flash reprogramming
program” on RAM is run, and a flash memory is reprogrammed.
The details of communication with the controller should follow the below mentioned protocol.
In single boot mode, do not generate all exceptions to avoid abnormal program termination.
To protect the contents of the flash memory in single chip mode (normal operation mode), it is recommended to
protect relevant flash blocks against accidental erasure after reprogramming is complete.
Note: For detail of UART, please refer to “Asynchronous Serial Communication Circuit” of reference manual.