I am using GPIO36 as a button input. It normally works fine. If I enable bluetooth audio I notice very fast pull-down pulses. These pulse occur about 0.5sec rate when BT A2DP isn't connected to my phone. When it initially connects to my phone, the glitches still occur at the same rate. If I then start to stream audio from my phone, the glitches do not occur. When I pause the audio from the phone, the glitches will occur very quickly (many times per second). This continues until I start streaming audio again from the phone, then the glitches go away. I have read that Wifi and ADC peripherals can cause this type of issue. I am not using these peripherals. Any ideas on why these glitches seem to occur with my BT activity? I attached a waveform of the glitch. GPIO36 pin has an external 10K pull-up to 3.3V.
Here is the init code for GPIO36:
gpioConfig.intr_type = GPIO_INTR_NEGEDGE;
gpioConfig.mode = GPIO_MODE_INPUT;
gpioConfig.pull_up_en = GPIO_PULLUP_DISABLE;
gpioConfig.pull_down_en = GPIO_PULLDOWN_DISABLE;
gpioConfig.pin_bit_mask = 1ULL << PWR_BTN_PIN; /* GPIO36 */
gpio_config(&gpioConfig);
GPIO36 GPIO Input Glitches With BT/A2DP
GPIO36 GPIO Input Glitches With BT/A2DP
- Attachments
-
- NewFile0.png (2.74 KiB) Viewed 6257 times
Re: GPIO36 GPIO Input Glitches With BT/A2DP
I think the Bluetooth driver uses the adc power detect function.
Re: GPIO36 GPIO Input Glitches With BT/A2DP
Hi @besterm
I have a similar observation with GPIO36/39 in combination with bluetooth. We are using GPIO36/39 as inputs from flow sensors that basically generate pulses in a range from 100-2kHz on named inputs. Once we activate the bluetooth module and connect to the device through BLE, we can observe pulses on GPIO36/39 simultaneously. The pulses have a duration of about 13µs and a period of 30ms. If we deactivate the PCNT inputs on GPIO36/39 we can still see the pulses, once we deactivate the bluetooth module in our code, we do not see the pulses any more. Used module is ESP32-WROOM-32D. The ripple that can be seen on SCR02.PNG is related to the dcdc we are using in supply.
I have a similar observation with GPIO36/39 in combination with bluetooth. We are using GPIO36/39 as inputs from flow sensors that basically generate pulses in a range from 100-2kHz on named inputs. Once we activate the bluetooth module and connect to the device through BLE, we can observe pulses on GPIO36/39 simultaneously. The pulses have a duration of about 13µs and a period of 30ms. If we deactivate the PCNT inputs on GPIO36/39 we can still see the pulses, once we deactivate the bluetooth module in our code, we do not see the pulses any more. Used module is ESP32-WROOM-32D. The ripple that can be seen on SCR02.PNG is related to the dcdc we are using in supply.
- Attachments
-
- SCR02.PNG (41.81 KiB) Viewed 6014 times
-
- SCR01.PNG (41.75 KiB) Viewed 6014 times
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: GPIO36 GPIO Input Glitches With BT/A2DP
Are you using pullups on the GPIOs? If so, what value? Note that these GPIOs do not have internal pull-ups.
Re: GPIO36 GPIO Input Glitches With BT/A2DP
Yes I am using external pull-ups. Tested with 10k and 100k. No change in the pulses observed.
I've also tested with other modules we have in house ESP32-WROVER-B with the same observation.
I've also tested with other modules we have in house ESP32-WROVER-B with the same observation.
Re: GPIO36 GPIO Input Glitches With BT/A2DP
Hi,
I managed to find more time for testing. The issue can be observed on all gpio pins on the modules. The shown glitches are only visible on GPIO39 and GPIO36 with the oscilloscope but function wise all other pins are also affected. By curiosity sake I activated the filter module https://docs.espressif.com/projects/esp ... t8uint16_t with different values 1-1023. Once activated, regardless the setting, the counter works as intended. Except for deactivating the filter with a 0 value. The observed glitches are still there but logic wise the glitches are now neglected. I think therefore this is a hardware feature/bug.
I managed to find more time for testing. The issue can be observed on all gpio pins on the modules. The shown glitches are only visible on GPIO39 and GPIO36 with the oscilloscope but function wise all other pins are also affected. By curiosity sake I activated the filter module https://docs.espressif.com/projects/esp ... t8uint16_t with different values 1-1023. Once activated, regardless the setting, the counter works as intended. Except for deactivating the filter with a 0 value. The observed glitches are still there but logic wise the glitches are now neglected. I think therefore this is a hardware feature/bug.
Who is online
Users browsing this forum: Bing [Bot], KMTsvetanov and 99 guests