Damaged Arduino DUE?

Hi,

I think I might have broken my DUE. It has received a few voltage peaks over either AnalogIn or GND, which resulted in my USB connection to drop (I could hear the windows "device unplugged" sound, but the code kept on running). This happened maybe 15-20 times and I don't know the exact nature of those voltage peaks yet (though I will soon since I'm now a proud owner of an oscilloscope), but I could always just plug out and back in the USB wire and everything would work again.

Now, it seems that the USB Serial connection is broken on both, the programming port and the native usb port, though I never used the native port before. I get the following exceptions when using the SerialMonitor:
Exception in thread "EventThread COM6" java.lang.NullPointerException
at processing.app.Serial.serialEvent(Serial.java:176)
at jssc.SerialPort$EventThread.run(SerialPort.java:1096)

This happens after 1-5 bytes receiving over the programming port (so pretty much instantly), and after 2 - 30 seconds on the native port, independent of the amount of bytes. Again, the code on the device keeps running (i.e. if I just add a Serial.println("a"); to the blinking example, the LED keeps blinking, but I don't receive any a's anymore).

The funny thing is that reprogramming the devices still works like a charm over both ports, with the limitations that Serial over USB breaks all the time.

Any ideas for rescuing my DUE, or is it damaged beyond repair?

Have you rebooted the PC since the problem started?

Yes, I even tried it on two completely different PCs, same behaviour on both.

It is not broken. You probably have a software problem. If it would be broken you couldn't upload sketches.

I had the same problem on my Due using the 1.5.6 IDE, where Serial Monitor would read a few lines then crash with a NullPointerException. I'm using Windows 7 64 bit, and had the same problem happen with my Arduino Micro. The test code I used was:

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

void loop() {
  Serial.println("Test");
  delay(1);
}

You probably have not fried your Due, and the problem is most likely the 1.5.6 IDE. After I switched to an older version (1.5.1r2), the problem went away. You can download Arduino 1.5.1r2 at https://github.com/downloads/arduino/Arduino/arduino-1.5.1r2-windows.zip