-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: enhancementProposed improvementProposed improvement
Description
Serial1.write(buf, len) (HardwareSerial) is blocking on Arduino Uno R4 Minima.
I kindly propose as a feature request that it be made non-blocking.
Here is the used sketch:
uint8_t Tx[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09};
void setup() {
pinMode(4, OUTPUT);
Serial1.begin(19200);
}
void loop() {
// send 10B
Serial1.write(Tx, 10);
// wait while toggling pin
uint32_t tStart = millis();
while (millis() - tStart < 200)
digitalWrite(4, !digitalRead(4));
}
and the measurement of the test pin:
Additional context
Serial.write() is non-blocking even on the old 8-bit AVRs w/o DMA.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: enhancementProposed improvementProposed improvement