I read that this issue was fixed with the 1.0.3 release, however I am now using the new Arduino Due with the 1.5.2 IDE and I am having the same old problem of Serial.flush() not waiting long enough such that when I disable the TX on my RS-485 transceiver the last byte has not yet made it through. Anyone else have this problem with the Due? Any suggested fixes?
digitalWrite (pinTX_ENABLE, HIGH); // Enable transmit mode on RS-485 transceiver
Serial1.write(buffer, L); // write byte buffer of length L to RS-485 DI
Serial1.flush(); // wait until write complete
digitalWrite (pinTX_ENABLE, LOW); // Disable transmit mode on RS-485 transceiver
Thanks!