Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32- S2 Reverse TFT Feather - i2c scan returns multiple bogus addresses #9931

Open
T-Mosher opened this issue Jan 3, 2025 · 2 comments
Open

Comments

@T-Mosher
Copy link

T-Mosher commented Jan 3, 2025

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.

i2c_scan_2

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.

@T-Mosher T-Mosher added the bug label Jan 3, 2025
@jposada202020
Copy link

The problem also appears in the feather TFT ESP32-S2
tested in Adafruit CircuitPython 9.2.1 on 2024-11-20; Adafruit Feather ESP32-S2 TFT with ESP32S2


>>> import ms
I2C addresses found: ['0xb', '0x2b', '0x36', '0x3f', '0x65']
I2C addresses found: ['0x9', '0xf', '0x18', '0x5f', '0x6b']
I2C addresses found: ['0x9', '0x12', '0x2a', '0x5f']
I2C addresses found: ['0x9', '0x14', '0x15', '0x5f', '0x6e', '0x77']
I2C addresses found: ['0x9', '0x14', '0x18', '0x5e', '0x66']
I2C addresses found: ['0x9', '0x16', '0x1b', '0x3a', '0x60', '0x73']
I2C addresses found: ['0x9', '0xe', '0x1f', '0x2b', '0x34', '0x61']

@mikeysklar
Copy link

mikeysklar commented Jan 3, 2025

Adafruit Feather ESP32-S2 Rev TFT i2c scan tests with recent releases of CircuitPython.

+---------+-----------------+
| Version | Result          |
+---------+-----------------+
| 9.2.1   | ghost addresses |
| 9.1.4   | no devices      |
| 9.1.3   | no devices      |
| 9.1.0   | no devices      |
| 9.0.5   | works           |
| 8.2.10  | works           |
+---------+-----------------+

Based on the CP 9.1.0 release notes the ESP-IDF was updated to v5.2.2.

@tannewt tannewt added this to the 9.2.x milestone Jan 3, 2025
@tannewt tannewt added the busio label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants