-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Open
Open
Copy link
Labels
area: I2CbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: ArduinoArduino boards and shieldsArduino boards and shieldspriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
According to the docs, a negative return from i2c_target_read_requested_cb_t
or i2c_target_read_processed_cb_t
should:
cause the controller to ignore bus operations until a new start condition is received.
However, what actually happens is that the I2C target stops responding, not quite sure what happens, voltage turns off and break points don't get hit anymore.
Here's a normal test with these functions returning 0:
I2C> scan
I2C address search:
0x60 (0xC0 W) (0xC1 R)
I2C> [0xC1 r:1]
I2C START
TX: 0xC1 ACK
RX: 0x42 NACK
I2C STOP
I2C> [0xC1 r:1]
I2C START
TX: 0xC1 ACK
RX: 0x42 NACK
I2C STOP
I2C> [0xC1 r:1]
Here's a test with sample_target_read_processed_cb
returning -1
:
I2C> [0xC1 r:1]
I2C START
TX: 0xC1 ACK
RX: 0x42 NACK
I2C STOP
I2C> [0xC1 r:1]
I2C START
TX: 0xC1 NACK
RX: 0xFF NACK
I2C STOP
FWIW I'm testing with an Arduino Giga R1.
Also, this might be related: #80994
Regression
- This is a regression.
Steps to reproduce
- In
samples/drivers/i2c/custom_target/src/main.c
changesample_target_read_processed_cb
to return-1
. - Read from the I2C target.
Relevant log output
Impact
Functional Limitation – Some features not working as expected, but system usable.
Environment
No response
Additional Context
No response
Metadata
Metadata
Labels
area: I2CbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: ArduinoArduino boards and shieldsArduino boards and shieldspriority: lowLow impact/importance bugLow impact/importance bug