English
Language : 

SH7211 Datasheet, PDF (967/1228 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer SuperHTM RISC engine Family
Section 21 Flash Memory
21.7 Usage Notes
21.7.1 Switching between User MAT and User Boot MAT
It is possible to switch between the user MAT and user boot MAT. However, the following
procedure is required because these MATs are allocated to address 0.
(Switching to the user boot MAT disables programming and erasing. Programming of the user
boot MAT must take place in boot mode or programmer mode.)
1. MAT switching by FMATS should always be executed from the on-chip RAM. The SH
microcontroller prefetches execution instructions. Therefore, a switchover during program
execution in the user MAT causes an instruction code in the user MAT to be prefetched or an
instruction in the newly selected user boot MAT to be prefetched, thus resulting in unstable
operation.
2. To ensure that the MAT that has been switched to is accessible, execute thirty-two NOP
instructions in on-chip RAM immediately after writing to FMATS of on-chip RAM (this
prevents access to the flash memory during MAT switching).
3. If an interrupt occurs during switching, there is no guarantee of which memory MAT is being
accessed.
Always mask the maskable interrupts before switching MATs. In addition, configuring the
system so that NMI interrupts do not occur during MAT switching is recommended.
4. After the MATs have been switched, take care because the interrupt vector table will also have
been switched.
If the same interrupt processings are to be executed before and after MAT switching or
interrupt requests cannot be disabled, transfer the interrupt processing routine to on-chip RAM,
and use the VBR setting to place the interrupt vector table in on chip RAM. In this case, make
sure the VBR setting change does not conflict with the interrupt occurrence.
5. Memory sizes of the user MAT and user boot MAT are different. When accessing the user
boot MAT, do not access addresses exceeding the 12-kbyte memory space. If access goes
beyond the 12-kbyte space, the values read are undefined.
Rev. 2.00 May. 08, 2008 Page 943 of 1200
REJ09B0344-0200