@Dean_Arnold - Unfortunately due to the fact the (internal) pull up resistors are very “weak” (45k), the device is prone to wake from Deep Sleep by external factors.
The pins you have dedicated may have extraneous signals that could cause a wakeup.
I suggest you use your own external pull up resistors (on the column pins) in this case.
If you want to get the GPIO that triggered the wake from Deep Sleep via Ext1 use the following code.
esp_sleep_wakeup_cause_t wc = esp_sleep_get_wakeup_cause();
uint32_t gpio_num = 0;
switch (wc) {
case ESP_SLEEP_WAKEUP_EXT1:
{
uint64_t wakeup_pin_mask = esp_sleep_get_ext1_wakeup_status();
if (wakeup_pin_mask != 0) {
gpio_num = __builtin_ffsll(wakeup_pin_mask) - 1;
PRINTF("Wake up from GPIO %d\r\n", gpio_num);
} else {
PRINTF("Wake up from GPIO ???\r\n");
}
}
break;
default:
PRINTF("Wake up from unknow source %08X\r\n", wc);
break;
}
Here is the output from my test…
14:50:18.669 [03.769] RX> ************************
14:50:18.672 [00.001] RX> * Deep Sleep/Idle Test *
14:50:18.675 [00.002] RX> ************************
14:50:19.670 [00.994] RX> Starting!
14:50:19.672 [00.000] RX> Wake up from GPIO 5
14:50:20.659 [00.986] RX> Tick 1
14:50:21.659 [00.998] RX> Tick 2
14:50:22.659 [00.998] RX> Tick 3
14:50:23.659 [00.999] RX> Tick 4
14:50:24.659 [00.999] RX> Tick 5
14:50:25.660 [00.999] RX> Tick 6
14:50:26.660 [00.999] RX> Tick 7
14:50:27.659 [00.998] RX> Tick 8
14:50:28.659 [00.999] RX> Tick 9
14:50:29.659 [00.998] RX> Tick 10
14:50:29.683 [00.001] RX> Deep Sleep in a sec!
14:50:30.680 [00.996] RX> Going to sleep now
I tried with swapping the rows and columns with the same results. External pullup resistors were required.
Have fun Gary.