I2C Not Working on Xiao MG24 Sense - SDA Line Stuck LOW

#include <Wire.h>

void setup() {
  Serial.begin(115200);
  Wire.begin();
  Serial.println("I2C Scanner");
}

void loop() {
  byte error, address;
  int nDevices;
  nDevices = 0;
 
  Serial.println("I2C1 Scanning..."); //*****************************************
  for(address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    
    if (error == 0) {
      Serial.print("I2C1 device found at address 0x");
      if (address < 16) 
        Serial.print("0");
      Serial.println(address, HEX);

      nDevices++;
    }
    else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) 
        Serial.print("0");
      Serial.println(address, HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C1 devices found");
  else
    Serial.println("I2C1 done");
    Serial.println("");
    delay(1000);   
}

I trigger on the falling edge of SDA, reset MG24 and observe the waveform.

1 Like