Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Very strange compile\restart behavior

  1. #1
    Senior Member
    Join Date
    Oct 2019
    Posts
    160

    Very strange compile\restart behavior

    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?

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,687
    Is this on Windows 10?
    Do you have any other Teensys plugged in at the same time?

    Pete

  3. #3
    Senior Member
    Join Date
    Oct 2019
    Posts
    160
    Windows 10...and no, nothing else was plugged in.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    14,425
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •