Hi, I have attached a patch that will retry up to 200ms for a slave to respond to reading the DC register 0x0910 during slave configuration.
It requires the scan_jiffies_start variable in the ec_fsm_slave_scan struct that was introduced in a previous patch: 0001-slave-scan-retry.patch. Graeme. From: etherlab-dev <etherlab-dev-boun...@etherlab.org> On Behalf Of Graeme Foot Sent: Tuesday, 24 September 2019 5:20 PM To: etherlab-dev@etherlab.org Subject: [etherlab-dev] Hot plugged modules failing to read DC register Hi, I've had occasional issues with EL7332 and EL7342 modules where they will go to SafeOp + Error if you try and use them in DC mode. I've finally had some time to look into it a little further. When the modules go to SafeOp + Error the master outputs the message "Slave has no System Time register; delay measurement only." (with debug level 1). This occurs due to the datagram reading register 0x0910 returning a working counter of zero. I created a quick hack to retry reading the register up to 100 times before failing. After approx. 90ms the EL7342 module I'm testing with successfully returned the datagram and the slave entered Op state successfully. In my test setup I also have an EL5101 module that was doing the exact same thing (and taking around the same time), but I've never really had issues with them before. I suspect the difference is that if you have incorrect settings on the EL7342 module and try to run a motor it can error out and reset itself, causing a situation equivalent to a hot plug. Without my hack both modules need to wait for the SII read to complete for a similar length of time, so it looks like the slaves do not respond to the 0x0910 register request until the EEPROM read is complete. Does anyone know if this is expected behaviour, or know of a better solution than to retry reading the register (up to 200ms ???)? Regards, Graeme.
0002-retry-dc-register.patch
Description: 0002-retry-dc-register.patch
_______________________________________________ etherlab-dev mailing list etherlab-dev@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-dev