Skip to content

HardwareSerial reset crash / freeze #133

Open
@gioblu

Description

@gioblu

CIao, I noticed a strange behaviour working with Serial. If a device restarts while other devices are transmitting data, can end up frozen (I am testing with UNO and Mega on 1.6.7):

TX:

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("I will now freeze you!");
};

RX:

void loop() {
  digitalWrite(13, HIGH); // Blink forever
  delay(10);
  digitalWrite(13, LOW); 
  delay(30);
};

in this code I have the RX making begin() and then blinking in the loop, if I reset randomly the RX through the button:

  • often RX freezes with LED ON, seems before setup
  • often RX freezes with LED OFF, seems after executing setup
  • mostly I need to reset both at the same time to get back the receiver blinking
  • oscilloscope shows TX data coming out so seems not freezed
  • bug occurs with or without USB connected in RX or TX (so using other power supply)

Serial buffer overflow? Something connected to bootloader or because of serial incoming data in the process of boot after reset?
I have reported the bug in the italian forum: http://forum.arduino.cc/index.php?topic=460988.0

I am not the only one reporting this, here in russian: http://flprog.ru/forum/18-1803-2#20597

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions