Skip to content

I2C Slave Regression #1051

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

Open
Ruggero-R opened this issue Apr 23, 2025 · 0 comments · May be fixed by #1055
Open

I2C Slave Regression #1051

Ruggero-R opened this issue Apr 23, 2025 · 0 comments · May be fixed by #1055

Comments

@Ruggero-R
Copy link

Ruggero-R commented Apr 23, 2025

Trying a master_reader/slave_sender on two gigas with Core 4.2.4 gives NACK 2 out of 3 times.

To test it:
1 giga with

#include <Wire.h>

void setup() {
  Wire1.begin();        // join I2C bus (address optional for master)
  Serial.begin(9600);  // start serial for output
}

void loop() {
  Wire1.requestFrom(16, 6);    // request 6 bytes from slave device #8

  while (Wire1.available()) { // slave may send less than requested
    Serial.write(Wire1.read());         // print the character
  }
  Serial.println();
  delay(500);
}

1 giga with:

#include <Wire.h>

void setup() {
  Wire1.begin(16);                // join I2C bus with address #8
  Wire1.onRequest(requestEvent); // register event
}

void loop() {
  delay(1);
}

// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent() {
  Wire1.write("hello "); // respond with message of 6 bytes
  // as expected by master
}

SCL1 to SCL1
SDA1 to SDA1
GND to GND

Works perfectly with core 4.2.1

@facchinm @pennam

@pennam pennam linked a pull request Apr 29, 2025 that will close this issue
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 a pull request may close this issue.

1 participant