K65 SDRAM as Default RAM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K65 SDRAM as Default RAM

ソリューションへジャンプ
1,368件の閲覧回数
Mike_d
Contributor IV

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

0 件の賞賛
返信
1 解決策
1,131件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

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

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,132件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

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

0 件の賞賛
返信
1,131件の閲覧回数
Mike_d
Contributor IV

Thanks Daniel, I will try it out.  Where do you recommend I call the _mem_extend function?  Before OS init or before App init?

0 件の賞賛
返信
1,131件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信