Forum Discussion
booting out of flash and starting out of DDR2
I have a problem with my DDR2-RAM.
I want to boot out of my Flash Device and run the uClinux in my DDR2. The Problem is, that my DDR2 is storing some initalization data in the first regions of the ddr2 and that i shouldn't use that adr-area. i doesn't help just changing the reset and exception vector. hope my description is enough. MfG Sven9 Replies
- Altera_Forum
Honored Contributor
hi!
as far as i know, the ddr2 memory controller uses the first few bytes at startup to calibrate its timings for accesses and destroys data located there. take a look at the controller user guide from altera http://www.altera.com/literature/ug/ug_ddr_ddr2_sdram_hp.pdf chapter 5, "The Testbench Stages". additionally it's not the best practice to store initialisation data in volatile memories since you can't rely on the contents after startup or reset situation. collect these data dynamically from the used peripherals or store static data also in the flash. greetz, schafrichter - Altera_Forum
Honored Contributor
I start out of the flash and unzip it in the ddr2, but i need a offset to not erase the inital data. or i need to know where the calibration data is stored and how to copy it to the flash.
the best solution for me is to start uClinux with an offset of 0x1000 or something like that. is there a way to modify the start adress? - Altera_Forum
Honored Contributor
Does the Kernel not unzip itself automatically ?
- Altera_Forum
Honored Contributor
--- Quote Start --- I start out of the flash and unzip it in the ddr2, but i need a offset to not erase the inital data. or i need to know where the calibration data is stored and how to copy it to the flash. --- Quote End --- okay, this is a starting point. i have some further questions. the calib data you're mentioning. do you mean with that the data which is written by the controller? or do you mean calib data which you have written to start special actions defined by yourself (or uClinux or something like this)? if you mean the calib data from the controller, then you can overwrite them without care. they are just for calibration at startup time. so you could easily copy the uClinux-image and start it from ddr2. schafrichter - Altera_Forum
Honored Contributor
I am working on 2.6.31 and I will add an config for the offset to ddr which might be helpful to your case.
- Hippo - Altera_Forum
Honored Contributor
i can't start any programm in the first 0x300 or 0x500 adr-areas or my programm or uclinux just freezes.
hippo do you know where to change that setting? would be helpful for my project to know where to change that right now :) - Altera_Forum
Honored Contributor
just a question: did you try another (type of) memory? copy the image to an sram or onchip (i do not work with uClinux, so i don't know how much memory space it needs to run from).
i had some issues when i set the start address of the nios ii to ddr2 ram. after a hardware reset the nios II did not run since some of the data was overwritten by the ddr2 controller. - Altera_Forum
Honored Contributor
the onchip is way too small and the sram too :(
but that is not my problem the problem is that uclinux wants to unzip it self to the start of the ddr and the calibration data is killed - Altera_Forum
Honored Contributor
Changing the starting area with an offset of 0x<offset> you just have to alternet the gen_nios2.h.pl and the exception vector :)
works for me ;) mfg sven