09-15-2011 04:14 AM
Hi there,
At this moment I am using the lpc2400.s startup file to make my onn startup file for the lpc1788 dev board from embedded artists.
I want to initialize the SDRAM (EMC) before it calls any C-code, like the LabVIEW target for LPC2400 does, so that I can use the external memory for my stack etc.
The startup file (lpc2400.s) defines the registers for timing and EMC. when I was comparing the registers of lpc1788 and lpc2400 I saw that the define for EMC_DYN_CFG1_OFS is incorrect. it is defined as offset 0x140, which has to be 0x120. 0x140 is EMC_DYN_CFG2_OFS.
CFG2 and CFG3 are also incorrect.
Maybe nobody is going to use it (the dev board only uses dynamic external bus 0)
it should be:
EMC_DYN_CFG0_OFS EQU 0x100
EMC_DYN_RASCAS0_OFS EQU 0x104
EMC_DYN_CFG1_OFS EQU 0x120 ; was 0x140 -> this is CFG2
EMC_DYN_RASCAS1_OFS EQU 0x124
EMC_DYN_CFG2_OFS EQU 0x140
EMC_DYN_RASCAS2_OFS EQU 0x144
EMC_DYN_CFG3_OFS EQU 0x160
EMC_DYN_RASCAS3_OFS EQU 0x164 ;was 0x184
greetings Wouter
09-15-2011 04:29 AM
I was wondering which register this should be. EMC_STA_EXT_W_OFS EQU 0x880
A register with this offset does not exist!
Reading what is mentioned with the value that is written to it, it is EMCStaticExtendedWait
this is register 0xFFE0 8080, so offset 0x80
should be:
EMC_STA_EXT_W_OFS EQU 0x080
greets
10-04-2011 09:31 AM
Hello,
I think that you can find your answer in the link which is given below.
I hope that it will help you.
Reagards,
Hossein
10-04-2011 09:46 AM
Hi,
I have no problem, I only saw an bug in de LPC2400.s file that comes with LabVIEW (2009 and 2010 as I can see) when I was developing.
The bug is that some register offsets are wrong.
It is not mentioned in the link you gave.
Greetings,
Wouter
10-05-2011 03:34 AM
Hello,
I checked the lpc2400 codes and lcp1788 in http://read.pudn.com/downloads132/sourcecode/embed/564705/Keil%E5%B7%A5%E7%A8%8B%E4%BE%8B%E5%AD%90/2... and http://www.lpcware.com/sites/default/files/u-boot-2011.06-ea1788_v1_00_0.patch, respectivelly.
Is it possible that you post a bug that you give in LabVIEW to me and give me more information about what you are lookinf for?I'd like to look at it.
Thanks.
10-07-2011 02:02 AM
The lpc2400.s file is created by KEIL and supported with each example of MCB2400.
in my new KEIL uVision (4.11) I see that the EMC_STA_EXT_W_OFS is corrected (to 0x80)
but LabVIEW uses the old startup file here.
you can check it yourself, going to the target folder.
<LabVIEW folder>\Targets\Keil\Embedded\RealView\Generic\LPC2468\Template\System\LPC2400.s
search EMC_DYN_CFG0_OFS, and search in the datasheet (user manual lpc24xx) for EMCDynamicConfig0 (you will see the other offsets here also)
you can see this in LV2009 and LV2010
10-17-2011 09:46 AM
Hi,
Thanks for your feedback. I checked that and indeed they have difference. But I couldn't find why. Maybe it is because of different registeration algorithem in new version of LabVIEW.
If you could find any possible answer, It would be great that you can share it with me.
Regards,
Hossein