This is the mail archive of the ecos-discuss@sources.redhat.com 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]

RE: Question about system bus


It is a External IO Bank for external device to connect to the ARM E7T,
there is no configuration for input or output setting, just like a memory
location, you can either write and read without setting any i/o setting. At
the monent I can get the CS signal while I write out something to the
external IO bank 0 I can get the CS signal, but no CS while reading from ext
io bank 0. the code shows below.
(by the way I am not actually connecting any external device to the EXT IO
Bank0, I just want to test it for the CS signal while reading and writing
from or to the EXT IO BAnk)


#define EXTIOBANK	0x02100000
// define a test address in IO bank 0
#define EXTIOTEST	((unsigned long *)(EXTIOBANK + 0x0010))

// write to the ext io
 while(1)
{
   *EXTIOTEST = 0x55;
}  // there is CS signal appears on the oscilloscope.

// read from the ext io

unsigned long k = 0;

while(1)
{
   k =  *EXTIOTEST;
}  // now no CS signal.


-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of
harri.siirtola@vtt.fi
Sent: 19 June 2001 09:54
To: HuangQiang; eCos; harri.siirtola@vtt.fi
Subject: RE: [ECOS] Question about system bus


At 09:32 19.6.2001 +0100, HuangQiang wrote:
>But in the source code there "k!=1" ( I check it using the debuger). So if
I
>want to read a data from a memory location how can I use it?
>  by "k = *EXTIOBANK0" or other means?
>When I write the data to the external memory location by "*EXTIOBANK0 = 1"
,
>I can get the CS signal for ext io bank0, while read I can't get the CS
>signal, why? Thank you
>huang

If this really is an I/O port, configuring it as inputs before reading
might be worth trying. Your processor may provide select signals according
to I/O configuration. Of course, in this case you're not getting what you
wrote just before but the states of the input lines (maybe random if not
connected to anything). Anyway, you could test if you get a select signal
like this. BTW, have you connected a FIFO or something to the port? In that
case, you could get what you wrote before...

	Harri


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