On my 13SPECTRA, the Inkplate13SPECTRA_RTC_Alarm_With_Deep_Sleep example never wakes on its alarm: it arms GPIO18 (“RTC interrupt for alarm connected to GPIO18”), but on
this board the PCF85063A’s INT is wired to GPIO2. GPIO18 appears to be only the WAKE button.
What I observed (library 11.1.2, alarm set via
rtc.setAlarmEpoch(rtc.getEpoch() + 60, RTC_ALARM_MATCH_DHHMMSS)):
- The alarm itself works: AF sets after exactly 60s,
CTRL_2reads0xC0
(AIE | AF). But GPIO18 stays high, even fully awake with the flag asserted,
and deep sleep armed on GPIO18 sleeps through the alarm. - Diffing all RTC-capable GPIOs across the AF edge: GPIO2 drops the moment
AF sets and stays low until the flag clears (level INT - not CLKOUT, which
would toggle, and JP2 is open anyway). - Deep sleep with
esp_sleep_enable_ext0_wakeup(GPIO_NUM_2, 0)wakes on the
alarm second.
My fix, working reliably since:
esp_sleep_enable_ext0_wakeup(GPIO_NUM_18, 0); // WAKE button
esp_sleep_enable_ext1_wakeup(1ULL << 2, ESP_EXT1_WAKEUP_ANY_LOW); // RTC INT
I’d suggest you fix the example and RTC docs to use GPIO2 and document the INT
routing on the hardware/jumpers page (it currently only mentions IO2 as the
optional JP2 clock output).