ESP32-S2 - ULP & i2c communication

sedlacek.david
Posts: 2
Joined: Sun Nov 29, 2020 9:35 am

ESP32-S2 - ULP & i2c communication

Postby sedlacek.david » Sun Nov 29, 2020 10:42 am

Hi!
I'm interested in communication over i2c from ESP32-S2 ULP RISC coprocessor. Can I use ANY GPIO for i2c communication? Or I must use only certain pins.

I heard that ESP32 ULP coprocessor had some certain pins for i2c communication and it isn't possible to use any GPIO.

Thank you very much, David.

User avatar
lowtolerance
Posts: 9
Joined: Tue Dec 15, 2020 6:35 pm
Location: Virginia Beach, Virginia, United States of America

Re: ESP32-S2 - ULP & i2c communication

Postby lowtolerance » Tue Dec 15, 2020 7:11 pm

You heard right, you cannot use just any GPIO. scl can be GPIO_0 or GPIO_2, and sda can be GPIO_1 or GPIO_3. You need to use registers RTCIO_SAR_I2C_SCL_SEL and RTCIO_SAR_I2C_SDA_SEL to point to the correct pins.

In general, when using the ULP for GPIO access, you need to be using GPIO pins handled by the RTC GPIO MUX, which are simply GPIOs 0-21 on the S2 family :D

sedlacek.david
Posts: 2
Joined: Sun Nov 29, 2020 9:35 am

Re: ESP32-S2 - ULP & i2c communication

Postby sedlacek.david » Sun Dec 27, 2020 2:45 pm

Thanks!

Who is online

Users browsing this forum: No registered users and 46 guests