Skip to content

ESP32-S2 I2C getting stuck in write loop after first ACK #5470

Closed
@caternuson

Description

@caternuson

Hardware:

Board: Adafruit FunHouse
Core Installation version: 2.0.0-rc1
IDE name: Arduino IDE 1.8.13
Flash Frequency: 80Mhz
PSRAM enabled: yes
Upload Speed: 921600
Computer OS: Ubuntu

Description:

Can not initialize the included I2C sensors (DPS310 and AHT20). Attempting an I2C scan results in board reset cycling.

Sketch:

You can probably see this by using any ESP32-S2 board, wiring up something to I2C, and running the I2C scanner sketch.

Example shown here is for attempting to directly use the DPS310 sensor, which is at 0x77. Library here.

#include <Adafruit_DPS310.h>

Adafruit_DPS310 dps;

void setup() {
  Serial.begin(9600);
  while (!Serial) delay(10);
  Serial.println("DPS310 Test.");
  
  if (! dps.begin_I2C()) {
    Serial.println("Failed to find DPS");
    while (1) yield();
  }
  Serial.println("DPS OK!");
}

void loop() {
}

Debug Messages:

This is a run time issue. Code compiles and uploads fine. Serial monitor output FWIW:
Screenshot from 2021-07-27 13-30-19

Here is what is happening on the I2C bus. A write is initiated and the sensor ACKs:
Screenshot from 2021-07-27 13-32-41

Then it goes into an infinite loop writing out 0x00.
Screenshot from 2021-07-27 13-34-34

Those 0x00 writes only stop when the board finally resets at some point.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions