Make flashmode work in preinit()

This commit is contained in:
unlogisch04
2026-01-13 23:31:23 +01:00
parent 4136e6ce9d
commit 27a4736abb

View File

@@ -67,8 +67,9 @@ extern "C" void preinit(void) {
// Boot into UART download mode
Serialtemp.println("\r\n\r\nEntering safe mode due to repeated crashes.");
Serialtemp.println("Entering flash mode...");
Serialtemp.flush();
Serialtemp.end();
// Serial needs to be stay active for
// rebootIntoUartDownloadMode to work.
// Found out over testing.
delay(1000);
ESP.rebootIntoUartDownloadMode();
}