English
Language : 

3069RF-ZTAT Datasheet, PDF (657/1003 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER
18.8 Switching between User MAT and User Boot MAT
It is possible to alternate 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 should take place in boot mode or PROM mode.)
(1) MAT switching by the FMATS register should always be executed from the on-chip RAM.
(2) To ensure that the MAT that has been switched to is accessible, execute 4 NOP instructions in
the on-chip RAM immediately before or after writing to the FMATS register of the on-chip
RAM (this prevents access to the flash memory during MAT switching).
(3) If an interrupt has occurred during switching, there is no guarantee of which memory MAT is
being accessed. Always mask the maskable interrupts before switching between MATs. In
addition, configure the system so that NMI interrupts do not occur during MAT switching.
(4) After the MATs have been switched, take care because the interrupt vector table will also have
been switched. If interrupt processing is to be the same before and after MAT switching,
transfer the interrupt-processing routines to the on-chip RAM, and use the settings of the
FVACR and FVADR registers to place the interrupt-vector table in the on-chip RAM .
(5) Memory sizes of the user MAT and user boot MAT are different. When accessing the user
boot MAT, do not access addresses above the top of its 8-kbyte memory space. If access goes
beyond the 8-kbyte space, the values read are undefined.
<User MAT>
<On-chip RAM>
Procedure for
switching to the
user boot MAT
Procedure for
switching to
the user MAT
<User boot MAT>
Procedure for switching to the user boot MAT
(1) Mask interrupts
(2) Write H'AA to the FMATS register.
(3) Execute 4 NOP instructions before
accessing the user boot MAT.
Procedure for switching to the user MAT
(1) Mask interrupts
(2) Write a value other than H'AA to the FMATS register.
(3) Execute 4 NOP instructions before or after accessing
the user MAT.
Figure 18.20 Switching between the User MAT and User Boot MAT
Rev. 5.0, 09/04, page 635 of 978