I am creating a PCB in which I am using esp32 chip and the chip comes with the serial bootloader so according to the documentation, I can either tie the boot pins to VCC and GND as mentioned or I can use automatic bootloader to enter in the serial bootloader (ROM bootloader) using esptool.py. I decided to use the automatic bootloader So I want to know can i use the boot pins as the GPIO pins without any issues later during the operation?
The link below is the documentation link. https://docs.espressif.com/projects/esptool/en/latest/esp32/advanced-topics/boot-mode-selection.html#manual-bootloader
-
\$\begingroup\$ what does the datasheet of the IC say about the capabilites of that boot pin? \$\endgroup\$Marcus Müller– Marcus Müller2023年07月20日 12:20:32 +00:00Commented Jul 20, 2023 at 12:20
-
\$\begingroup\$ @Marcus Müller There states are defined but in the automatic bootloader part there is no mention of them. So i was wondering what will happen if i connect these pins to a sensors I/O before powering it up because these pins are necessary for booting. \$\endgroup\$Ahsan– Ahsan2023年07月20日 17:49:39 +00:00Commented Jul 20, 2023 at 17:49
1 Answer 1
On most targets the boot pins are only sampled during the execution of the bootloader. Then execution is then handed to the customer firmware and the pins are free to use.
Startup code called from the reset vector determines the boot mode by checking GPIO_STRAP_REG register for bootstrap pin states. Depending on the reset reason, the following takes place:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/startup.html
-
\$\begingroup\$ After the booting stage we can use but during the startup if the pins are already connected to a sensors I/O pins or to something else instead of the known state mentioned in the document then will it not boot properly? \$\endgroup\$Ahsan– Ahsan2023年07月20日 17:46:27 +00:00Commented Jul 20, 2023 at 17:46
-
\$\begingroup\$ Actually i am designing the board from the scratch so i think i can only tie them to the VCC or GND as mentioned in the datasheet but later on i cant use them as GPIO's because they wouldn't be available. \$\endgroup\$Ahsan– Ahsan2023年07月20日 17:52:35 +00:00Commented Jul 20, 2023 at 17:52
-
\$\begingroup\$ @Ahsan yes, one of the difficulties of using these pins is their state during bootup... \$\endgroup\$Jeroen3– Jeroen32023年07月21日 18:10:41 +00:00Commented Jul 21, 2023 at 18:10
Explore related questions
See similar questions with these tags.