Skip to content

ESP32S2: I2C bus object crashes or failes when used after soft reboot #4046

Closed
@ThomasAtBBTF

Description

@ThomasAtBBTF

This code works fine when the MagTag boots cold.

import board
import busio
print(dir(board))
i2c = busio.I2C(board.SCL, board.SDA)

def printdevices():
    i2c.try_lock()
    # Find the I2C devices available.
    devices = i2c.scan()
    print("I2C devices:", len(devices))
    for device in devices:
        print(hex(device))
    i2c.unlock()
    print("I2C unlocked! ")

printdevices()

image

After connecting to Putty (here with COM29)
and pressing ctrl-c to get to the CP prompt
and pressing ctrl-d to reload...

There is a core code hard crash:
image

And the CDC connection to Putty is disconnecting:
image

PS: I observe similar behaviour using a featherS2.

Metadata

Metadata

Labels

bugcrashespressifapplies to multiple Espressif chips

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions