Hi all,

[unfortnately, the bugzilla is broken, I can't create a new account,
error message indicated that the sendmail command is missing]

The MDIO decoder only "samples" on rising edges, but this is only
true when the master is driving the bus. During read (and probably
during the TA too, if it's a read) - when the slave is driving the
bus, we need to sample on the falling edge of the MDC.

FWIW, the following snippet at least fixes the data decoding, but
generates an "illegal bus state" error at the end of the cycle (and
c45 accesses are not handled correctly!).

    def decode(self):
        while True:
            if self.state == 'DATA' and self.opcode:
                pins = self.wait({0: 'f'})
            else:
                pins = self.wait({0: 'r'})
            self.handle_bit(pins[1])

Attached is a simple read access. The correct read value is 0D28h.

-michael

Attachment: mdio-read_.sr
Description: Zip archive

_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to