ESP-WROOM-32 design help for boot + I2C

unknow005
Posts: 20
Joined: Wed Dec 19, 2018 6:16 am

ESP-WROOM-32 design help for boot + I2C

Postby unknow005 » Thu Jan 31, 2019 4:25 am

Dear community,

I tryed to design ESP-WROOM-32 (just pure module, not dev. board) myself. I am using UART and boot mode to upload Arduino code into ESP32. The problem start when I tryed to add MCP3221 (12bit I2C AD Converter). I used pins 21 (GPIO7) and 22 (GPIO8). But than I can not upload the code because of data packet errors. I read that some pins are used to internal flash logic. So, can someone help me how to connect two wire I2C device to ESP32 but with working boot mode? My pinouts:

pin 2 = VCC (3,3V)
pin 3 = EN (3,3V with resistor)
pin 1, 15, 38 = GND
pin 34, 35 = TX, RX UART for uploading the code
pin 25 = GPIO0 for boot mode enable
pin 29, 30, 37 = GPIO5 (CS), GPIO18 (CLK), GPIO23 (MOSI) as SPI bus to control led driver MAX7219
pin 10, 11 = GPIO25, GPIO26 as two internal pullout pins for two DIP-Switch components
pin 21, 22 = GPIO7, GPIO8 as I2C bus to control MCP3221 <<< this need to be removed because it prevent ESP32 to uploading the code

Any idea which pins I can use for I2C for stable non-problematic run? I will use both WIFI and Bluetooth periphecals so the connection shoud not to collide!

Thank you.
UK

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

Re: ESP-WROOM-32 design help for boot + I2C

Postby ESP_Sprite » Thu Jan 31, 2019 7:11 am

GPIO7 and 8 are used for the internal flash; you cannot use those. Suggest you check the schematic for the ESP-WROOM-32 to see where the internal flash is connected to, and the datasheet of the ESP32 to figure out which bootstrap pins you may want to not use.

unknow005
Posts: 20
Joined: Wed Dec 19, 2018 6:16 am

Re: ESP-WROOM-32 design help for boot + I2C

Postby unknow005 » Thu Jan 31, 2019 9:57 am

Hello,

possibly I used wrong picture of ESP-WROOM-32 pinouts, because I have not noticed any warning that I can not use some pins because they are reserved. Now I know it which is good but I am only at half step. Now I am confused and not know for sure which another pins are forbidden too. Can I use pin GPIO21 and GPIO22 for I2C communication with MCP3221? Will it work while using WIFI and Bluetooth at once?

Thank you.
UK

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

Re: ESP-WROOM-32 design help for boot + I2C

Postby ESP_Sprite » Fri Feb 01, 2019 2:47 am

Yes, you can. Also, GPIO pins are independent of your usage of WiFi/BT.

User avatar
seonroz
Posts: 54
Joined: Thu Oct 25, 2018 3:51 am
Location: Melbourne, Australia
Contact:

Re: ESP-WROOM-32 design help for boot + I2C

Postby seonroz » Fri Feb 01, 2019 7:43 am

unknow005 wrote:
Thu Jan 31, 2019 9:57 am
Hello,

possibly I used wrong picture of ESP-WROOM-32 pinouts, because I have not noticed any warning that I can not use some pins because they are reserved. Now I know it which is good but I am only at half step. Now I am confused and not know for sure which another pins are forbidden too. Can I use pin GPIO21 and GPIO22 for I2C communication with MCP3221? Will it work while using WIFI and Bluetooth at once?

Thank you.
UK
Don't rely on pictures or diagrams from google... go to the docs section on Espressif's website and download the datasheets for the WROOM32 and also grab a schematic of their dev board that uses the WROOM32 to go over the reference schematic. The WROOM32 datasheet goes through every pin and lets you know what they are used for... it lists all of the strapping pins too, so you know what is safe and unsafe to use, and when.
Cheers,
Seon
unexpectedmaker.com

Who is online

Users browsing this forum: Baidu [Spider] and 75 guests