This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Strange DELAY macro in hal_platrom_setup.h


Another issue:
In ixdp425.h you have:
#define IXP425_SDRAM_REFRESH_CNT  0x081
Same line in grg.h is:
#define IXP425_SDRAM_REFRESH_CNT  0x081a

According to the SDRAM Datasheets the GRG refresh rate is ok, but the
IXDP is not. 
The IXDP SDRAM controller has to refresh the 8192 rows each 64 ms which
means one refresh each 7.81us. At 133Mhz it means ~ 1039 cycles which is
0x40F. This refresh rate is twice as fast then in the grg because of the
different SDRAM technologies in the two boards.

Therefore the correct definition in ixdp425.h should be:
#define IXP425_SDRAM_REFRESH_CNT  0x40F



-----Original Message-----
From: Mark Salter [mailto:msalter@redhat.com] 
Sent: Tuesday, February 28, 2006 2:28 PM
To: Shmuel Vagner
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Strange DELAY macro in hal_platrom_setup.h

On Sun, 2006-02-26 at 16:49 +0200, Shmuel Vagner wrote:
> HI,
> In the platform initialization code for the IXP425 the SDRAM
> initialization uses a DELAY macro.
> The strange thing is that the delay macro is empty and does not do any
> delay (Note the #if 0 in the code below):
> 
> .macro DELAY cycles, reg0
> #if 0
>     ldr     \reg0, =\cycles
>     subs    \reg0, \reg0, #1
>     subne   pc,  pc, #0xc
> #endif
> .endm
> 
> I checked with the IXP425 and the SDRAM documentation and they state
> that delays are required. Moreover the initialization works fine and I
> did not notice any memory problems.
> 
> Can someone please explain this?

Your analysis is correct. This macro should have the delay enabled. I
probably turned off the delay for some debugging purpose and forgot to
turn it back on. The delay is necessary according to the docs but it
seems that it almost always works without the delay. It may take many
reboots before it fails to initialize SDRAM correctly, but I believe
that it will fail eventually.

--Mark



 
 
************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses.
************************************************************************
************


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]