Open K0I05 opened 3 hours ago
This is most likely a hardware issue with the SHT40 but I never had this problem before, I am using adafruit SHT40 and BMP280 MEMS boards with STEMMA QT. I just wired up an AHT20+BMP280 board to an ESP32-S3 and they get along well, no unexpected nack at a 3 second polling interval. However, I can no longer poll the status register on SHTXX MEMS sensors (i.e. SHT10, 20) any more for data ready but I can poll for data ready on the SHT21, the older versions cause unexpected nack when polled, the hard-coded delay seems to work but I was able poll for data ready before ESP-IDF v5.3.1. The SHT45 with BMP280 didn't reproduce the problem but it's odd, seems like the older hardware isn't cooperating any longer.
The code is located here: I2C-MQTT
Any thoughts?
Answers checklist.
IDF version.
ESP-IDFv5.3.1
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
esp32s3box
Power Supply used.
USB
What is the expected behavior?
I am polling two I2C sensors (SHT40 and BMP280) on the same bus at a 3-second interval. In addition, I placed a 50-ms delay between sensor polling i.e. the SHT40 polls, delay for 50-ms, then the BMP280 polls.
What is the actual behavior?
After about 20 polls there is an odd error that appears but doesn't break my code or crash the MCU.
E (1066671) i2c.master: I2C transaction unexpected nack detected E (1066671) i2c.master: s_i2c_synchronous_transaction(872): I2C transaction failed E (1066671) i2c.master: i2c_master_receive(1117): I2C transaction failed
Steps to reproduce.
Debug Logs.
More Information.
I've tried this only mulple ESP32-S3 boards. Since the release of v5.3.1 I noticed some odd behaviours with timing. I2C sensors that used to work with master_transmit_receive no longer work. I had to recode with descreet transmit, delay for 10-ms, then receive functions to resolve the problems. Is anyone else experiencing this?