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

Thread: no serial port upon teensy 4.1 connect

  1. #1
    Senior Member
    Join Date
    May 2019
    Posts
    115

    no serial port upon teensy 4.1 connect

    Upon connecting my teensy 4.1 to the USB cable, it wont show up anymore as a COM7 port, not in the win10 Device manager, and not in the Arduino > Tools > Port. My teensy 3.6 and 4.0 show up immediately in both the win10 DeviceManager and in Arduino>tools>Port, with the same cable, same USB port.

    I still can upload an sketch when I put the Teensy Loader automatic mode off, press the button on the Teensy 4.1, a red LED shines continuously, and press upload in Arduino. But I cannt use the serial monitor anymore.

    Could it be that I fried a bit of serial-hardware on the teensy 4.1 while connecting a oscilloscope?

    (win10, arduino 1.8.13, teensyduino 1.53)

  2. #2
    Senior Member
    Join Date
    Aug 2013
    Location
    Gothenburg, Sweden
    Posts
    412
    Since the Teensy Loader can talk to the board USB must be working, and the SerialUSB should also work if properly configured.
    So look for fried code and perhaps other hw connections that might upset the board running your sketch.

    Did you try the 15 second reset press ?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,076
    Quote Originally Posted by tschrama View Post
    Could it be that I fried a bit of serial-hardware on the teensy 4.1 while connecting a oscilloscope?
    Very unlikely. If uploading still works, the hardware is almost certainly still good.

    First step is to check Tools > USB Type in Arduino. If that got changed to any of the settings withing Serial, then no COM port is exactly the expected behavior.

    Also keep in mind Teensy uses HID protocol for uploading, so you should never see a COM port while it's uploading or Teensy Loader is showing the board is active in bootloader mode. Teensy only becomes a USB serial device when it runs your program, and only if Tools > USB Type was set to Serial. The other settings build different USB devices, causing Teensy to become something different when it runs your code.

    Windows caches info about USB devices in the Windows Registry. It's a silly design but Microsoft has their way of doing things. If that registry info gets messed up, well, all sorts of wrong things are possible. The simplest way to start troubleshooting is to try using that Teensy 4.1 on another PC or a Mac. Or if you have Linux (not a virtual machine) boot into Linux and give it a try. The kernel gives nice info about USB connect and disconnect in the syslog messages.

    One final thing to check is whether you have an unpowered USB hub between Teensy 4.1 and your PC. 4.1 uses more power than the other models (though 4.0 is very close). Powered hubs are usually very good, but it's getting power only though the USB cable, it might be struggling to work.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,076
    If you do the 15 sec button press, then wait about 1 min while it wipes all the flash, please know the LED blink program you get after that process is complete implements RawHID, not Serial. So it is supposed to be detected as HID and you should not see a COM port after that process.

    You only get a COM port after uploading from Arduino, and only if Tools > USB Type was set while compiling to one of the options that gives you Serial.

  5. #5
    Senior Member
    Join Date
    May 2019
    Posts
    115
    Thanks for the fast replies gentlemen. Didn’t try the 15sec reset yet. Furthermore on my other computer, a laptop, a COM port 6 or 7 does appear....and I can use the serial monitor! Will report back as soon as I have some time to test more.

  6. #6
    Senior Member
    Join Date
    May 2019
    Posts
    115
    Quote Originally Posted by PaulStoffregen View Post
    If you do the 15 sec button press, then wait about 1 min while it wipes all the flash, please know the LED blink program you get after that process is complete implements RawHID, not Serial. So it is supposed to be detected as HID and you should not see a COM port after that process.

    You only get a COM port after uploading from Arduino, and only if Tools > USB Type was set while compiling to one of the options that gives you Serial.
    OK, good to know and will try that.

  7. #7
    Senior Member
    Join Date
    May 2019
    Posts
    115
    OK, so I did reset the teensy 4.1 by pressing the button 15 sec. I could see a single red led flash, and upon release and 30sec waiting, a 2 sec Blink program runs. Upon compiling and uploading my sketch, the uploading fails as no teensy board is found. The sketch uploads directly after pushing the teensy button once. But serial monitor is not available and in the win10 Device manager no teensy COM port is found.

    On my win7 laptop, the process is the same, but after the 15sec reset and the running of the 2sec Blink programm, a COM port 6 is found, and the my own sketch uploads fine, and the serial monitor is available.

    Shall I try and do a clean install on the win10 machine of both Aruidno and Teensyduino?

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,907
    Not sure what sketch is being uploaded? Sounds like it is cratering on starting?

    Try a simple blink with USB:Serial and add this to start setup() to see if anything shows up with SerMon ready on the right port when it shows:
    Code:
    void setup() {
    	while (!Serial) ; // wait
    	Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
      // ...
    }
    Anything?

  9. #9
    Senior Member
    Join Date
    May 2019
    Posts
    115

    I cann't open the Serial Monitor, as no COM port is available.

    Upon an 15sec reset, and the 2sec Blinking programs is started, I can upload a sketch via Port : " hid#vid16x....... (strange characters)... but still no Teensy port in the Device manager. The hid-port disappears after uploading the sketch. Then I disconnect the USB cable and re-connect the USB-cable, and a "Teensy USB Serial (COM3) appears.

    I can now select Port: COM3 in Arduino and open the Serial Monitor and my println blink-message appears every time the blink-loop runs.

    Code:
    int led = 13;
    
    void setup() {
      // initialize the digital pin as an output.
      pinMode(led, OUTPUT);
      Serial.begin(9600);
    }
    
    void loop() {
      digitalWrite(led, HIGH);   
      delay(1000);               
      Serial.println("blink...");
      digitalWrite(led, LOW);    
      delay(1000);               
    }
    Then when I disconnect the teensy, and re-connect, this time Teensy USB serial COM3 re-appears.

    On my 2nd teensy 4.1 board, I received a errors message "Now able to open COM4 (Windows said this port was ready before it was actually ready...)Disconnect COM4
    " Upon disconnecting and re-connecting the USB cable, COM4 appears and the serial-monitor gives my blinking message.

    Seems to be working now
    Last edited by tschrama; 04-04-2021 at 12:52 PM.

  10. #10
    Senior Member
    Join Date
    May 2019
    Posts
    115
    New info: with my CS42448 multi-channel audio CODEC sketch, and the CODEC IC breakout board attached, the COM port disappears. With the CODEC IC board disconnected, the COM port does appear.

    Some there is definitely some interference with the CS42448 audio breakout board I am using.


    Do anybody know if there is a known problem with using TDM for the CS42448 in combination with Serial Monitor?
    Last edited by tschrama; 04-04-2021 at 01:50 PM. Reason: spelling grammar, as usual :D

  11. #11
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,444
    Maybe unrelated but might be worth looking into: I once had a similar problem with an attached pwm controller breakout board. Turned out that it was drawing too much from the 3V3 regulator of the T4.0. Worked nicely with a T3.2 or with a separate 3.3V supply.

  12. #12
    Senior Member
    Join Date
    May 2019
    Posts
    115
    Thanks for the tip. Something like that might be the case, since the CS42448 CODEC draws some significant current and gets hot.

  13. #13
    Senior Member
    Join Date
    May 2019
    Posts
    115
    I bought a USB hub with power supply and now the teensy COM port is just there; problem solved. Prolly a USB power issue.

Posting Permissions

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