Problems using Gpio36 as gpio sensor_vp

LEMAOR
Posts: 6
Joined: Thu Aug 17, 2017 7:51 pm

Problems using Gpio36 as gpio sensor_vp

Postby LEMAOR » Sat Aug 19, 2017 8:07 pm

I have 5 buttons declared, like i will describe in the code below, 4 of them work but the one declared on gpio_36.

i declare the gpio's, the mode, and interrupts mode, i also declare the xsempahore and finally the taker.

the problem is that the gpio_36, keeps triggering the xsemaphore/interrupts and i keep seeing on the monitor:
button 36 false
button 36 false
button 36 false
button 36 false
...

without even touching the button, as i said the other 4 gpio work properly as expected but this one.

i tried using: PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[36], PIN_FUNC_GPIO);
but the behavior is the same i keep seeing the interrupts triggered on its own.


anyone can shade some light with this issue?


Declarations:

Code: Select all

     #define GPIO_36 36
     gpio_pad_select_gpio(GPIO_36 );
     gpio_set_direction(GPIO_36 , GPIO_MODE_INPUT);
     
     gpio_install_isr_service(0);
     
     gpio_isr_handler_add(GPIO_36 , handler_botton_5, NULL);
	gpio_set_intr_type(GPIO_36 , GPIO_INTR_ANYEDGE);
xsemaphore:

Code: Select all

void IRAM_ATTR handler_botton_5(void* arg) {
   xSemaphoreGiveFromISR(xSemaphore_button_5, NULL);
}
the taker;

Code: Select all

while(1){
 if(xSemaphoreTake(xSemaphore_button_5,( TickType_t ) 2) == pdTRUE) {
         //printf("Pulsador 2 presionado!\n");
                vTaskDelay(5/portTICK_PERIOD_MS);
                 if(gpio_get_level(GPIO_36 ) ==0){
                  printf("button 36 true \n");
                  Button_bits[3]=true;

                }else{
                  printf("button 36 false \n");
                    Button_bits[3]=false;
                }                 
      }
      vTaskDelay(500/portTICK_PERIOD_MS);
      }

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

Re: Problems using Gpio36 as gpio sensor_vp

Postby ESP_Sprite » Sun Aug 20, 2017 3:49 am

What hardware (as in devboard) are you using?

LEMAOR
Posts: 6
Joined: Thu Aug 17, 2017 7:51 pm

Re: Problems using Gpio36 as gpio sensor_vp

Postby LEMAOR » Mon Aug 21, 2017 3:24 am

i couldnt find the name of the devboard:

but it looks like this one, with the holes for screws:
https://www.banggood.com/ESP32-Developm ... 09512.html

i tought i was not changing the pin from sensor_vp to gpio_36 properly, is it really a hardware issue?

thank you for your support

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

Re: Problems using Gpio36 as gpio sensor_vp

Postby ESP_Sprite » Tue Aug 22, 2017 12:52 am

I was mostly idly wondering if the devboard could have capacitors on that pin which can mess up things. Seemingly it does... but I'm not sure if a 270pF capacitor to an unused pin can lead to what you see. Just for my reference: you're trying to use a physical switch here, not the capacitive touch function of the ESP32?

andreykorol
Posts: 5
Joined: Thu Jul 20, 2017 6:04 am

Re: Problems using Gpio36 as gpio sensor_vp

Postby andreykorol » Wed Oct 04, 2017 7:21 am

Have same problem on GPIO36 (ESP-WROOM-32 board) - fake interrupts on this pin. Internal pull-up & pull-down enabled.
Also two moments:
1) GPIO36 external pull-down 8K - no fake interrupt
2) GPIO36 external pull-up 8K - still getting fake interrupt.

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

Re: Problems using Gpio36 as gpio sensor_vp

Postby WiFive » Wed Oct 04, 2017 7:54 am

andreykorol wrote:Internal pull-up & pull-down enabled.
34-39 has no internal pull-up/pulldown

You could maybe try rtc_gpio_deinit(37) not sure if it will do anything

Who is online

Users browsing this forum: No registered users and 107 guests