Switching Between User Mat And User Boot Mat - Renesas H8S/2100 Series Hardware Manual

6-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

24.10

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 both of 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 programmer mode.)
1. MAT switching by FMATS should always be executed from the on-chip RAM.
2. To ensure that switching has finished and access is made to the newly switched MAT, execute
four NOP instructions in the same on-chip RAM immediately after writing to FMATS (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.
5. Memory sizes of the user MAT and user boot MAT are different. Do not access a user boot
MAT in a space of 8 kbytes or more. If access goes beyond the 8-kbyte space, the values read
are undefined.
<User MAT>
Figure 24.17 Switching between User MAT and User Boot MAT
<On-chip RAM>
Procedure for
switching to
user boot MAT
Procedure for
switching to
user MAT
Procedure for switching to user boot MAT:
1. Disable interrupts (mask).
2. Write H'AA to FMATS.
3. Execute four NOP instructions before accessing the user boot MAT.
Procedure for switching to user MAT:
1. Disable interrupts (mask).
2. Write any value of H'AB to H'FF to FMATS.
3. Execute four NOP instructions before accessing the user MAT.
Section 24 Flash Memory
<User boot MAT>
Rev. 1.00 May 09, 2008 Page 769 of 954
REJ09B0462-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents