Page 1 of 1

Problems using Gpio36 as gpio sensor_vp

Posted: Sat Aug 19, 2017 8:07 pm
by LEMAOR
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);
      }

Re: Problems using Gpio36 as gpio sensor_vp

Posted: Sun Aug 20, 2017 3:49 am
by ESP_Sprite
What hardware (as in devboard) are you using?

Re: Problems using Gpio36 as gpio sensor_vp

Posted: Mon Aug 21, 2017 3:24 am
by LEMAOR
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

Re: Problems using Gpio36 as gpio sensor_vp

Posted: Tue Aug 22, 2017 12:52 am
by ESP_Sprite
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?

Re: Problems using Gpio36 as gpio sensor_vp

Posted: Wed Oct 04, 2017 7:21 am
by andreykorol
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.

Re: Problems using Gpio36 as gpio sensor_vp

Posted: Wed Oct 04, 2017 7:54 am
by WiFive
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