We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hallo
Im using the LPC2478 with 8 MB external memory. Im setting up the SDRAM from within the LPC2400.s file.
Everything is OK, until a NORMAL command is issued to the SDRAM (Right after dummy read)
LDR R4, =NORMAL_CMD ; Write NORMAL Command STR R4, [R0, #EMC_DYN_CTRL_OFS]
The last code line, overwrittes the EMCDynamicCfg0 register with a value resulting in selection of a wrong SDRAM type. Before the call the EMCDynamicConfig0 is 0x00001280 After the line its 0x07664448 ???
The values in R4, R0 and #EMC_DYN_CTRL_OFS are just fine.
Why does that code write to my EMCDynamicConfig0 register? It schould write to the EMCDynamicControl register instead. But it writes to both with a corrupted value?
/Thomas
Reason for dummy read is setting the mode register of the SDRAM as this is set by address lines after mode command is issued.
Usually timings are very important in initializations, the way you ensure that delays are as necessary are not really important, also calculating it roughly by using instructions should be satisfactory.