I've been trying to get two different i2c devices working with an ESP32 (MPL3115A2 and MPU9250). I can get these to work just fine with a 3.3V Arduino Pro Mini. I have debugged the MPL3115A2 more in-depth using a logical analyzer and a JTAG adapter. I am debugging the MPL3115A2 whomai command which fails. It doesn't fail because of an i2c error, but because the expected byte returned from the whomai regiser is 0 not 0xC4. I've debugged the SDA/SCL signals on both an ESP32 and a 3.3V Arduino. The i2c protocol analyzer in my logic analyzer software recognizes the same commands and responses for both. The slave seems to return the correct response (0xC4).
3.3V Arduino signals for whoami register read
ESP32 signals for whoami register read
This is the code I am using, although I also ported the Arduino ESP32 core and MPL3115A2 driver to an ESP-IDF project and got the same results.
Does anyone know why this is a problem? Is there any kind of ROM or base FW update I need to perform on my device?
Can't talk to any i2c devices
Re: Can't talk to any i2c devices
Could you provide code example?
Re: Can't talk to any i2c devices
This was the problem: https://www.esp32.com/viewtopic.php?f=19&t=6848 Updating the i2c file in the Arduino core fixed.
-
- Posts: 166
- Joined: Wed Aug 01, 2018 12:06 pm
Who is online
Users browsing this forum: No registered users and 64 guests