
Flash Development Toolkit
Method for Using the User Program Mode (SH7086 Application)
REJ06J0071-0100 /Rev.1.00 2009.2 Page 86 of 106
(2) Main process (main)
The flow of the main process is shown below.
1. Branch from the reset vector to start (startup).
2. Start (startup) sets the stack pointer and calls the main process (main).
3. The main process (main) calls SCI initialization (InitSCI) and branches to ROM main process
(RomMain).
4. The ROM main process (RomMain) transfers RAM main process to the RAM and then accepts and
processes commands and sets specification.
When setting is complete, it branches to RAM main process (RamMain) in the RAM.
5. The RAM main process (RamMain) processes received commands to execute the processing listed
below.
Write/erase library transfer (LibTrans)
Erase flash memory (EraseFLASH)
Write to flash memory (WriteFLASH)
User boot area/user area memory read (ReadMemory)
User boot area/user area sum check (SumCheck)
User boot area/user area blank check (CheckBlank)
[Note] The ROM main process (RomMain) is also referred to as the micro kernel. It operates in the
ROM.
The RAM main process (RamMain) is also referred to as the main kernel. It operates in the
RAM.
(3) ROM main process (RomMain)
The flow of the ROM main process (RomMain) is shown below.
1. In transfer start (TransStart), transfer a program from the ROM where it is stored to the RAM.
This is to enable library transfers and write/erases to be processed in the RAM.
2. In command function (CmdFunc), process commands and set selection corresponding to inquiries.
3. Inquiries are handled in the reference function (ReferFunc) and program status (RequestBootPrgSts),
with the following commands supported.
Support device inquiry
Clock mode inquiry
Multiply factor inquiry
Operating clock frequency inquiry
User boot area information inquiry
User area information inquiry
Erase block information inquiry
Write size inquiry
Boot program status inquiry
4. Selection settings are made in the following modules.
Device selection (SelectDevice): Selects device code
Clock mode selection (SelectClockMode): Notifies selected clock mode
New baud rate setting (SetNewBaudRate): Selects new baud rate
5. When inquiry selection is complete, branch to the RAM main process (RamMain) that was transferred
to the RAM.
Kommentare zu diesen Handbüchern