Delay to wait until strapping pin works as normal-function pins?

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Thu Sep 10, 2020 10:23 pm

Hello,

The ESP32 Datasheet (§2.4 Strapping Pins) states that after reset, the strapping pins work as normal-function pins.
What is the delay by which these pins work as normal-function pins?

I need to know this delay because I have connected the strapping pins of the ESP32 board to another host MCU GPIOs. So, the host MCU need to wait this delay to not interfere with the ESP32 during its boot time.


Regards,
Michel

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

Re: Delay to wait until strapping pin works as normal-function pins?

Postby ESP_Sprite » Fri Sep 11, 2020 8:18 am

That's in the datasheet, page 14.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Fri Sep 11, 2020 3:58 pm

ESP_Sprite wrote:
Fri Sep 11, 2020 8:18 am
That's in the datasheet, page 14.
thank you.
So the delay is, at least 1ms, after the CHIP_PU signal goes high?


regards,
Michel

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

Re: Delay to wait until strapping pin works as normal-function pins?

Postby ESP_Sprite » Sun Sep 13, 2020 7:43 am

Yes, with 'goes high' defined here as >0.6V.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Mon Sep 14, 2020 2:48 pm

@ESP_Sprite
So the delay is, at least 1ms, after the CHIP_PU signal goes high?
Are strapping pins only checked on hard power up/reset or are strapping pins also checked on CPU restart?
What is the ESP32 crashes and reboots? Will the strapping pins again be checked again during the first 1mS?

EDIT: Similarly watchdog & ESP brown out etc.
& I also believe that IDF CAN should be fixed.

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

Re: Delay to wait until strapping pin works as normal-function pins?

Postby ESP_Sprite » Tue Sep 15, 2020 9:35 am

From the datasheet: 'During the chip’s system reset release (power-on-reset, RTC watchdog reset and brownout reset), the latches of the strapping pins sample the voltage level as strapping bits of ”0” or ”1”, and hold these bits until the chip is powered down or shut down.' So not on a CPU restart, crash&reboot only if the reboot is caused by the RTC WDT and it's configured to do a system reset, yes on brownout.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Tue Sep 15, 2020 10:39 am

Thanks!

@michcfr
So you need to be a little careful. You cannot (easily) use the RTC Watchdog to reset. You would also need to be careful with your brown out thresholds. Your second MCU should brown out & go down (& stop intefering with the strapping pins) before the ESP. A voltage supervisor would ensure both CPUs are reset and is best practice - especially if you have other logic devices.
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Tue Sep 15, 2020 12:18 pm

PeterR wrote:
Tue Sep 15, 2020 10:39 am
Thanks!

@michcfr
So you need to be a little careful. You cannot (easily) use the RTC Watchdog to reset. You would also need to be careful with your brown out thresholds. Your second MCU should brown out & go down (& stop intefering with the strapping pins) before the ESP. A voltage supervisor would ensure both CPUs are reset and is best practice - especially if you have other logic devices.
Thank you guys!
It is even more tricky than expected...
To me more specific on my request: the strapping pin IO15 of the ESP32 is connected to the second MCU and there is a pulldown resistor on the line. So, I need the IO15 to be HIGH during this period. Any suggestion of the schematics?

thx

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Tue Sep 15, 2020 3:07 pm

What are you using IO15 for?
Why do you have a pull down on IO15? Why not a pull up?
Why use IO15?

Its not going to be easy to turn a pull down into a pull up EDIT on the fly!
The only thought which springs to mind is to have the second MCU control the ESP boot. The MCU could then set IO15 high before doing whatever it normally does with IO15.
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Tue Sep 15, 2020 3:38 pm

PeterR wrote:
Tue Sep 15, 2020 3:07 pm
What are you using IO15 for?
Why do you have a pull down on IO15? Why not a pull up?
Why use IO15?

Its not going to be easy to turn a pull down into a pull up EDIT on the fly!
The only thought which springs to mind is to have the second MCU control the ESP boot. The MCU could then set IO15 high before doing whatever it normally does with IO15.
IO15 is used to do software bit bang in order to have single wire serial communication between the ESP32 and the second MCU
It is pull down because I have been advised to add 8kΩ-5MΩ pull-down resistor to reduce externally induced interference. The distance are very short between the ESP32 and the second MCU so maybe it is useless...and it will solve my issue.
IO15 is the only remaining pin on my PCB. Maybe I should reorganize it.

Who is online

Users browsing this forum: No registered users and 150 guests