8000 unable to recover from I2C bus error · Issue #1765 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
unable to recover from I2C bus error #1765
Closed
@PeterKenyon

Description

@PeterKenyon

OK this version (1.5.2) has introduced a breaking change for I2C.
It is impossible to recover from an I2C bus error

1.5.1
from pyb import I2C
i2c=I2C(2,I2C.MASTER)
i2c.mem_write(8,76,112) # force a reset causes i2c error (but not until we next do a read)
i2c.init(I2C.MASTER) # reset the i2c bus to recover
i2c.mem_read(1,76,112) # works

1.5.2
from pyb import I2C
i2c=I2C(2,I2C.MASTER)
i2c.mem_write(8,76,112) # force a reset causes i2c error
i2c.init(I2C.MASTER) # reset the i2c bus to recover
i2c.mem_read(1,76,112) # nope doesnt work OSError 116
i2c=I2C(2,I2C.MASTER) # see if this works
i2c.mem_read(1,76,112) # nope doesnt work

see:
http://forum.micropython.org/viewtopic.php?f=2&t=1027

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugportsRelates to multiple ports, or a new/proposed port

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0