BSPCFG_HAS_SRAM_POOL

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

BSPCFG_HAS_SRAM_POOL

Jump to solution
843 Views
JHinkle
Senior Contributor I

I'm trying to understand all of the config setting in MQX and how they will impact the application.

There are some BSP config flags that I can not find information on anyplace.

BSPCFG_HAS_SRAM_POOL is one of them.

What does this do?  It appears RTCS requires it.

Where do I look to find info on all of the config setting that are in MQX but do not appear in the MQX documentation?

Thanks.

Joe

Tags (3)
0 Kudos
1 Solution
498 Views
BielikM
Contributor III

Hi Joe,

If macro BSPCFG_HAS_SRAM_POOL is set to 1. MQX create or set memory pool. This pool is mainly used for USB buffers and RTCS buffers. This pool should be placed in faster memory (like SRAM) and should be uncached. This pool is used when MQX is placed in DDR (slowlier and cached). If MQX is running from SRAM than SRAM_POOL is the same as system pool.


Regards,


Martin

View solution in original post

0 Kudos
2 Replies
499 Views
BielikM
Contributor III

Hi Joe,

If macro BSPCFG_HAS_SRAM_POOL is set to 1. MQX create or set memory pool. This pool is mainly used for USB buffers and RTCS buffers. This pool should be placed in faster memory (like SRAM) and should be uncached. This pool is used when MQX is placed in DDR (slowlier and cached). If MQX is running from SRAM than SRAM_POOL is the same as system pool.


Regards,


Martin

0 Kudos
498 Views
pmt
Contributor V

Martin,

Please see this thread:

RTCS does not work when running in External Memory

>>If MQX is running from SRAM than SRAM_POOL is the same as system pool.


This is a faulty assumption because it does not handle the run-time case where the system pool starts in internal memory but is then extended (via _mem_extend()) with external cache-able memory pool at a higher address.  All functions that subsequently call expecting to get non-cachable memory instead get cachable memory. 


Case scenario, in user main, call _mem_extend then try to initialize RTCS (and Ethernet).  The Ethernet buffers get allocated to external memory.        


I was looking for an easy way to deconvolute the BSPCFG_HAS_SRAM_POOL && BSPCFG_ENET_SRAM_BUF code dependencies, but don't have a quick answer.


PMT

0 Kudos