Very strange compile\restart behavior

Status
Not open for further replies.

kdharbert

Well-known member
I have a setup where I am sending camera data over UDP that was working yesterday. Today I am seeing strange behavior:
1. My first attempt to compile threw a bunch of weird errors. I closed the IDE and retried and everything compiled again. However, compile times are really long for some reason.
2. I then began seeing all the UDP data arriving scrambled and serial data quits right before I initialize ethernet. The serial hang seems to suggest the Teensy is hung, but I keep seeing UDP traffic of the correct format but filled with garbage.
3. I power cycled my PC. The problem persisted. The Teensy would not reliably restart. It seemed that a phantom COM port had appeared. I deleted it and re-attached the Teensy. Behavior then returned to normal.

So...it seems like the Teensy may have been using two COM ports: It starts out using one, and then switches once the ethernet is enabled..and this may have been caused by some one-time library messup. It's only ever been in USB serial (single) mode, so I'm not sure how this is possible.

This chewed up a lot of time. If I see something similar in the future, what debug steps can I take to shorten the time to resolution?
 
Is this a T_4.1 using the onboard ethernet magjack combo?

Holding the Button while plugging the Teensy in will force it to not start running prior code, but rather stop waiting in the bootloader for the next upload - and it will appear as the bootloader HID device. That might have cut down on the time to have the IDE restart to properly reprogram the Teensy.

Errors during compile suggest the IDE was having an issue ...

As far as the alternate USB port that isn't a normal/reported thing - maybe it got a bad code upload or start and the USB device presented was not that of the normal Teensy device.

Does the sketch 'print fast to USB Serial' ? With uncontrolled Serial.print()'s the IDE and PC can get overwhelmed and lose the connection or worse.
 
Status
Not open for further replies.
Back
Top