Teensy 4, displaying Serial data via USB is delayed on reboot

Status
Not open for further replies.

JaredReabow

Well-known member
when booting the T4, if I immediately start sending complex serial data to the serial monitor, the output to the PC serial monitor wont actually show anything or seemingly connect until there is a "lul" in the data being sent.
My only solution has been to delay any output by about 8 seconds from reboot to allow the monitor to connect, then start sending.

It is configured for MTP disk if that info helps anyone.
 
Its a complex process. Before the serial monitor can accept any data the USB hardware must do signalling handshakes, and then the operating system on your PC must realize a new USB device is connected. After that the device identification to find that we have a serial device and loading operating system device drivers, configuring data buffers and finally let the serial monitor connect to the USB device port.

How much time this takes and how much complex serial data is lost due to buffer overflows and no one listening at the receiving end yet depends on the operation system of your PC.
 
Try putting these two lines at the beginning of setup():

Serial.begin(115200);
while (!Serial && millis() < 8000);
 
Its a complex process. Before the serial monitor can accept any data the USB hardware must do signalling handshakes, and then the operating system on your PC must realize a new USB device is connected. After that the device identification to find that we have a serial device and loading operating system device drivers, configuring data buffers and finally let the serial monitor connect to the USB device port.

How much time this takes and how much complex serial data is lost due to buffer overflows and no one listening at the receiving end yet depends on the operation system of your PC.


around 6 to 8 seconds.
the data is not so important, it just doesnt like being bombarded with data such as a loop with serial print.
 
Status
Not open for further replies.
Back
Top