
ML674001 Series/ML675001 Series User’s Manual
Chapter 9
CACHE MEMORY
9-8
9.4
Precautions in Use
9.4.1 Precautions when Using DMA Transfer
A bank for which the cacheable setting has been made should not be set as the buffer area for carrying out
DMA transfer.
The reason for this is that, while DMA transfer is made with the actual memory, since the
accesses from the CPU are made to the cache memory, setting a cache memory bank as a buffer for DMA
transfer can cause mismatches in the contents of the memory.
Therefore, use only a non-cacheable bank as
the buffer area for DMA transfers.
By using the memory mirroring function, it will be possible to set the buffer area for DMA transfer within a
bank for which the non-cacheable setting is made.
The external memory controller of this LSI mirrors Bank
26 (external SRAM area) to Bank 29, Bank 25 (external ROM area) to Bank 28, and Bank 24 (external
DRAM area) to Bank 27.
For example, it is possible to access a physically single external SRAM using
different addresses of Bank 26 and Bank 29.
By setting one of these banks (say, Bank 26) cacheable and
the other bank (that is, Bank 29) non-cacheable, it is possible to provide a cacheable area (the address area of
Bank 26) and a non-cacheable area (Bank 29) in a single external SRAM.
In this example, the program and data of the CPU that need to be accessed at high speed using the cache
function are placed in the addresses of Bank 26, and the buffer for DMA transfer is placed in the addresses in
Bank 29.
By doing this, since the program and data of the CPU are in Bank 26, they will be cacheable,
while on the other hand, since the buffer accessed by DMA and ARM is in Bank 29, it will be
non-cacheable .
9.4.2 Precautions in Remapping
After the cacheable setting is made for a remapped bank after remapping, do not access the bank before
remapping.
For example, when the external SRAM of Bank 26 for which the non-cacheable setting has
been made is remapped to Bank 0 and Bank 0 is set cacheable, do not access the Bank 26 before remapping
thereafter.
This is because, since the cache is used at the time of accessing Bank 0, the contents of the
memory will always be the continually updated data, but that latest data will not be updated in Bank 26 but
only the old data will be remaining in it.
When setting cacheable so that the same memory is visible in several banks by remapping, always be sure to
set only one of them cacheable and the other bank non-cacheable.
Also, always be sure to access the bank
for which the cacheable has been made.
Otherwise, there will be mismatch in the contents of the memory
as described above.
Cacheable
Buffer read/write
Master transfer
Program/data
access
Bank 26
Bank 29
Non-cacheable
External SRAM
Access prohibited
Buffer area
(Non-cacheable)
ARM program/data area
(Cacheable)
Memory not installed
CPU
DMA controller
Memory map
Cache memory