You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix for serial port on esp32 V4 builds (see upstream wled#5501)
* check that SERIAL_MAXTIME_MILLIS is below the task watchdog trigger time
* pet esp32 watchdog once before massive reading of serial input (AdaLight/TPM2)
gpio_pulldown_en((gpio_num_t)hardwareRX); // pinMode() routes GPIO through the GPIO matrix and detaches UART0 RX - use gpio_pulldown_en() instead. See upstream issue #5501
488
+
#else
489
+
pinMode(hardwareRX, INPUT_PULLDOWN); delay(1); // suppress noise in case RX pin is floating (at low noise energy) - see issue #3128
490
+
#endif
487
491
#endif
488
492
#ifdef WLED_BOOTUPDELAY
489
493
delay(WLED_BOOTUPDELAY); // delay to let voltage stabilize, helps with boot issues on some setups
static_assert(SERIAL_MAXTIME_MILLIS < (CONFIG_ESP_TASK_WDT_TIMEOUT_S * 1000 - 2 * portTICK_PERIOD_MS), "SERIAL_MAXTIME_MILLIS must be shorter than the IDLE watchdog timeout.");
static_assert(SERIAL_MAXTIME_MILLIS < (CONFIG_TASK_WDT_TIMEOUT_S * 1000 - 2 * portTICK_PERIOD_MS), "SERIAL_MAXTIME_MILLIS must be shorter than the IDLE watchdog timeout.");
22
+
#endif
23
+
#endif
24
+
13
25
enumclassAdaState {
14
26
Header_A,
15
27
Header_d,
@@ -108,10 +120,12 @@ void handleSerial()
108
120
static byte red = 0x00;
109
121
static byte green = 0x00;
110
122
123
+
if (Serial.available() > 0) delay(1); // pet the watchdog
124
+
111
125
unsignedlong startTime = millis();
112
126
while ((Serial.available() > 0) && (millis() - startTime < SERIAL_MAXTIME_MILLIS))
0 commit comments