PC crashing with Teensy 3.6

Status
Not open for further replies.

Raptor

Active member
So I've had the Teensy 3.6 with pins for a week or two and discovered a problem whenever the Teensy is connected to my Acer laptop. I had the Teensy running a sketch to display the readings from 5 DS18B20 sensors and noticed that after a while the laptop was sitting at the BIOS screen. This has happened numerous times and the other weirdness was the laptop locking up and needing to be rebooted to recover. If I disconnect the USB cable the laptop does not lockup or fall into the BIOS screen so I'm left to conclude that something about the USB connection is messing the laptop up. Give me a few to upload the sketch...


Brian
 
OK, here's the sketch that I first noticed the problem.


#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 2
/********************************************************************/
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
/********************************************************************/
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
/********************************************************************/

void setup()
{
// start serial port
Serial.begin(9600);
Serial.println("Dallas Temperature IC Control Library Demo");
// Start up the library
sensors.begin();
}

long int cnt=1;

void loop()
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
/********************************************************************/
// Serial.print(" Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperature readings
// Serial.println("DONE");
/********************************************************************/
Serial.print("Count = ");
Serial.println(cnt);

Serial.print("Temperature 0: ");
Serial.println(sensors.getTempCByIndex(0)); // Why "byIndex"?

Serial.print("Temperature 1: ");
Serial.println(sensors.getTempCByIndex(1)); // Why "byIndex"?

Serial.print("Temperature 2: ");
Serial.println(sensors.getTempCByIndex(2)); // Why "byIndex"?

Serial.print("Temperature 3: ");
Serial.println(sensors.getTempCByIndex(3)); // Why "byIndex"?

Serial.print("Temperature 4: ");
Serial.println(sensors.getTempCByIndex(4)); // Why "byIndex"?

// You can have more than one DS18B20 on the same bus.
// 0 refers to the first IC on the wire
Serial.println();
// delay(10);
cnt++;

}



I should add that the laptop lockup occurred when running the "Blinky" sketch that comes with the Arduino IDE so it isn't just a single sketch that's doing this.


Brian
 
I don't see laptop OS notes - or IDE TeensyDuino version info? Also what USB Type is used for compiling? 'Serial' or other?

Possibly something specific to your machine if Blinky kills it - supposing that was unmodified and not having copious Serial.print() added. The above sketch will be problematic as it will quickly fill and overwhelm the Serial/USB connection with unending Serial.print(). First test would be to restore the '// delay(10);' line and make it more like "delay(3000);" as a test point to see if that changes the behavior. Is the IDE SerMon being used to handle the usb display on the PC? One other note, I generally use TyCommander ( TyQt ) {forum search this } for Serial Monitor. It doesn't use the IDE's JAVA code base and may change handling for the better.

Also posted code should use 'code' tags for readability. In advanced view click the "#" and it will show what they look like.
 
Well this is very unusual. Perhaps something is very wrong with your laptop?

On the Teensy side, perhaps try running a copy of your code without any of the Serial.print stuff. Maybe there's something really messed up with the drivers or USB hardware on your laptop? Or perhaps the problem is related to the power consumption on the USB port? Deleting all the printing, so Teensy just sits there without any communication would be at least a first step to try to figure out if this is a power or data issue.
 
OK, I had to reinstall Windows 10 as the laptop, which had given me no problems in 3 years, was acting up even without the Teensy being connected. I've run the laptop with my Arduino Mega2560 for a day plus after the Windows re-install without issues and will run a day or two more with the Mega then go back to the Teensy 3.6 and see is the same or similar issue develops. I should mention that the laptop does not have a HD and instead has a 250GB SSD. Doing chkdsk revealed numerous corrupted areas that caused chkdsk to crash as well. Since re-installing Win 10 it looks like everything is running OK so after a few more days I'll once again try the Teensy and update here...


Brian
 
Status
Not open for further replies.
Back
Top