From mboxrd@z Thu Jan 1 00:00:00 1970 From: "HuangQiang" To: "eCos" , Subject: RE: [ECOS] Question about system bus Date: Tue, 19 Jun 2001 09:11:00 -0000 Message-id: References: <3.0.32.20010619115422.009da4a0@vttmail.vtt.fi> X-SW-Source: 2001-06/msg00664.html 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