Using MPC5777C Data cache as SRAM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using MPC5777C Data cache as SRAM

2,167件の閲覧回数
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 返答(返信)

2,143件の閲覧回数
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 件の賞賛
返信

2,134件の閲覧回数
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 件の賞賛
返信

2,062件の閲覧回数
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 件の賞賛
返信

2,008件の閲覧回数
Kothe1995
Contributor I
init.s is not present in above example code
0 件の賞賛
返信

1,966件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

I can see it there.

davidtosenovjan_0-1695370696112.png

 

0 件の賞賛
返信