Factory reset

User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Factory reset

Postby urbanze » Thu Nov 22, 2018 12:51 pm

I am using the factory reset option of bootloader (menuconfig), it works fine but there is a problem.

I am using GPIO4 for both factory reset and user touch (after code start) and when some software reset, panic reset, etc happens (! = POWER_ON), it seems that the bootloader does not activate the pull_up of the pin, causing factory reset... However, in power_on works normally.

What is this problem and how solve?

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

Re: Factory reset

Postby ESP_Sprite » Fri Nov 23, 2018 1:47 am

One thing I can think of is that the pin has enough (parasitic) capacitance to still be low, even after the pull-up is enabled. You could try adding a delay of a bunch of milliseconds between the pull-up enable and the pin read to compensate for this.

User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Factory reset

Postby urbanze » Sun Nov 25, 2018 12:15 pm

ESP_Sprite wrote:
Fri Nov 23, 2018 1:47 am
One thing I can think of is that the pin has enough (parasitic) capacitance to still be low, even after the pull-up is enabled. You could try adding a delay of a bunch of milliseconds between the pull-up enable and the pin read to compensate for this.
How can I add delay if "bootloader" read the pin? I just enable this option in menuconfig, changing absolutly nothing in my code. Why in power_on works (not trigger reset) and when software reset occur fail (trigging reset factory)?

chegewara
Posts: 2230
Joined: Wed Jun 14, 2017 9:00 pm

Re: Factory reset

Postby chegewara » Sun Nov 25, 2018 12:40 pm


User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Factory reset

Postby urbanze » Tue Nov 27, 2018 6:12 pm

I finally finished developing OTA via GSM, however, this problem persists and is half out of our reach, since the bootloader should activate the internal pull-up at boot every time, but when SW_RST occurs this does not seem to happen, causing factory reset.

Help guys?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Factory reset

Postby WiFive » Tue Nov 27, 2018 7:45 pm

Also possible the touch fsm is not getting disabled/reset during those reset events. You could modify the bootloader to make sure touch is deinit and rtc gpio is deinit.

User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Factory reset

Postby urbanze » Tue Nov 27, 2018 9:08 pm

WiFive wrote:
Tue Nov 27, 2018 7:45 pm
Also possible the touch fsm is not getting disabled/reset during those reset events. You could modify the bootloader to make sure touch is deinit and rtc gpio is deinit.
If I need to change the bootloader for this to work, it will be easier to disable it and make my own "IF" at the beginning of the code to boot into factory_app... I will be waiting for correction and do my methods. :?

Who is online

Users browsing this forum: Bing [Bot], Rckyan and 159 guests