Wanted to use MPC5777C 16kB data cache as SRAM. Need to understand how to configure data cache as SRAM and also at what address space of MPC5777C data cache is available.
A procedure you may find in the section 9 (DCache is configured the same way as unified cache on MPC5500
Possibly I could offer my example code for MPC5676R which device is using the same core, so Dcache configuration (file Optimizations.c) is compatible:
It is needed to create virtual address space according to DCache size out of used ranges for other memories.
Possibly following thread could be useful for you:
I wanted to disable data cache and use the data cache memory as SRAM, that means the SRAM space will increase by 16kb of data cache. I also wanted to verify it by using the data cache address in the way we access SRAM.
Yes, it can be done Actually on this device is is common practice to put stack to the locked cache. As this device is not equipped with TCM (i.e. DMEM) memory, cache is the fastest local memory.
For instance in this example code you may see it as part of startup (init.s):