AnsweredAssumed Answered

Moving RTCS Rx/TX buffers to FlexRAM

Question asked by steve miller on Apr 8, 2014
Latest reply on Apr 10, 2014 by Garabo

Has anyone had success moving RTCS Rx/Tx buffers to external memory?

 

On my board design I have some external SRAM available which I have configured the FlexMemory for and its works well (according to my memory tests). I've moved several of my application memory pools to the SRAM and they function as expected.

 

I have had some partial success moving some of the RTCS partitions  out to the external SRAM by defining a memory pool using  global _RTCS_mem_pool. That has worked fine.

 

But when I try to move the actual Rx/Tx buffers  to the FlexMemory ( by defining _BSP_sram_pool and the user_config.h defines, see code snippet from macnet_init.c)  I dont get any response for TCP stack.

 

#if BSPCFG_HAS_SRAM_POOL && BSPCFG_ENET_SRAM_BUF

   buf_ptr = _mem_alloc_system_from(_BSP_sram_pool, rxsize + txsize + ssize + lsize);

#else

   buf_ptr = _mem_alloc_system_uncached(rxsize + txsize + ssize + lsize);  // temporary fix for cache problems... previously _mem_alloc_system

endif

 

 

Its likely that its some caching related issue, but I find it hard to find documentation on how to disable cacheing on FlexMemory (or sections of it). 

 

I tried the user_config  MQX_USE_UNCACHED_RAM  but its conflicts with my lw_mem_allocs that I use and I'm loathe to give up because of shared app code that I use with another board running a Kinetis K21.

 

I'm using MQX 4.0.2 on a Kinetis K60

Outcomes