11 CACHE CONTROLLER (CCU)
11-6
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
If a higher priority interrupt occurs while an interrupt handler routine is being executed, the cache lock is
released as IL[2:0] is altered. In this case, the cache will be locked again after the handler routine for the higher
priority interrupt ends by the reti instruction as IL[2:0] returns to level 1.
Example 2: When all the LKPRI[7:0] bits to 1 (0xff)
The cache is locked immediately after this setting, then no refilling will occur. When no cached data is hit, the
program is executed at the store location in the memory. If LKPRI[7:0] is altered and the bit corresponding to
the interrupt level set in IL[2:0] is reset to 0, the cache lock is released.
Read ICLKS/CCU_STAT register and DCLKS/CCU_STAT register to check whether the instruction and data cach-
es are locked or not. If the status bit is 1, the cache is locked. If the bit is 0, the cache is not locked.
To release the lock status, set all the LKPRI[7:0] bits to 0.
Caching Operation during Debugging
11.5
In debugging mode, the automatic lock function works on both the instruction cache and the data cache.
To execute the program in debugging mode with the same timings and performance as normal operating mode, set
SBRK/CCU_CFG register to 0 and use only the hardware PC break function for suspending program execution.
Setting SBRK to 1 (default) allows use of both hardware PC break and software PC break. However, execution tim-
ings and performance will not be the same as those in normal operating mode.
Note: When SBRK is set to 0, a software PC break point cannot be set in the a target area for caching.
Cache Data Integrity
11.6
The CCU does not support a snooping function (for maintaining the data in the cache memory to match those in the
external memory). The cache and the external memory are maintained in synch if reading/writing is only executed
in the C33 PE Core. When data are transferred to the area subject to caching via DMAC or when data are written to
the program area subject to caching by the CPU, flush the cache or otherwise ensure data integrity using software.
Control Register Details
11.7
7.1 List of CCU Registers
Table 11.
Address
Register name
Function
0x302300 CCU_CFG
Cache Configuration Register
Enable instruction and data caches
0x302304 CCU_AREA
Cacheable Area Select Register
Select cacheable areas
0x302308 CCU_LK
Cache Lock Register
Configure cache lock function
0x30230c CCU_STAT
Cache Status Register
Indicate cache statuses
0x302318 CCU_WB_STAT
Cache Write Buffer Status Register
Indicate write buffer status
0x302360 CCU_CCLKDV
CCLK Division Ratio Select Register
Set CCLK clock frequency.
The following describes each CCU register. These are all 32-bit registers.
Note: When data is written to the registers, the “Reserved” bits must always be written as 0 and not 1.
Cache Configuration Register (CCU_CFG)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
Cache
Configuration
Register
(CCU_CFG)
0x302300
(32 bits)
D31–9 –
reserved
–
–
–
0 when being read.
D8
WBEN
Write buffer enable
1 Enable
0 Disable
1
R/W
D7–4 –
reserved
–
–
–
0 when being read.
D3
–
reserved
–
–
–
Do not set to 1.
D2
SBRK
Software break enable
1 Enable
0 Disable
1
R/W
D1
IC
Instruction cache enable
1 Enable
0 Disable
0
R/W
D0
DC
Data cache enable
1 Enable
0 Disable
0
R/W
D[31:9] Reserved
D8
WBEN: Write Buffer Enable Bit
Enables the write buffer.
1 (R/W): Enabled (default)
0 (R/W): Disabled