Page 1 of 1

ESP32-S2 - ULP & i2c communication

Posted: Sun Nov 29, 2020 10:42 am
by sedlacek.david
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.

Re: ESP32-S2 - ULP & i2c communication

Posted: Tue Dec 15, 2020 7:11 pm
by lowtolerance
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

Re: ESP32-S2 - ULP & i2c communication

Posted: Sun Dec 27, 2020 2:45 pm
by sedlacek.david
Thanks!