I2C does not work on pins (36,37) of ESP32S3 R8

msh911
Posts: 11
Joined: Wed May 10, 2023 5:21 am

I2C does not work on pins (36,37) of ESP32S3 R8

Postby msh911 » Mon Oct 16, 2023 6:47 pm

Hi

I am reading a gps module data. I have a code that runs properly using pins (7,8) for I2c communication on ESP32S3 R8 on my prototype board. However, on the designed pcb, the I2C pins have changed to pins (36,37). This change has made gps stop working. I did try the same (36,37) pins on my prototype and it seems like these pins have problems with I2C.

I did a research and I found this on the documentation:
"When using Octal Flash or Octal PSRAM or both, GPIO33~37 are connected to SPIIO4 ~ SPIIO7 and SPIDQS. Therefore on ESP32-S3R8 / ESP32-S3R8V board GPIO33~37 are also not recommended for other uses."

It says, 33~37 are "NOT RECOMMENDED" for other uses. What does that mean? Is it impossible to use them for other uses like I2C or there is a way to reconfigure those pins to be used?
Is there any way software wise for me to use pins 36 and 37 for I2c or they have to be changed to other pins?

Thanks.

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: I2C does not work on pins (36,37) of ESP32S3 R8

Postby ESP_Sprite » Tue Oct 17, 2023 1:10 am

Theoretically, the hardware is capable of running other OPI devices on those pins in parallel with flash or PSRAM. In practice, this is not implemented anywhere, so using those pins while still having access to PSRAM is not possible.

msh911
Posts: 11
Joined: Wed May 10, 2023 5:21 am

Re: I2C does not work on pins (36,37) of ESP32S3 R8

Postby msh911 » Tue Oct 17, 2023 8:49 pm

Do I need to have access to PSRAM? Can I disable that so I can use the pins?

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: I2C does not work on pins (36,37) of ESP32S3 R8

Postby ESP_Sprite » Wed Oct 18, 2023 5:42 am

msh911 wrote:
Tue Oct 17, 2023 8:49 pm
Do I need to have access to PSRAM?
That depends on your application, I can't give you the answer to that.
Can I disable that so I can use the pins?
You can. Initialize the SPICS1 as a GPIO and make it high in software and you should be able to use the PSRAM pins that are not shared with flash.

msh911
Posts: 11
Joined: Wed May 10, 2023 5:21 am

Re: I2C does not work on pins (36,37) of ESP32S3 R8

Postby msh911 » Wed Oct 18, 2023 8:11 pm

Thanks a lot for taking the time.
Is it correct to say that by disabling this , I just disable the capability to add an external PSRAM to the board? it does not affect the normal PSRAM operation internally in the chip, right?
I really appreciate if you could give me more info about how to reassign SPICS1 to a GPIO. Could not find anything online.

Also the documentation says:

IO36: SPIIO7
IO37: SPIDQS
"In module variants that have embedded OSPI PSRAM, i.e., that embed ESP32-S3R8, pins IO35,
IO36, and IO37 connect to the OSPI PSRAM and are not available for other uses"

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: I2C does not work on pins (36,37) of ESP32S3 R8

Postby ESP_Sprite » Thu Oct 19, 2023 3:16 am

msh911 wrote:
Wed Oct 18, 2023 8:11 pm
Thanks a lot for taking the time.
Is it correct to say that by disabling this , I just disable the capability to add an external PSRAM to the board? it does not affect the normal PSRAM operation internally in the chip, right?
No. Internal PSRAM makes use of these GPIOs, so doing this disables internal PSRAM. (For clarity, it does not disable the 512K-or-so of RAM that is on the ESP32 die, only the 8MiB of internal PSRAM.)
I really appreciate if you could give me more info about how to reassign SPICS1 to a GPIO. Could not find anything online.

SPICS1 is GPIO26. Simply initialize that GPIO as an output and make it high in the same way as if it would have a LED or something and you were initializing the pin for that.

Who is online

Users browsing this forum: No registered users and 65 guests