Using MPC5777C Data cache as SRAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using MPC5777C Data cache as SRAM

1,940 次查看
Kothe1995
Contributor I

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.

0 项奖励
回复
5 回复数

1,916 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

A procedure you may find in the section 9 (DCache is configured the same way as unified cache on MPC5500

https://www.nxp.com/docs/en/application-note/AN2865.pdf

Possibly I could offer my example code for MPC5676R which device is using the same core, so Dcache configuration (file Optimizations.c) is compatible:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-XPC567XRKIT-PinToggleStationery-CW210/ta...

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:

https://community.nxp.com/t5/MPC5xxx/Dcache-as-RAM-in-MPC5777C/m-p/1660816/highlight/false#M23737

0 项奖励
回复

1,907 次查看
Kothe1995
Contributor I

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. 

0 项奖励
回复

1,835 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

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):
https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5777C-PinToggleStationery-GHS714/ta-p...

0 项奖励
回复

1,781 次查看
Kothe1995
Contributor I
init.s is not present in above example code
0 项奖励
回复

1,739 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I can see it there.

davidtosenovjan_0-1695370696112.png

 

0 项奖励
回复