Serial Monitor with Teensy3, Win7 Pro, stops after a few minutes

Status
Not open for further replies.

bboyes

Well-known member
This the the first time I have done much with serial monitor in a couple of months. Arduino 1.05, TeensyDuino 1.15, Win7 Pro 64, Teensy3. I'd like to log output (captured with RealTerm 2.0.0.57) from Teensy and import into a spreadsheet. This worked fine a couple of months ago. I output some data every second or less.

Now what I see with a couple of different Teensy3 is that after 2000-3000 seconds there seems to be no more serial output from Teensy3 USB. Nothing shows on Arduino's Serial Monitor, and if I turn that off and try RealTerm there's nothing for it to show either. I have not tried to probe the serial signals on Teensy3. Teensy3 is still running: I can see I2C signals and a status LED is getting updated when it turns a heater on and off.

Since Teensy is running I suspect the PC USB connection, but what can I do to debug further? Since it works for several minutes, clearly all the links in the chain are OK for that time. I don't have a theory why it would stop after a while.

Is anyone else seeing this?

Thanks
Bruce
 
I also have Win7 Pro and haven't had problems like that. Just to be sure, I wrote a simple program which writes a line to the USB serial port every 800ms. It has been running for over 15 minutes and hasn't skipped a beat.
Code:
void setup(void)
{
  Serial.begin(9600);
  while(!Serial);
  delay(3000);
}
unsigned int count = 0;
void loop(void)
{
  delay(800);
  Serial.print(count++);
  Serial.println(" some extra text just for kicks");
}

Pete
 
I also have Win7 Pro and haven't had problems like that.


FWIW, my Win 7 Enterprise Edition doesn't allow the Serial monitor window to launch at all. Even with a clean install. Something is seriously borked, but interestingly uploads still work fine. I elected to uninstall Arduino and Teensy from my Windows machine.
 
The problem I have with Win 7 is that if I am using 2 or more Teensys at the same time, I must power them up in a specific sequence or the individual IDEs won't work nicely. It seems that Window remembers the order in which the Teensys were first plugged in. If I want to use the Teensy3 as I did earlier on this morning, I have to be sure they are all unplugged. Then I plug in the Teensy2 and start up the Serial monitor for it on COM4. Then start up the Teensy++2 and fire up its serial monitor on COM11. Now I can plug in and start up the Teensy3 and serial monitor on COM13.
If I don't do this sequence, and fire up only the Teensy3, when I try to upload a sketch to it, TeensyDuino generates an error message that the code is not for a Teensy2.

Pete
 
@el_supremo & @bboyes - Have you installed the latest 1.17 version?

Older versions (I believe before 1.16) didn't give the serial number to Windows, which Microsoft's driver uses to associate with COM ports.

Older versions also didn't use the ARM interrupt priorities, which solve some possible deadlock conditions if you're doing I/O within interrupts.

Please make sure you're running code build with Teensyduino 1.17. If the problems continue with 1.17, of course I'll need you to post code + details so I can try to reproduce the problem here.
 
This is with the latest release of TD 1.17
I usually have to plug Teensys in this order:
com4 teensy2
com11 teensy++2
com13 teensy3

This time I hooked them up in the reverse of the usual sequence.
I unplugged them all and then plugged in the Teensy3 and started the IDE. COM13 is in the dropdown menu and I uploaded the blink example code. Worked.
I then plugged in the Teensy++2 but when I started its IDE, COM4 shows up (which I selected). When I uploaded the blink code I got an error dialog with the title "File Compatibility Error".
Compiled for: "Teensy++ 2.0 (AT90USB1286)"
This board is: "Teensy 3.0 (MK20DX128)"

AHA. I repeated this test from scratch and realized that I left out one important step.
After uploading the code to the Teensy, I have to open the Serial Monitor for each Teensy and then things work properly.
So the error I received (above) doesn't happen if I open the serial monitor for the Teensy3 before I try to use the Teensy++2. That seems to be the common thread to the problem and I suppose it makes sense. If I don't open the Serial Monitor to get a lock on the COM port, TeensyDuino (or windows) probably can't tell and goes for whichever com port is first in the list when it tried open a port - maybe?

Pete
 
Status
Not open for further replies.
Back
Top