User`s manual

RX600 & RX200 Series Simple Flash API for RX
R01AN0544EU0250 Rev.2.50 Page 18 of 33
March 4, 2014
3.12 Execute from Data Flash
A common question is if the MCU can execute code from the data flash. The answer is yes, but performance will be
degraded. The reason for this is that the MCU can access ROM in a single cycle using the same clock that is used for
the CPU (ICLK) while the data flash is accessed using the FCLK (or PCLK on RX610 and RX62x MCUs). In many
cases the FCLK will be less than the ICLK which will lead to read delays. The real issue though is that the data flash
requires multiple cycles to be read no matter what frequency is used for the FCLK. For example, on the RX63N a ROM
read takes 1 cycle of ICLK while the data flash takes 6 cycles of the FCLK. Since the ICLK can operate at a maximum
of 100MHz while the FCLK has a maximum of 50MHz this means the user will potentially see a difference of
performance of around 12x.
Many users also ask if code can be executed from data flash while a ROM operation is on-going through the use of
BGO. This will not work since data flash cannot be accessed during a ROM operation. If this is attempted then an
access exception will occur.
3.13 Access Rules
The table below details what memory areas can be accessed while ROM and data flash operations are on-going.
Type of Operation
On-Going
RAM Access OK? Data Flash Access
OK?
ROM Access OK? External Memory
Access OK?
Data Flash
Yes No Yes Yes
ROM
Yes No No Yes