You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <Wire.h>
#include <Adafruit_TinyUSB.h>
void setup()
{
Serial.begin(115200);
while(! Serial) delay(10);
Wire.begin(0x50);
Wire.onReceive(receiveEvent);
}
void loop()
{
delay(100);
}
// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
{
while(1 < Wire.available()) // loop through all but the last
{
char c = Wire.read(); // receive byte as a character
Serial.print(c); // print the character
}
int x = Wire.read(); // receive byte as an integer
Serial.println(x); // print the integer
}
Sender:
#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for main)
}
byte x = 0;
void loop()
{
Wire.beginTransmission(0x50); // transmit to device #0x50
Wire.write("x is "); // sends five bytes
Wire.write(x); // sends one byte
Wire.endTransmission(); // stop transmitting
x++;
delay(500);
}
What happened ?
Two NRF52832 Feather is connected via I2C port. When sender is running without the receiver attached, the sketch is running fine. But when the receiver is attached, the sender hangs on endTramission.
How to reproduce ?
Connect Sender SCL, SDA to another NRF52832 SCL and SDA port. Connect a 2.2k Pull up resistor between SCL and VCC, SDA and VCC. Once receiver is attached, the sender will hang.
Debug Log
No response
Screenshots
I2C bus scope capture:
The text was updated successfully, but these errors were encountered:
I see the Wire_nRF52.cpp does not have timeout implemented endTransmission() and requestFrom()
there are multiple while loops and none have timeout implemented. Under certain scenarios then the call never returns.
Operating System
MacOS
IDE version
Arduino 2.1.0
Board
Feather 52832
BSP version
1.4.0
Sketch
Receiver:
Sender:
What happened ?
Two NRF52832 Feather is connected via I2C port. When sender is running without the receiver attached, the sketch is running fine. But when the receiver is attached, the sender hangs on endTramission.
How to reproduce ?
Connect Sender SCL, SDA to another NRF52832 SCL and SDA port. Connect a 2.2k Pull up resistor between SCL and VCC, SDA and VCC. Once receiver is attached, the sender will hang.
Debug Log
No response
Screenshots
I2C bus scope capture:
The text was updated successfully, but these errors were encountered: