Skip to content

Conversation

gimdh
Copy link

@gimdh gimdh commented Jun 12, 2023

Wire now seems to require method begin() to be called before beginTransmission(). This patch accomodates such new requirement by executing _i2cPort->begin(); if Wire is used.

Tested on Lolin32, and can confirm it works now with the fix. Not sure if this change should be specifically applied for ESP32, or can be generalized to non-TEENSY3_I2C implementations.

Error message

[581391][E][Wire.cpp:422] beginTransmission(): could not acquire lock
[581392][E][Wire.cpp:526] write(): NULL TX buffer pointer
[581392][E][Wire.cpp:448] endTransmission(): NULL TX buffer pointer
[581398][E][Wire.cpp:481] requestFrom(): NULL buffer pointer

Related links

https://community.platformio.org/t/updating-espressif-32-to-5-2-0-breaks-wire-cpp/30282/2
espressif/arduino-esp32@9bceb28
https://github.com/espressif/arduino-esp32/blob/master/libraries/Wire/src/Wire.cpp#L278-L308

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

Successfully merging this pull request may close these issues.

1 participant