Hi everyone, I am trying to make data cache to be used as ram in mpc5777c for that purpose I've invalidated and enable the dcache in copy back mode, then I've created a tlb entry at address 0x40040000 and set it as cacheable
The dcache code goes like this:
After doing all this I dont see any difference though when writing at memory address 0x40040000 nothing happens even after removing the tlb I dont see any change.
I've changed the memory to 0x40040000 just for checking the data is written on the ram but not in the dcache (I am using trace32 as debugger) the dcache shows nothing but 0 as defined in the dcache code.
BR,
Indra
Solved! Go to Solution.
The problem is that in the cookbook, used virtual and physical address is 0x4004_0000 but on MPC5777C there is SRAM space on that address.
Cookbook used MPC55xx and there is nothing in the memory map for that area. That's the point.
You need to choose different address, but how I already answered on address 0x4008_0000, SW startup may configure stack located in cache as we are doing it this way on MPC5777C device.
I am not sure what you are trying to do, but this is usually done by startup code, as this area is used for core stack (as this derivative does not have TCM memories).
Sorry foe the confusion what I want to achieve is to use dcache as ram to increase the available ram size. i referred a cookbook it says to use cache as ram the cache is invalidated and enabled in copyback mode. All I want is to increase my ram size my using dcache 16kb memory as ram is that possible
I see. You can use the rest of cache for increasing SRAM capability for instance as TLB6 or increase the area used for stack to 16k. A procedure described in cookbook in correct in principle.
Hi @davidtosenovjan I've implemented everything as per the cookbook i.e. 1. making a tlb entry 2. Invalidating and enabling the cache in copyback mode 3. loacking the cache line
after this I've tried to write at the memory location but here the data is written to both cache and the main memory. Correct me if I did something wrong
BR,
Indra
The problem is that in the cookbook, used virtual and physical address is 0x4004_0000 but on MPC5777C there is SRAM space on that address.
Cookbook used MPC55xx and there is nothing in the memory map for that area. That's the point.
You need to choose different address, but how I already answered on address 0x4008_0000, SW startup may configure stack located in cache as we are doing it this way on MPC5777C device.