[ECOS] Can't get SMSC 91C111 to transmit. Found PXA255-SMSC addressing problem.

Joe Porthouse jporthouse@toptech.com
Wed Jul 19 20:54:00 GMT 2006


All,
	Wow, this is problem is like peeling an onion.
	I have been watching the Data, Address, Chip Selects, and Byte
Enable Lines on the PXA255 to determine why my writes to the SMSC low words
are mangling the upper word.
	I have connected A1-A15 to A1-A15, D0-D31 to D0-D31, DQM0-DQM3 to
nBE0-nBE3, CS to AEN on the SMSC.
	I have noticed that when the PXA255 is accessing the SMSC in 16 bit
mode, the DQM0-3 always stay low (no byte masking).  This seems to present a
problem since all 32 bits on the SMSC will be enabled, clocking in garbage
data on the high word.  I may need to tie DQM2,3 high to always mask the
high word when accessing in 16 bit mode. Any exp on this out there?
	I have also noticed that when the PXA255 is accessing the SMSC in 32
bit mode, while the DQM0-3 transition accordingly with the high or low word
is being accessed, so does A1.  My theory is that with A1 going high, it is
effecting where data is being written in the SMSC.  I may need to tie A1 low
when accessing in 32 bit mode to ensure that the SMSC address will always
point to a word boundary.  SMSC docs indicate A1 is overridden by DQM2,3 but
it seems to not function as expected.  Any exp on this out there on this?
	16 or 32 bits with the eCos, SMSC 91C111 driver, is there a
preference?
Thanks,
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Himanshu Patel
Sent: Wednesday, July 19, 2006 1:10 AM
To: jporthouse@toptech.com; ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Can't get SMSC 91C111 to transmit. Reference design
needed?

Hi Joe Porthuse,

I ported eCos and TCP/IP on Triton Evaluation Board few months back. This
board has the same configuration (PXA255 and SMSC91C111). Download TRITON
StarterKit Documentation (If you don't get, then let me know. I will send
you). The dociment has connection details.

Regards,

Himanshu Patel
----- Original Message ----- 
From: Joe Porthouse
To: ecos-discuss@ecos.sourceware.org
Sent: Wednesday, July 19, 2006 12:17 AM
Subject: RE: [ECOS] Can't get SMSC 91C111 to transmit. Reference design
needed?


All,
Does anyone have a reference design showing the SMSC 91C1111 connection to
the PXA255 processor that will work with the current eCos SMSC91Cxx driver?
Thanks,
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Joe Porthouse
Sent: Tuesday, July 18, 2006 2:03 PM
To: 'Himanshu Patel'; ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] Can't get SMSC 91C111 to transmit.

All,
I'm making some progress.  Determined that the TX interrupt is not
firing.  Interrupt mask bits are not even being set properly.
Looks like I may have a problem with the address/data/signal line
connection between the PXA255 and the SMSC 91C111.  Whenever I write to a
the lower 16 bits of a 32 bit machine word, the upper 16 bits gets mangled.
Very obvious when writing to the 16 word below the Bank Select register
since the bank select register is also changed.  I'm surprised that the chip
is even receiving in this state.
I have connected the data and address one for one to the PXA255,
address lines starting at A1.  Driver also seems to have an option to shift
bits with default of not shifting (how I currently have it connected).  I
also have the select line configured for VLIO and a 16 bit address bus.  I
also referred to a PXA270 reference design and verified the proper design.
I'm not sure what is happening.  I have two boards doing the same thing so I
don't believe its bad parts or improper assembly.
My guess is that the PXA255 is taking the 16 bit write and
converting it to two 16 bit writes (32 bit machine word), and clobbering the
next 16 bit word in memory.  I'm now going to dive into the processor manual
to try to get a picture on what might be happening.

Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750

-----Original Message-----
From: Joe Porthouse [mailto:jporthouse@toptech.com]
Sent: Tuesday, July 18, 2006 9:45 AM
To: 'Himanshu Patel'; 'ecos-discuss@ecos.sourceware.org'
Subject: RE: [ECOS] Can't get SMSC 91C111 to transmit.

Himanshu,
Network cable is not a problem.  I move the same cable to an
off-the-shelf PXA255 running redboot and it works without a problem.

I have inserted some extra logging in the eth_drv_write() routine
and can see that it is being called with the correct send packet data, but
it is not able to send it correctly.  Since the "Ethernet Send:" logging
occurs after this point, I was not seeing send log messages.
Receive seems to work and I see the receive logs working.  I am
tracking it through to see what is failing.
Thanks,
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Himanshu Patel
Sent: Tuesday, July 18, 2006 1:12 AM
To: Himanshu Patel; jporthouse@toptech.com; ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Can't get SMSC 91C111 to transmit.

---- Original Message ----- 
From: Himanshu Patel
To: jporthouse@toptech.com ; ecos-discuss@ecos.sourceware.org
Sent: Tuesday, July 18, 2006 10:37 AM
Subject: Re: [ECOS] Can't get SMSC 91C111 to transmit.


Hi Joe Porthouse,

Are you using straight cable or cross cable? Are you getting "Network Cable
Unplugged" message on the PC?

Regards,

Himanshu Patel

----- Original Message ----- 
From: Joe Porthouse
To: ecos-discuss@ecos.sourceware.org
Sent: Monday, July 17, 2006 11:15 PM
Subject: [ECOS] Can't get SMSC 91C111 to transmit.


All,
I am attempting to get the Ethernet working on a new hardware
design and I am running into difficulty getting the
driver/controller/hardware to transmit a packet.

My platform is a PXA255 with a SMSC LAN91C111i-NU Ethernet
Controller. I am using a known working Redboot firmware configuration (on a
PXA255/SMSC 91C111) to test out the Ethernet functionality on this hardware.

The Serial EEPROM is currently blank, but I am specifying the
MAC address using FCONFIG in Redboot as:
fconfig
Run script at boot: false
Use BOOTP for network configuration: false
Gateway IP address: 172.16.0.1
Local IP address: 172.16.8.111
Local IP address mask: 255.255.0.0
Default server IP address: 172.16.8.109
Console baud rate: 115200
Set eth0 network hardware address [MAC]: true
eth0 network hardware address [MAC]: 0x18:0xF0:0x9F:0xE5:0x18:0x80
GDB connection port: 9000
Force console for special debug messages: true
Console number for special debug messages: 0
Network debug at boot time: true

I have turned on the debugging in the SMSC driver and receive
the following on startup:
9875430+00021LAN91CXX - supposed BankReg @ 800030e = 3300
LAN91CXX - type: 9, rev: 2
LAN91CXX - status: 0000
Got ESA from RedBoot option
LAN91CXX - ESA: 18:f0:9f:e5:18:80
Ethernet send:
0000B6B4: FF FF FF FF FF FF 18 F0 9F E5 18 80 08 06 |...Ethernet
recv:
00011064: FF FF FF FF FF FF 00 0F 1F 14 8A 86 08 06 |..............
à|
Ethernet eth0: MAC address 18:f0:9f:e5:18:80
IP: 172.16.8.111/255.255.0.0, Gateway: 172.16.0.1
Default server: 172.16.8.109

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version W468 V3I4 - built 17:28:27, Jul 16 2006

Platform: TTRCU (XScale PXA255)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x04000000, [0x00400000-0x03fb1000] available
FLASH: base 0x50000000, size 0x02000000, 128 blocks of 0x00040000 bytes
each.
RedBoot>

Using Ethereal to monitor the Ethernet traffic I see no packet
being transmitted during startup.

When I attempt to ping the hardware from a PC the ping fails.
On the Ethernet traffic monitor I can see the "ARP - Who Has 172.16.8.111?
Tell 172.16.65.95." message going to the hardware, but no response. Redboot
must be receiving the request since it logs it, but does not attempt to send
a reply.
RedBoot> Ethernet recv:
00011674: FF FF FF FF FF FF 00 0F 1F 14 8A 86 08 06 |.............>
|
Ethernet recv:
00011C84: FF FF FF FF FF FF 00 0F 1F 14 8A 86 08 06 |..............à
|
Ethernet recv:
00012294: FF FF FF FF FF FF 00 0F 1F 14 8A 86 08 06 |..............
|

When I attempt to ping the PC from the hardware the ping also
fails. On the Ethernet traffic monitor I see no activity. After several 5
second or so I sometimes see a "Cannot reach server", other times I get
"received 0 of 10 expected":
RedBoot> ping -h 172.16.8.109
PING: Cannot reach server '172.16.8.109' (172.16.8.109)
RedBoot>

Do I have an auto-negotiate failure? Is there a problem with
having a blank serial EPROM? I'm still not sure if I have a configuration
or hardware problem at this time. I am suspecting hardware, but without
seeing "Ethernet Send" messages, it looks like a configuration issue in
Redboot/SMSC driver. I'm not quite sure how to proceed with debugging from
this point. Any help would be greatly appreciated.

Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750




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



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




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




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



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




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



More information about the Ecos-discuss mailing list