Page 1 of 1

GPIO 36 abnormal behaviour

Posted: Tue Mar 27, 2018 6:50 am
by seopyoon
In my app_main(), I initialise gpio where I install gpio interrupts on GPIOs 36, 39, 34. (Pulled up)

What I observe is that around tick 1392-1394 (of five restarts), I get an interrupt high on pin 36. This happens continuously every time I start the application.

When I read the log, it is right after esp_wifi_start() is called.
Here's some log around it.

Code: Select all

I (1316) SYSTEM: Connecting to: <SSID> // <PASSPHRASE>
D (1322) RTC_MODULE: Wi-Fi takes adc2 lock.
D (1326) phy_init: loading PHY init data from application binary
D (1332) nvs: nvs_open_from_partition phy 0
D (1337) nvs: nvs_get cal_version 4
D (1340) nvs: nvs_get_str_or_blob cal_mac
D (1345) nvs: nvs_get_str_or_blob cal_data
D (1356) nvs: nvs_close 5
I (1393) GPIO: GPIO[36] val: 1

I (1413) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0
I (1414) wifi: mode : sta (30:ae:a4:43:02:84)
D (1415) event: SYSTEM_EVENT_STA_START
I (1417) AWS: AWS IoT SDK Version 2.2.1-
Is there a reason behind the ESP system why that GPIO gets 'HIGH' around that part of the code?
Thanks.

Re: GPIO 36 abnormal behaviour

Posted: Tue Mar 27, 2018 7:28 am
by WiFive

Re: GPIO 36 abnormal behaviour

Posted: Mon Apr 02, 2018 3:09 am
by seopyoon
How could I resolve the issue if I already have the custom board. Ignore the first triggers? (Will there be this trigger for sure)
I am not using it as an ADC channel. I am only interested in digital HIGH/LOW.

Thanks.

Re: GPIO 36 abnormal behaviour

Posted: Mon Apr 02, 2018 3:23 am
by ESP_igrr
One option is to disable interrupt for this pin before starting WiFi, and re-enabling it afterwards.

Re: GPIO 36 abnormal behaviour

Posted: Mon Apr 02, 2018 3:34 am
by seopyoon
Okay. I will have to change the flow of the application, but if that ensures working app, I could do that.

Will there be a fix for this release anytime soon??

Re: GPIO 36 abnormal behaviour

Posted: Mon Apr 02, 2018 6:41 pm
by urbanze
ESP_igrr wrote:One option is to disable interrupt for this pin before starting WiFi, and re-enabling it afterwards.
I am facing this problem and I added your suggestion, however, the pin also generates interruptions sometimes when the client requests some WiFi data like html page, it seems that the consumption peak generates a noise in the pin. So it's not just when you turn on WiFi.

I'll also wait for this correction, will it come in the next official release?