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
This is probably (?) related to previous issue arduino/Arduino#1742, but happens with 1.6.8. I'm running some Dynamixel smart servos from the hardware serial ports on the board; AX-12As off Serial0, and XL-320s off Serial1. As far as I can tell the hang isn't happening on Serial0, although obviously the two ports are being used slightly differently. Both are run at 1000000 baud.
Basically, everything will be fine for anywhere between 2-20s, but once the hang is triggered the board is completely unresponsive until power off/on or serial reset (reset button does nothing). I've got a logic analyser hooked up, and the final packet on the serial line is always sent in full. Control just doesn't make it past the subsequent flush(). Code looks like this:
// Write out the buffered packet
for (int i = 0; i < _packet_length + 7; i++) {
unsigned char b = _packet_data[i];
Serial1.write(b);
}
// Ensure output completed before we switch comm modes
Serial1.flush();
digitalWrite(CommPin, 0);
That CommPin line stays HIGH for the rest of time. Replacing the flush() with a bunch of asm nops (to delay for a microsecond or three) works without issue.
The text was updated successfully, but these errors were encountered:
This is probably (?) related to previous issue arduino/Arduino#1742, but happens with 1.6.8. I'm running some Dynamixel smart servos from the hardware serial ports on the board; AX-12As off Serial0, and XL-320s off Serial1. As far as I can tell the hang isn't happening on Serial0, although obviously the two ports are being used slightly differently. Both are run at 1000000 baud.
Basically, everything will be fine for anywhere between 2-20s, but once the hang is triggered the board is completely unresponsive until power off/on or serial reset (reset button does nothing). I've got a logic analyser hooked up, and the final packet on the serial line is always sent in full. Control just doesn't make it past the subsequent
flush()
. Code looks like this:That
CommPin
line stays HIGH for the rest of time. Replacing theflush()
with a bunch of asmnop
s (to delay for a microsecond or three) works without issue.The text was updated successfully, but these errors were encountered: