I am using MPC5744P, I need to enable icache and dcache when application is running, and disable icache and dcache when writing data into flash memory.
I wish someone could help me, its Better to provide me an example.Thank you!
Hi, I could recommend to see following example code, file Optimizations.c where you can see ICache_init and DCache_init routine. Although written for different MCU, these initializations are the same. However, MPC5644P use MPU instead of MMU.
Or you can see following application note, section 3.6:
Section 3.5 then describes MPU setup.
The easiest way how to temporarily disable cache is to change MPU attribute of particular region to “cache inhibited”.
Retrieving data ...