Hi everyone,
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!
Best Regards
luan
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.
https://community.nxp.com/docs/DOC-102744
Or you can see following application note, section 3.6:
https://www.nxp.com/docs/en/application-note/AN4939.pdf
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”.