Description
CircuitPython version
Adafruit CircuitPython 9.2.1 on 2024-11-20; Adafruit Feather ESP32-S2 Reverse TFT with ESP32S2
Board ID:adafruit_feather_esp32s2_reverse_tft
Code/REPL
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT
"""CircuitPython I2C Device Address Scan"""
import time
import board
#i2c = board.I2C() # uses board.SCL and board.SDA
# Note; it's the same interface, but turns on the STEMMA QT port power
i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
while not i2c.try_lock():
pass
try:
while True:
print(
"I2C addresses found:",
[hex(device_address) for device_address in i2c.scan()],
)
time.sleep(2)
finally: # unlock the i2c bus when ctrl-c'ing out of the loop
i2c.unlock()
Behavior
Testing just the ESP32-S2 Reverse TFT Feather (no additional Feather boards connected, nothing on the Stemma_QT port), the I2C scan returns many incorrect I2C addresses.
In this configuration, the only I2C address that should appear is for the built-in MAX17048 battery gauge on [0x36].
Description
Does not matter whether the i2c_scan uses board.I2C() or board.STEMMA_I2C().
Does not matter whether a LiPo battery is connected to the Feather.
Does not matter whether any other Feather modules are stacked with the ESP32-S2 Feather.
All of these variants result in the same issue: bogus addresses being detected.
Additional information
See this Forum thread for complete details (including investigation by "mikeysklar").
https://forums.adafruit.com/viewtopic.php?t=215740
The Forum thread has a lot of pictures showing a stack of Feathers attached to the ESP32-S2, but that doesn't matter. The issue happens even with no additional boards installed.
The investigation by mikeysklar shows that the issue happens on the ESP32-S2 Reverse TFT, but not on the ESP32-S3 Reverse TFT.