Hi Tomasz,
Are you using the ver 1.11.1? Actually there are some changes from 1.0, you may find details in ReleaseNotes.txt as below:
Revision 1.11-1 - Update drive strength from FULL to half for all .mem files.
Revision 1.11 - Update for CW script. Remove clkendly, clkdisdly, cmddly of DDR_CR57, phyupdresp of DDR_CR54, ctrlupdmx of DDR_CR53,
dllradly, dllrstdly of DDR_CR51
Revision 1.0 - Initial release
So I think the driver code in sdram.c might be old code, maybe even older than 1.0, so there are some difference from the current version. If you are using the same DDR2 device as TWR-K70, you may use the mem file of "MT47H64M16.mem" in the folder of "C:\Freescale\Kinetis K70 DDR Init Tool\K70Memctrl\Memory Devices\DDR2".
Hope that helps,
Have a great day,
Kan
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------