NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
32
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
2.4.6 REMAPPING
RAM is normally with faster access speed and wider than ROM. For this reason, it is better to store
for the vector table and interrupt handlers if the memory on system address at 0x0 is of RAM. However,
if RAM is located at address 0x0 on power-up, there is not a valid instruction in the reset vector (0x0)
entry. Therefore, you must allow ROM to be located at 0x0 during normal execution. The changeover
remapping from the reset to the normal memory map is normally caused by writing to a memory-
mapped register.
In W90P710 the memory remapping can be achieved by setting EBI control registers. The following
example is a MACRO, which achieves performs the remapping when booting. The program flow of this
example is as Figure 2-4.
In general, the memory remapping only needs to be preformed once at reset. Thus the reset value
of SDCONF0 is used to check if the system has been initialized. If the system memory needs to do
remapping, the correct instructions to be fetched after remapping is important are critical. Therefore, the
MACRO will calculate the correct instruction fetch address after remapping. It does this by using labels
and program counter to know get the current execution position and execution position decided at link-
time. If the current execution position is different to from execution position decided at link-time, the
MACRO will calculate the correct instruction fetch address after remapping according to their address
relation. Finally, the value of PC will be update immediately after remapping. Because the memory
bases can be controlled by registers, what we called remapping means setting the EBI control registers.
The configuration values are predefined as rEBICON, rROMCON, rSDCONF0, rSDCONF1, rSDTIME0,
rSDTIME1, and are stored to relative control registers by store multiple instruction (STMIA). The source
code is listed as follows: