ADuCM310 Hardware Reference Manual
UG-549
Rev. C | Page 85 of 192
CPU Execution Speed
The basic execution speed of the
is one CPU cycle per clock cycle. The default clock speed is 80 MHz. This speed is achieved
when running from cache but is slightly less when running directly from flash. An average execution speed of over 70 MHz is typically
achieved for typical C code. For more details and how to achieve full speed operation for critical code, see the
Memory Cache
A memory cache is provided on-chip to speed up program execution. The instruction cache is configured and set up by default. If the
user writes code to the flash, the user must perform a chip reset to ensure that old cached data is cleared and that the new code can be
executed. If a chip reset is not an option, the following code can clear the cache. iCache must be 0x10001 or (CACHESETUP_IINIT_EN|
CACHESETUP_DINIT_EN) to clear both the instruction and data cache.
int FeeCacheClr(int iCache)
{
unsigned int ui1;
ui1 = pADI_FEE->CACHESETUP;
pADI_FEE->CACHEKEY = 0xf123f456;
pADI_FEE->CACHESETUP = ui1|(iCache&(CACHESETUP_IINIT_EN|CACHESETUP_DINIT_EN));
while(pADI_FEE->CACHESTAT&(iCache&(CACHESETUP_IINIT_EN|CACHESETUP_DINIT_EN)));
pADI_FEE->CACHEKEY = 0xf123f456;
pADI_FEE->CACHESETUP = ui1;
return 1;
}
Normally, programming tools used take care of this when downloading code onto devices.