5208, Data Cache, Ethernet buffers

cancel
Showing results for 
Search instead for 
Did you mean: 

5208, Data Cache, Ethernet buffers

940 Views
Contributor I
Hello,

I'm working on an ethernet application with the 5208. I store the buffer descriptors for the FEC in the internal SRAM but the ethernet buffers itself in the SDRAM. Everything works well with the data cache turned off. But i would like to use the data cache in my application.
Right now i'm working with the M5208EVB. I want to use 1 MB for buffers (not cached). How can i set this up? Is it possible to use the data cache and the fec with the ethernet buffers residing is SDRAM at the same time?

I already tried the following:
I double the size of the SDRAM (SDCS0[CSSZ] = 64 MByte instead of 32 MByte). This gives me the same memory twice. Now i set up the cache to cache only the first 32 MByte. I use the linker to take care that the buffers are accessed at an uncached address. It seems to work fine. The question here: Is it ok to do it like this? What happens with the SDRAM refesh? Is the SDRAM refreshed twice? Is there a better way to do it?


Regards,
weltreisender75
Labels (1)
0 Kudos
1 Reply

17 Views
NXP Employee
NXP Employee
Your solution should work as long as both the core and FEC are addressing the buffers at their uncached addresses. Basically you don't ever want to access the corresponding address in the cached memory space.
 
The SDRAM refreshes won't be affected.
 
Regards,
Melissa
0 Kudos