Teensy 4.0 Board Unresponsive After USB Disconnection

Lavanya rajan

Well-known member
I'm encountering unexpected behaviour with a Teensy 4.0 board. Currently, I'm utilizing it as the main controller on a custom PCB, integrating features such as analog voltage input, digital input and output, MAX31865 & MAX31855 interfaces, I2C interface, Serial2, and Serial1 interfaces. The PCB incorporates an alternative power supply to energize the Teensy board. The USB cable is used only for programming, rest of the time board shall work with alternative power supply. However, after uploading the code and disconnecting the USB cable, the board fails to execute the programmed instructions. For instance, even though I've uploaded code for digital output, the digital pins remain inactive until I reconnect the USB cable and open the serial monitor. Can anyone provide insights into this issue
 
First check if your program has something like "while (!Serial)" in setup. This is common in most example programs, to wait for the Arduino Serial Monitor so you don't miss any Serial.print() info. But if left in your final code, it will just wait forever when no USB cable is connected or the Arduino IDE software isn't running.

Next, for the sake of troubleshooting, try programming your Teensy with the simplest LED blink example (File > Examples > 01.Basics > Blink). Then unplug the USB cable and power up by your external power supply. Many problems which appear to be hardware are actually software issues. If it really is a hardware problem, first confirm the simplest LED blink also does not start up.
 
First check if your program has something like "while (!Serial)" in setup. This is common in most example programs, to wait for the Arduino Serial Monitor so you don't miss any Serial.print() info. But if left in your final code, it will just wait forever when no USB cable is connected or the Arduino IDE software isn't running.
Thanks paul, you killed it...., its working now. this was the error
 
Back
Top