HomeGeneral

Flashburn Discussion

Tips for dealing with SDRAM/CE0 on DSK6713 

Michael Marzalek
Michael Marzalek
Posts: 1

9/3/2016
If your program and data fit into IRAM (internal RAM) then no need to read further. Mine did not and SDRAM is MUCH slower than IRAM. This is not profound but posted in an attempt to save you some time.

You can put non time critical code, constants, and RAM into SDRAM by declaring sections:
#pragma SET_CODE_SECTION( ".text:slow" )

Then in the linker command file add lines like:
.text:slow : {} > FLASH run = CE0b, LOAD_START(FLASH_SLO_TEXT_START), RUN_START(RAM_SLO_TEXT_START), SIZE(SLO_TEXT_SIZE)

With code in SDRAM, it can't be loaded by the boot since SDRAM is not yet alive. So I created a FinishBoot() routine in assy (probably could have been done in C) that copies the Flash slow code to it's SDRAM location. Call it after SDRAM is alive and don't put any code before that call into SDRAM. It's pretty simple to copy the existing boot code. At the end of the FinishBoot() routine, to get back to the return address put a:
nop 5
B.S2 B3 ; return
nop 5

For FlashBurn, the hex command file did not burn enough of the Flash so I had to modify the length parameter.

Many thanks to Ed for all he's done to create and support FlashBurn(). His example is perfect to leverage from.

Mike M
edited by mikemarz on 9/5/2016
0 link




Site Map

Copyright© 2013 - Software Design Solutions, Inc. All rights reserved.