Moving RTCS Rx/TX buffers to FlexRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Moving RTCS Rx/TX buffers to FlexRAM

499 Views
stevemiller
Contributor I

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

0 Kudos
1 Reply

326 Views
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Steve,

This is definitely not recommended. We have already experimented that when the Tx/Rx buffers are moved out of the internal SRAM causes failures in the TCPIP even it they were successfully configured. This also applies for the USB buffers.


Regards,
Garabo

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos