diff --git a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp index 20654b05f..b30ec296c 100644 --- a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp +++ b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp @@ -424,6 +424,7 @@ size_t TasmotaSerial::write(uint8_t b) { if (m_tx_enable_pin > -1) { digitalWrite(m_tx_enable_pin, HIGH); + delayMicroseconds(10); // delay(1) will exception here } size_t size = 0; if (m_hardserial) { @@ -460,7 +461,7 @@ size_t TasmotaSerial::write(uint8_t b) { size = 1; } if (m_tx_enable_pin > -1) { - delayMicroseconds(800); // delay(1) will exception here + delayMicroseconds(10); // delay(1) will exception here digitalWrite(m_tx_enable_pin, LOW); } return size; diff --git a/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp b/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp index 0fb316bd3..98773a285 100644 --- a/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp +++ b/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp @@ -157,10 +157,11 @@ uint8_t TasmotaModbus::Send(uint8_t device_address, uint8_t function_code, uint1 flush(); if (mb_tx_enable_pin > -1) { digitalWrite(mb_tx_enable_pin, HIGH); + delayMicroseconds(10); // delay(1) will exception here } write(frame, framepointer); if (mb_tx_enable_pin > -1) { - delayMicroseconds(800); // delay(1) will exception here + delayMicroseconds(10); // delay(1) will exception here digitalWrite(mb_tx_enable_pin, LOW); } free(frame);