From 43a1976f6d5df70d0e51c63c7c151656e67c34fc Mon Sep 17 00:00:00 2001 From: MagnusKos Date: Mon, 21 Jul 2025 18:14:50 +0300 Subject: [PATCH] Pro-Micro DeepSleep Quick Fix It is noticed that some nRF52840 boards (pro-micro in particular) stopped waking up from the deep sleep state (shutdown state) with a press of a button. The problem is in a Serial1.end() call. --- src/platform/nrf52/main-nrf52.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index 1bf9a39fd..958f1abcc 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -284,8 +284,12 @@ void cpuDeepSleep(uint32_t msecToWake) #endif // This may cause crashes as debug messages continue to flow. Serial.end(); + + // This causes troubles with waking up on nrf52 (on pro-micro in particular): + // we have no Serial1 in use on nrf52, check Serial and GPS modules. #ifdef PIN_SERIAL1_RX - Serial1.end(); + if (Serial1) // A straightforward solution to the wake from deepsleep problem + Serial1.end(); #endif setBluetoothEnable(false);