question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I2C fails after upgrading to 4.2.0

See original GitHub issue

Just upgraded a working project from 3.2.1 to 4.2.0 and the fw wont even start it shows this backtrace:

ELF file SHA256: 0000000000000000

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12776
load:0x40080400,len:3032
entry 0x400805e4
[     3][E][Wire.cpp:319] beginTransmission(): could not acquire lock
[     3][E][esp32-hal-i2c.c:142] i2cWrite(): could not acquire lock

assert failed: xQueueGenericSend queue.c:820 (pxQueue)


Backtrace:0x40083ce5:0x3ffe39000x4008d061:0x3ffe3920 0x40092651:0x3ffe3940 0x4008daba:0x3ffe3a70 0x400ff2e5:0x3ffe3ab0 0x400ff499:0x3ffe3ad0 0x400e8119:0x3ffe3af0 0x400e79fe:0x3ffe3b20 0x400e7e20:0x3ffe3b40 0x400e349b:0x3ffe3bb0 0x400e360e:0x3ffe3bd0 0x400ede39:0x3ffe3bf0 0x4011e20b:0x3ffe3c10 0x400833fe:0x3ffe3c40 0x400791f2:0x3ffe3c90  |<-CORRUPTED
  #0  0x40083ce5:0x3ffe39000 in panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:402

I removed the I2C initialization and calls and the firmware starts working again, so it’s confirmed that the issue is on I2C.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
valeroscommented, May 16, 2022

Hi guys ! The latest core v2.0.3 is now available in the dev branch of this platform. Please retest your projects using upstream version of the platform. For example:

[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git
framework = arduino
board = esp32dev
monitor_speed = 115200
0reactions
ivancmzcommented, May 17, 2022

Hey everyone, it turns out in my case the problem was I2C being initialized on a ctor that was probably running before the libraries. You can see the discussion here. I will give Arduino 2.0.3 a try, my goal for upgrading is to be able to use the certificate bundle, and I was waiting for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting I2C - Texas Instruments
Each I2C slave device connected to the I2C bus has its own slave address and responds only to that address when an I2C...
Read more >
DUE i2c not stable - Arduino Forum
I am working on a project with DUE for a long time. After upgrading IDE 1.6.6, I'd have wished the wire library is...
Read more >
I2C timeouts - Google Groups
line 637 & 638. I.e. uboot configures GPIO pins and not I2C2. So we have two options to fix I2C2 timeout issues: a)...
Read more >
Pixhawk 4 - I2C sensors not found
But there is a problem, I would like to connect I2C sensors but they are not recognized. I tried with 2 different Bar...
Read more >
I2C non-blocking communication - NXP
if the I2C bus error caused fail of the sensor init process, the error flag //is set. The main application then should evaluate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found