I've got a new board prototype with an ESP32-S3 and a BME688 and and DS3231 on the same I2C bus (using pins 48=SDA and 47=SCL). I run the Examples => Wire => WireScan example making the necessary modification for my I2C pins Wire.begin(48, 47) instead of just Wire.begin(). I have 2.2kOhm pull-ups on SCL and SDA lines. When the scan runs it shows:

Scanning for I2C devices ...
Error 5 at address 0x68
I2C device found at address 0x77

I'm not sure what that means. I captured what's going on with a Saleae Logic and here's what it interprets.

Before encountering 0x68 enter image description here

After encoutering 0x68 (after a little while)/ enter image description here

I have the full Logic capture, available from Drive here.

FWIW, I can't get the Examples => RTCLib => ds3231 example to work either. It just outputs "Couldn't find RTC". But obviously something is happening when I try and hit address 0x68... Also incidentally, the BME688 example ostensibly seems to work as intended.

What's going on here? My next stop is going to be an to pull out my oscilloscope, but I don't have one handy right now.

UPDATE #1 [30 Sep 2023 21:09:08]

OK, the oscilloscope shows something decidely not digital happening when 0x68 is addressed for writing.

enter image description here enter image description here

What is this? Where do I go next for more help or what else do I try next?

UPDATE #2 [1 Oct 2023 13:59:44]

Here are the relevant schematic excerpts: enter image description here enter image description here

Aaaaand there's the problem, it looks like Ground is not connected.

  • \$\begingroup\$ What does the manual say what "Error 5" means? Also the logic capture is flawed likely because high enough sampling rate was not used and SDA&SCL edge happened at the same exact time and that's undefined what it means on an I2C bus. Or the logic analyzer decoding is just not working properly after some unexpected event. Sure the waveforms are not correct but there is something happening. What's the SCL frequency? \$\endgroup\$
    – Justme
    Sep 30, 2023 at 20:28
  • \$\begingroup\$ @Justme I've added an updated Oscilloscope trace and I can confirm that the I2C clock is 100kHz (10us period) \$\endgroup\$
    – vicatcu
    Oct 1, 2023 at 1:13
  • \$\begingroup\$ which one of the ESP32-S3 boards do have? \$\endgroup\$
    – Rodo
    Oct 1, 2023 at 2:24
  • \$\begingroup\$ Is the RTC power supply OK? Are the MCU pins set to open-drain mode? Do you know what the Wire library does? Why are all interesting info such as voltage and time scale missing from scope photos? Can you add the schematics? \$\endgroup\$
    – Justme
    Oct 1, 2023 at 8:17
  • \$\begingroup\$ @Rodo Its a new design of my own making \$\endgroup\$
    – vicatcu
    Oct 1, 2023 at 17:42

2 Answers 2


Check the power supply of the chip.

In fact, a few hours ago I looked at the scope diagram again and it also hit me, it's not the supply pin that should be checked but the ground pin - but I didn't ask another comment at that time.

The oscilloscope diagram shows that as soon as the address is sent and RTC starts to drive the SDA low to transmit out a low ACK bit, it is not at ground level but slightly higher level. And as soon as SCL rises, the SDA rises immediately along with it. So the RTC got ground only through the low SCL and IO pin protection diodes, and that is why the SDA low was only about a diode drop higher from the 0V and SCL level.


The Ground pin of my DS3231 is disconnected in the schematic. This is the manifestation of that design error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.