Strapping pins and UART for both communication and bootload mode

francis2
Posts: 3
Joined: Fri Apr 10, 2020 12:52 am

Strapping pins and UART for both communication and bootload mode

Postby francis2 » Fri May 29, 2020 5:21 am

Hey,
I want to use the uart0 for both communication with usb and also for flashing ( while in serial bootloader mode) the new firmware. The way I'm planning to achieve this is by using jumpers or buttons that force the esp32 to go into serial bootloader mode and having the required strapping pins in their corresponding values in order for the esp to enter that serial bootloader mode correctly. And when the mcu is in normal mode, uart0 is used for serial communication.

I have 2 questions:
1) UART: Is the strategy described above a good idea? Using software flow control.
2) Strapping pins: I have lack of GPIOs and so I can't dedicate the strapping pins exclusively for controlling whether the mcu should enter normal boot mode or serial bootloader mode. What's the best way to use the strapping pin GPIO0 as an output and also making sure it has the correct value when a, let's say a certain button is pressed? Simply hardwiring the button to an output, even if using resistors to prevent a cc, forcing the driver output seems a bad idea.

Thanks in advance ;)

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

Re: Strapping pins and UART for both communication and bootload mode

Postby ESP_Sprite » Fri May 29, 2020 7:06 am

Wrt 2: When and after the chip is reset, GPIO0 will be an input with a weak pull-up. You should be able to use a button with a series resistor of, say, 1K or so to pull it down when you want to program the chip; the 1K resistor will make sure the GPIO isn't affected when it's in output mode.

Who is online

Users browsing this forum: No registered users and 11 guests