I am using twr - k70f120m board. The IDE I am using is keil uvision v188.8.131.52. I wanted to test the DDR in the twr board. How do I test it ? Is there any example or document which tells how to write and read from DDR ? I need to know the steps and initialization required to write and read from DDR.
In keil for projects there are four options,
I thought if we select the Int Flash DDRData the code will be written to DDR, But DDR is said to be volatile, So on power cycle the code should not run. But it is still running.
Can anyone please help me with the concept of the DDR.
Yes, there are two different build configurations in MQX K70 projects. SRAM_DATA and DDR_data.
It means that the linker file is configured to store your data in SRAM or DDR.
Please refer to below link
You can use _bsp_ddr2_setup() to initialize DDR, then if you need to disable DDR, you can disable bit 14 (DDR clock gate) to disable DDR, and next you can enable bit14 if you need to use DDR again.
For how to use DDR in MQX, you need to call _mem_extend to add physical memory to the default memory pool.
Please read MQX_Reference_Manul
Please also read https://community.nxp.com/message/409116?commentID=409116#comment-409116 for how to use _mem_extend.
Thank you very much for the reply.
I have some doubts regarding the DDR.
In the link which you have mentioned, It is stated that ,
Should I first enable bit 14 of SIM_SCGC3 register and then use the _bsp_ddr2_setup() function or any one ?
And How do I write and Read from the memory address in DDR ? Is there any function available for this ?