Hello,
Can somebody show me the steps required to switch the TWR-K65F180 MQX 4.2 configuration to use the external SDRAM instead of internal SRAM? I'm using the cw10gcc projects.
Thanks,
-Mike
Solved! Go to Solution.
Hi Mike
MQX 4.2 BSP has SDRAM support for TWR-K65F180M. You need to enable BSPCFG_ENABLE_SDRAMC in user_config.h file before building MQX libraries. You can refer to SDRAMC demo under the MQX installation folder. C:\Freescale\Freescale_MQX_4_2\mqx\examples\sdramc
If you need to use SDRAM as the default RAM, I think you can try the function _mem_extend.
For example,
_mem_extend(BSP_SDRAM_BASE, BSP_SDRAM_SIZE).
After call _mem_extend, then system will allocate memory from SDRAM space.
I hope it helps.
Regards
Daniel
Hi Mike
MQX 4.2 BSP has SDRAM support for TWR-K65F180M. You need to enable BSPCFG_ENABLE_SDRAMC in user_config.h file before building MQX libraries. You can refer to SDRAMC demo under the MQX installation folder. C:\Freescale\Freescale_MQX_4_2\mqx\examples\sdramc
If you need to use SDRAM as the default RAM, I think you can try the function _mem_extend.
For example,
_mem_extend(BSP_SDRAM_BASE, BSP_SDRAM_SIZE).
After call _mem_extend, then system will allocate memory from SDRAM space.
I hope it helps.
Regards
Daniel
Thanks Daniel, I will try it out. Where do you recommend I call the _mem_extend function? Before OS init or before App init?
I would suggest you call _mem_extend from a task, then MQX kernel data will be in SRAM and memory pool for dynamic memeory allocation will be in SDRAM.
Have a great day,
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------