Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in MicroPython I2C code #43

Open
drwheeler opened this issue May 16, 2022 · 1 comment
Open

Bug in MicroPython I2C code #43

drwheeler opened this issue May 16, 2022 · 1 comment

Comments

@drwheeler
Copy link

Trying to read from the I2C bus causes an ESP32 Guru Meditation Error:

i2c = machine.I2C(0, scl=machine.Pin(14), sda=machine.Pin(13))
i2c.scan()
[64]
i2c.readfrom_mem(64, 0, 2)

Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400869fc PS : 0x00060031 A0 : 0x80086bb2 A1 : 0x3ffb1190
A2 : 0x3ffe5998 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000800
A6 : 0x3ffb4560 A7 : 0x3ffb4560 A8 : 0x3ffc4198 A9 : 0x00000901
A10 : 0x00060923 A11 : 0x00060920 A12 : 0x00000001 A13 : 0x3ffc419c
A14 : 0x00000000 A15 : 0x3ff53000 SAR : 0x0000001e EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000008 LBEG : 0x4008d9a0 LEND : 0x4008d9bc LCOUNT : 0x00000000

Backtrace:0x400869f9:0x3ffb11900x40086baf:0x3ffb11d0 0x40083f85:0x3ffb1200 0x40089ea9:0x3ffca5e0 0x40091141:0x3ffca600 0x4012628b:0x3ffca640 0x40119b16:0x3ffca690 0x401169a9:0x3ffca6c0 0x40116a21:0x3ffca700 0x400e20bd:0x3ffca740 0x400e8819:0x3ffca770 0x400e8951:0x3ffca790 0x40085ca5:0x3ffca7b0 0x400e205a:0x3ffca850 0x400e8819:0x3ffca8b0 0x400e8842:0x3ffca8d0 0x40118bdd:0x3ffca8f0 0x40118f44:0x3ffca980 0x400f89c8:0x3ffca9c0

Apparently there is a bug in ESP32 SDK:
https://forum.micropython.org/viewtopic.php?t=11330
Issue fixed and closed Mar 5 2022: espressif/esp-idf#8548

New firmware build required.

@AwesomeCronk
Copy link

AwesomeCronk commented Jul 26, 2022

I am seeing the same thing when I use machine.UART. I'd try building firmware, but I don't want to try and tackle the slew of errors I'm undoubtedly going to find. Have you built this fork successfully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants