espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.47k stars 7.38k forks source link

ESP32-S2 I2C not working with any I2C based device except DS1307 RTC device #4403

Closed vigneshtg closed 3 years ago

vigneshtg commented 4 years ago

Hello, I've checked DS3231 RTC Timer and DS1307 RTC with ESP32-S2. It's working fine. But except DS3231, DS1307 other I2C based devices are not working with ESP32-S2. The program is successfully uploaded but Serial Monitor is blank and showing nothing. Please help me out. Thank you.

DougArmstrong commented 4 years ago

This sounds like it might not be a CPU related issue. Couple of obvious questions just be clarify: 1) When you say the Serial monitor is blank, are you saying you are using an I2C bus monitor and there is not I2C traffic? Either way? Do you see traffic from the DS3231? Are you referring to the serial UART traffic for debugging in the development tool?

2) What pins are you using?

3) If you are not using an I2C bus monitor, it might be worth putting something on the hardware and seeing if data is actually being sent.

4) Are the I2C addresses correct for the devices?

Hope something here helps. Good luck.

vigneshtg commented 4 years ago

I'm using SDA - Pin 8 and SCL - Pin 9 on ESP32-S2. Also using Wire library for I2C interface. But the same thing working fine with ESP32 but not with ESP32-S2. Further I checked with I2C scanner and I2C address is correct. How it can be solved now?

DougArmstrong commented 4 years ago

I am not tech support for Expressif or the development team, just another user like yourself. You need to provide a great deal more detailed information. Can you provide screen shots, and explain in detail what you think is the issue? For example perhaps pull up resistors are needed? Without a great deal more information it will be difficult for anyone to assist, certainly the dev team won't be interested unless others are having the same issue.

When you say the Serial monitor is blank, are you saying you are using an I2C bus monitor and there is not I2C traffic?

Is the ESP32 sending commands and not getting responses? Do you see bidirectional traffic?

Do you see bidirectional traffic from the DS3231 on your I2C monitor?

Are you referring to the serial UART traffic for debugging in the development tool when you say the screen is blank?

Do you have a scope to look at these signals directly?

Just a couple suggestions... Good luck.

vigneshtg commented 4 years ago

I'm trying to interface MLX90614 Sensor with ESp32-S2 and using Sparkfun MLX90614 library: https://github.com/sparkfun/SparkFun_MLX90614_Arduino_Library I'm using the demo code which is available within this library. But when I connected and uploaded the code to ESP32-S2, the serial Monitor is blank and it's not printing or displaying temperature values on Serial Monitor.

vigneshtg commented 3 years ago

Any help?

lbernstone commented 3 years ago

Follow the instructions in the Wire docs and post your results here.

vigneshtg commented 3 years ago

Sure. I'll post the results once done. Thanks!

stale[bot] commented 3 years ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

SuGlider commented 3 years ago

Arduino Core 2.0.0 and PR #5664 may solve this issue. Please test it and let me know. Thanks.