![Toshiba TMPM3V4 Manual Download Page 502](http://html.mh-extra.com/html/toshiba/tmpm3v4/tmpm3v4_manual_428626502.webp)
22.4 Programming in the User Boot Mode
A user Boot mode is to use flash memory programming routine defined by users. It is used when the data trans-
fer buses for flash memory program code on the user application is different from the serial I/O. It operates in the
single chip mode; therefore, a switch from normal mode in which user application is activated in the use boot
mode to the user boot mode for programming flash is required. Specifically, add a mode judgment routine to the re-
set service routine in the user application program.
The condition to switch the modes needs to be set according to the user’s system setup condition. Also, a flash
memory programming routine that the user uniquely makes up needs to be set in the new application. This rou-
tine is used for programming after being switched to the user boot mode. The data in built-in Flash memory can-
not be read out during erase/reprogramming mode. Thus, reprogramming routine must be take place while it is stor-
ed in the area outside of Flash memory area. Once re-programming is complete, it is recommended to protect rele-
vant flash blocks from accidental reprogramming. Be sure not to generate interrupt/fault except reset to avoid abnor-
mal termination during the user boot mode.
Taking examples from two cases such as the method that reprogramming routine stored in Flash memory (1-A)
and transferred from the external device (1-B), the following section explains the procedure. For a detail of the pro-
gram/erase to Flash memory, refer to "22.2 Detail of Flash Memory".
22.4.1 (1-A) Procedure that a Programming Routine Stored in Flash memory
22.4.1.1 Step-1
A user determines the conditions (e.g., pin status) to enter the user boot mode and the I/O bus to be
used to transfer data. Then suitable circuit design and program are created. Before installing the device
on a printed circuit board, write the following three program routines into an arbitrary flash block using pro-
gramming equipment such as a flash writer.
(a) Mode determination routine:
A program to determine to switch to user boot mode or not
(b) Flash programming routine:
A program to download new program from the host controller and re-pro-
gram Flash memory
(c) Copy routine:
A program to copy the data described in (a) to the built-in RAM or external
memory device
New Application
Program Code
Old Application
Program Code
Flash memory
(Host)
(I/O)
RAM
[Reset Procedure]
(a) Mode Judgment Routine
(b) Programming Routine
(c) Copy routine
TMPM3V6/M3V4
TMPM3V6/M3V4
22.
Flash Memory Operation
22.4 Programming in the User Boot Mode
Page 480
2019-02-06
Summary of Contents for TMPM3V4
Page 1: ...32 Bit RISC Microcontroller TX03 Series TMPM3V6 M3V4 ...
Page 2: ... 2019 Toshiba Electronic Devices Storage Corporation ...
Page 7: ...Revision History Date Revision Comment 2019 02 06 1 First Release ...
Page 8: ......
Page 22: ...xiv ...
Page 52: ...TMPM3V6 M3V4 3 Processor Core 3 6 Exclusive access Page 30 2019 02 06 ...
Page 148: ...TMPM3V6 M3V4 7 Exceptions 7 6 Exception Interrupt Related Registers Page 126 2019 02 06 ...
Page 178: ...TMPM3V6 M3V4 9 Input Output port 9 2 Block Diagrams of Ports Page 156 2019 02 06 ...
Page 354: ...TMPM3V6 M3V4 14 Synchronous Serial Port SSP 14 6 Frame Format Page 332 2019 02 06 ...
Page 419: ...TMPM3V6 M3V4 Page 397 2019 02 06 ...
Page 462: ...TMPM3V6 M3V4 21 Watchdog Timer WDT 21 5 Control register Page 440 2019 02 06 ...
Page 544: ......