Serial not working on a teensy 4.0

Mike118

Member
Hello, I have a strange problem.
I have 4 teensy 4.0 and one of them do not behave correctly... I can program it, and make the led blink the way I want but Serial is not working.
If I try Serial.print or Serial.println nothing is displayed on the Serial monitor, and Serial.available seems not working too...
The same program works well on other teensy 4.0 ...

How can this behavior happen? Can I try to do something to have it work correctly?

Thank you for your suggestions.
 
Maybe you're using Windows? And maybe Windows has stored some wrong info about the USB device in its Windows Registry? Just a guess...

A few quick things to try.

1: Look at Tools > Ports. Your Teensy 4.0 should appear twice, in "Teensy Ports" and "Serial Ports". Try both. Maybe both are the same, or maybe 1 works but the other doesn't?

2: Change Tools > USB Type to a non-Serial type like RawHID or MIDI and then upload. Does Serial.print() start working?

3: Try on another computer.
 
Thank you for your fast reply!

Maybe you're using Windows?
Yes.

Maybe Windows has stored some wrong info about the USB device in its Windows Registry?
Maybe, I don't know neither how to check that, nor what is the correct info nor how to change it...


1: Look at Tools > Ports. Your Teensy 4.0 should appear twice, in "Teensy Ports" and "Serial Ports". Try both. Maybe both are the same, or maybe 1 works but the other doesn't?

No both were not working.

2: Change Tools > USB Type to a non-Serial type like RawHID or MIDI and then upload. Does Serial.print() start working?

I don't manage to have the teensy 4.0 working well with RawHID ( Teensy seems not be well recognised ... very hard to program, and appear offline on serial monitor ... ) and I did not manage to open monitor either with MIDI, ( maybe just bad luck or something not well installed I don't know) but I also tried with Serial + MIDI and I managed to have the Serial working so I guess there is something to check over here ...

3: Try on another computer.

First it was not working ( before I tried to change to MIDI RawHID and Serial + MIDI)
I tried to put back Serial instead of Serial + MIDI and now it is working on the 2nd computer.
I can program on the 2,d computer and display data on the Serial Monitor,
I can also see it working on the 1st computer Serial Monitor
I can also program on the 1st computer and see it working on the 2nd computer Serial Monitor

But I still can't program it on the first computer and display data on this computer Serial Monitor ... This is very strange ... And the problem is only for this teensy... I tried again on a second teensy and it works ...

So should I only use this teensy with Serial + Midi set ? What is the downside to this?
Any idea about what I can change to have it working like the others ?

Thank you.
 
You can also try DUAL SERIAL.

That worked here on a T_3.5 that had not been used for some time and Windows seemed to have installed a new device in its storage over the same COM# port.

It would program with a Button Press - but no Serial Monitor output as it was given a COM# that mapped to wrong protocol driver - but DUAL Serial appeared on NEW com# ports.

I made a thread working through that to resolution having to use REGEDIT to find the Teensy Historical COM# and remove that - and then it started fresh.

That thread is: pjrc.com/threads/70835-Teensy-3-5-Button-Program-only-and-NO-Serial-out-until-DUAL-then-SerialUSB1-OK
 
Back
Top