Open xsw22 opened 2 years ago
Not sure if this is related, but there's a known bug in ESP32 with a workaround. Note that Button A is internally connected to GPIO39, one of the GPIOs affected by the bug.
Google the following: adc_power_acquire GPIO36 GPIO39 workaround
I'm working with M5Stack Core basic. Including bluetooth in a project causes BtnA to be pressed at some random time. Mainly while having a bluetooth connection established.
output1 ~30sec:
output2:
M5Stack initializing...OKM5.BtnA.wasPressed() 1502360
esp_spp_cb_event_t=0
esp_spp_cb_event_t=28
esp_spp_cb_event_t=34
esp_spp_cb_event_t=27
M5.BtnA.wasPressed() 43109946
output3:
M5Stack initializing...OKesp_spp_cb_event_t=0 1521393
M5.BtnA.wasPressed() 1522508
esp_spp_cb_event_t=28 1526672
esp_spp_cb_event_t=34 26793903
esp_spp_cb_event_t=30 41669001
M5.BtnA.wasPressed() 60009455
M5.BtnA.wasPressed() 61654465
esp_spp_cb_event_t=27 85546292
Once I've had an output with BtnA pressed every 1-2 sec after reboot even with no bluetooth connection.
I've tested 2 different configs:
The second config works fine, the first one has this problem with BtnA. Only BtnA has this unexpected behavior, BthB or BtnC work ok. It seems that delay (as suggested in https://github.com/m5stack/M5Stack/issues/52) somehow fixes this problem. But I'm not sure about it.