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.
This commit is contained in:
MagnusKos 2025-07-21 18:14:50 +03:00
parent 60ec05e536
commit 7c45ada631

View File

@ -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);