From ff26459d56cac71f7c9273317bfcde49c18de95c 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 8441fa310..ceab1a78c 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -380,6 +380,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!");