From 18022ed535a8cc6a644b2942dc327cd51981b53a Mon Sep 17 00:00:00 2001 From: MagnusKos Date: Mon, 21 Jul 2025 18:50:10 +0300 Subject: [PATCH] Pro-Micro button SENSE signal Added SENSE signal on the user button. It is explicitly enabled now for this platform. --- src/platform/nrf52/main-nrf52.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index d886dd4a5..6345c79f7 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -383,6 +383,12 @@ void cpuDeepSleep(uint32_t msecToWake) nrf_gpio_cfg_sense_set(PIN_BUTTON2, sense1); #endif +#ifdef PROMICRO_DIY_TCXO + nrf_gpio_cfg_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP); // Enable internal pull-up on the button pin + nrf_gpio_pin_sense_t sense = NRF_GPIO_PIN_SENSE_LOW; // Configure SENSE signal on low edge + nrf_gpio_cfg_sense_set(BUTTON_PIN, sense); // Apply SENSE to wake up the device from the deep sleep +#endif + auto ok = sd_power_system_off(); if (ok != NRF_SUCCESS) { LOG_ERROR("FIXME: Ignoring soft device (EasyDMA pending?) and forcing system-off!");