[etherlab-users] further investigations on NetX500 slave
Florian Pose
fp at igh-essen.com
Thu Mar 6 10:34:04 CET 2008
Hi,
On Wed, Mar 05, 2008 at 03:57:55PM +0100, Phil Sutter wrote:
> Ok, thanks for the hint. Maybe I should send an email to the author, as
> the discussed document is actually being used for teaching students.
That would be a good idea. I don't know where this information
originates from...
> I did so. Interestinly, I got two different logs depending on whether I
> waited a bit (~10-15 seconds) after loading ec_e1000.ko before powering
> on the slave. This is the log when waiting:
>
> | 05.03.2008 14:49:15 usb 3-2: new full speed USB device using uhci_hcd and address 7
> | 05.03.2008 14:49:15 usb 3-2: configuration #1 chosen from 1 choice
> | 05.03.2008 14:49:22 e1000: ec0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
> | 05.03.2008 14:49:22 EtherCAT: Link state changed to UP.
> | 05.03.2008 14:49:22 EtherCAT: 1 slave responding.
> | 05.03.2008 14:49:22 EtherCAT: Scanning bus.
> | 05.03.2008 14:49:22 EtherCAT DEBUG: reading SII data:
> | 05.03.2008 14:49:22 EtherCAT DEBUG: 80 01 40 00
> | 05.03.2008 14:49:22 EtherCAT DEBUG: checking SII read state:
> | 05.03.2008 14:49:22 EtherCAT DEBUG: C0 20 40 00 00 00 00 00 00 00
> | 05.03.2008 14:49:22 EtherCAT ERROR: SII: Error on last SII command!
> | 05.03.2008 14:49:22 EtherCAT ERROR: Failed to read EEPROM size of slave 0.
> | 05.03.2008 14:49:22 EtherCAT: Bus scanning completed in 0 ms.
>
> and this log containing additional lines when plugging the slave in
> right after loading ec_e1000.ko:
>
> | 05.03.2008 14:50:23 usb 3-2: new full speed USB device using uhci_hcd and address 8
> | 05.03.2008 14:50:23 usb 3-2: configuration #1 chosen from 1 choice
> | 05.03.2008 14:50:31 e1000: ec0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
> | 05.03.2008 14:50:31 EtherCAT: Link state changed to UP.
> | 05.03.2008 14:50:31 EtherCAT: 1 slave responding.
> | 05.03.2008 14:50:31 EtherCAT: Scanning bus.
> | 05.03.2008 14:50:31 EtherCAT DEBUG: reading SII data:
> | 05.03.2008 14:50:31 EtherCAT DEBUG: 80 01 40 00
> | 05.03.2008 14:50:31 EtherCAT DEBUG: checking SII read state:
> | 05.03.2008 14:50:31 EtherCAT DEBUG: C0 81 40 00 00 00 00 00 00 00
> | 05.03.2008 14:50:31 EtherCAT DEBUG: checking SII read state:
> | 05.03.2008 14:50:31 EtherCAT DEBUG: C0 81 40 00 00 00 00 00 00 00
> | 05.03.2008 14:50:31 EtherCAT DEBUG: checking SII read state:
> | 05.03.2008 14:50:31 EtherCAT DEBUG: C0 81 40 00 00 00 00 00 00 00
> | 05.03.2008 14:50:31 EtherCAT DEBUG: checking SII read state:
> | 05.03.2008 14:50:31 EtherCAT DEBUG: C0 20 40 00 00 00 00 00 00 00
> | 05.03.2008 14:50:31 EtherCAT ERROR: SII: Error on last SII command!
> | 05.03.2008 14:50:31 EtherCAT ERROR: Failed to read EEPROM size of slave 0.
> | 05.03.2008 14:50:31 EtherCAT: Bus scanning completed in 0 ms.
>
> from reading the source, I assumed that before every "checking SII read
> state" message there will be a "reading SII data" message. Is this
> wrong, or does the master just receive three packets without explicitly
> having requested them?
No, the second octet 0x81 means, that the SII is still busy with
fetching the words into the interface registers. In this case the master
has to check again, until the 'busy' bit is unset. This is the case
here.
Yesterday I had a conversation with one of the Hilscher developers. He
told me, that the only situation for the error flag to be set is an
address range fault (address to high). It seems to me, that the SII
supports only 40 words. I interpret the EtherCAT standard in a way, that
a slave has to support at least 41 words (40 fixed ones + 1 category
delimiter). See below...
> After doing that, the master accepts the image and starts writing, but
> eventually fails. This is the log:
>
> | 05.03.2008 15:31:45 EtherCAT WARNING: EEPROM CRC incorrect. Must be 0xd9.
> | 05.03.2008 15:31:45 EtherCAT DEBUG: writing SII data:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: 81 02 00 00 00 00 80 01
> | 05.03.2008 15:31:45 EtherCAT DEBUG: checking SII write state:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: C1 00
> | 05.03.2008 15:31:45 EtherCAT DEBUG: writing SII data:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: 81 02 01 00 00 00 01 00
> | 05.03.2008 15:31:45 EtherCAT DEBUG: checking SII write state:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: C1 00
>
> [snip]
>
> | 05.03.2008 15:31:45 EtherCAT DEBUG: writing SII data:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: 81 02 40 00 00 00 FF FF
> | 05.03.2008 15:31:45 EtherCAT DEBUG: checking SII write state:
> | 05.03.2008 15:31:45 EtherCAT DEBUG: C1 40
> | 05.03.2008 15:31:45 EtherCAT ERROR: SII: Write operation failed!
> | 05.03.2008 15:31:45 EtherCAT ERROR: Failed to write EEPROM data to slave 0.
> | 05.03.2008 15:32:39 EtherCAT WARNING: 193 datagrams TIMED OUT!
The first thing that is interesting, is that the master never sees the
busy bit. This can mean, that the slave is very fast in storing the
data. This is plausible, because no real EEPROM is used.
The write operation of the 41th word fails (second octat 0x40 = Write
Error). That would support my theory, that only 40 words are supported.
I'll have a telephone call to Hilscher...
--
Best regards,
Florian Pose
http://etherlab.org
More information about the Etherlab-users
mailing list