I’m trying to use the MPR121 capacitive touch sensor with the Xiao MG24 Sense, but I’m experiencing I2C communication issues. The SDA line appears to be stuck LOW when the sensor is connected. Here are the specific symptoms:
When I scan the I2C bus, it shows that ALL addresses (0x01-0x7F) are responding - which typically indicates a bus problem.
When I debug the MPR121 sensor initialization, all register reads return 0x00 values.
When I disconnect the SDA line from the sensor, reads return 0xFF.
Changed pull-up resistor values from 10kΩ to 2.2kΩ
Lowered I2C clock speed to 100kHz (from 400kHz)
Added delays after initialization (up to 100ms)
Tried bus recovery procedure (toggling SCL to unstuck potentially stuck devices)
Double-checked all wiring connections
Verified that MPR121 receives proper power (3.3V)
Checked that SDA/SCL both measure 3.3V when nothing is transmitting
Observations
When SDA wire is disconnected from the sensor, the line reads HIGH (as expected)
When SDA is connected to the sensor, it’s being pulled LOW continuously
I can communicate with the device address (ACK received), but all data reads are 0x00
Any ideas what could be causing this issue with the I2C communication? Is the MPR121 possibly damaged? Or is there something specific about the Xiao MG24’s I2C implementation that I’m missing?
Does I2C_Scanner detect and respond on all addresses?
Is the Adafruit breakout board you are using? If so, have you tried the Adafruit library example?
I checked the waveforms.
It seems to work well for devices that only need to Write data, such as the SSD1306 display unit. However, when reading data from Slave, it does not seem to work well.
I’ll try using a software I2C library as a workaround.
If that works, I’ll look into what’s causing the hardware I2C read issue and share any solutions I find.
I don’t have the same I2C devices as you but I do have BME680 and can read the Chip Id from the device using PlatformIO based XIAO_MG24 device.
The BME680 device shows up in a scan as well… along with my own “slave” for another forum user.
Initializing I2C...
Scanning All...
No I2C device 70
No I2C device 71
No I2C device 72
No I2C device 73
I2C device found at 74
No I2C device 75
No I2C device 76
I2C device found at 77
No I2C device 78
No I2C device 79
No I2C device 7A
No I2C device 7B
No I2C device 7C
No I2C device 7D
I2C Master Starting...
Scanning...
My I2C device found
Data received from 74
ABCDEFGH
Done
Data received from 77
61
Done
I examined the waveforms.
When Scanner starts, SDA goes from HIGH to LOW and waits for SCL to go LOW, but SCL remains HIGH and does not change.
There seems to be a problem with Wire.begin() of I2C_Scanner.