Using two I2Cs simultaneously - ESP32-S3
Using two I2Cs simultaneously - ESP32-S3
According to specs and many pinout charts for ESP32-S3 modules/DevKits, these modules offer two I2C peripherals, but I couldn't find any reference to the second I2C on any of these modules. Even on the KORVO board, the same I2C seems to be used across all peripherals available on the board (codec, CTP). I read the datasheet, but it didn't help much. Even if the second I2C is muxed with some GPIOs, it's really vague how/where it's assigned. Again, I'm not targeting two different devices on the same I2C bus with two unique I2C addresses. I want to use two separate I2Cs simultaneously.
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using two I2Cs simultaneously - ESP32-S3
If you're referring to the fact that you don't see specific i2c pins; like a lot of ESP peripherals, you can route the i2c signals of any of the two i2c peripherals to any pin; in ESP-IDF, the I2C driver initialization will allow you to specify which ones you want to use. The ESP-IDF driver has support for both I2C peripherals; simply initialize the 2nd one in the same way as the 1st but pass I2C_NUM_1 as the port.
Re: Using two I2Cs simultaneously - ESP32-S3
Yes exactly, that's what I was referring to. So, basically these are available as GPIO-mapped pins through the ESP-IDF? What about the Arduino Platform?
Re: Using two I2Cs simultaneously - ESP32-S3
By the way, why everyone out there is referring to the entire ESP32 family as a "dual-core" while only a few variants, like the ESP32-S3, ship with dual-core units? For example, I was under the impression that all the ESP32-WROVER-B modules feature a dual-core chip, but I just realized that most of these, if not all of them, are single-core CPUs.
Re: Using two I2Cs simultaneously - ESP32-S3
Any pin or just the following?ESP_Sprite wrote: ↑Mon Jun 19, 2023 2:15 amIf you're referring to the fact that you don't see specific i2c pins; like a lot of ESP peripherals, you can route the i2c signals of any of the two i2c peripherals to any pin; in ESP-IDF, the I2C driver initialization will allow you to specify which ones you want to use. The ESP-IDF driver has support for both I2C peripherals; simply initialize the 2nd one in the same way as the 1st but pass I2C_NUM_1 as the port.
I2C0:
SDA (Data): GPIO 21
SCL (Clock): GPIO 22
I2C1:
SDA (Data): GPIO 16
SCL (Clock): GPIO 17
-
- Posts: 1708
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Using two I2Cs simultaneously - ESP32-S3
Who is online
Users browsing this forum: Bing [Bot] and 115 guests