Datasheet

Table Of Contents
Section 7 ROM
Rev. 2.00 Jul. 04, 2007 Page 138 of 692
REJ09B0309-0200
7.4 Using RAM to Emulate Flash Memory
To use on-chip RAM in the realtime emulation of data to be written to the flash memory, the on-
chip RAM area can be overlaid on several blocks of flash memory (the emulation area).
Figure 7.3 shows an example where an area of on-chip RAM is overlaid on the emulation area of
the flash memory.
1. The area of on-chip RAM area to be overlaid on the emulation area (i.e. the overlay RAM
area) is fixed to the 256 bytes from H'FFFC00 to H'FFFCFF.
2. The block of flash memory on which the RAM can be overlaid (i.e. the emulation area) takes
up the 256 bytes from H'000000 to H'0000FF.
3. When the FROMCKSTP bit in CKSTPR1 is cleared to 0, the flash memory enters standby
mode. The overlay RAM area is overlaid on the emulation area and becomes the target for
access when the emulation area of the flash memory is accessed.
4. The overlay RAM area can be accessed at both the addresses within the flash memory area and
the original RAM addresses. When using RAM emulation, a vector table is required for the
overlaid RAM area.
5. Overlaying of the on-chip RAM is canceled when the FROMCKSTP bit in CKSTPR1 is set,
taking the flash memory out of standby mode. This should only be done after execution has
made the transition from the emulation area to the RAM area.