Skip to content

ESP32 Wire.requestFrom() stop parameter not working#5702

@caternuson

Description

@caternuson

Hardware:

Board: Adafruit Feather ESP32
Core Installation version: 1.0.6, 2.0.0, 2.0.0 w/ PR #5683
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: n/a
Upload Speed: 921600
Computer OS: Ubuntu

Description:

Board does not generated expected I2C traffic when attempting to suppress the I2C stop on a read. This is a weird use case, but is needed for implementing chuckified reads when total length exceeds board's read buffer.

Sketch:

#include<Wire.h> #defineWIRE Wire #defineI2C_ADDRESS (0x69) #defineREAD_SIZE (32) voidsetup(){Serial.begin(9600); while(!Serial); uint8_t buffer[READ_SIZE]; WIRE.begin(); WIRE.requestFrom(I2C_ADDRESS, 32, false); uint32_t count = 0; while (WIRE.available() and count < READ_SIZE){buffer[count++] = WIRE.read()} } voidloop(){}

Debug Messages:

None. Code compiles and runs without errors. Issue is seen in actual I2C traffic. See traces below.

BSP 1.0.6 and 2.0.0
stop = true (expected results)
screenshot

stop = false (not expected results)
[NO TRAFFIC]

BSP 2.0.0 with PR #5683
stop = true (expected results)
feather_esp32_pr5683_true

stop = false (not expected results - should be no stop at end)
feather_esp32_pr5683_false

See here for expected outputs on a SAMD21 based board (Adafruit Qt Py):
adafruit/Adafruit_BusIO#64 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions