diff --git a/cores/esp32/HardwareSerial.cpp b/cores/esp32/HardwareSerial.cpp index 2e1f2701e9a..d0b938374e9 100644 --- a/cores/esp32/HardwareSerial.cpp +++ b/cores/esp32/HardwareSerial.cpp @@ -368,11 +368,6 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in _uart = NULL; } } - // create a task to deal with Serial Events when, for example, calling begin() twice to change the baudrate, - // or when setting the callback before calling begin() - if (_uart != NULL && (_onReceiveCB != NULL || _onReceiveErrorCB != NULL) && _eventTask == NULL) { - _createEventTask(this); - } // Set UART RX timeout uartSetRxTimeout(_uart, _rxTimeout);