Teensy 4.0 Issue

Luca

Active member
Hi, i tryed to use my brand new teensy 4.0 in a PCB that i have developed. I loaded the code as usual (using the latest teensyduino version) but when i disconnect the usb cable from the board and i try to use it with an external power (regulated 5v) it executes the code for around a second and then it stops working at all and the boot LED starts flashing. When it happens the Arduino IDE can't find the COM port associated to the teensy and i the only way is to reboot the board. what should i do?
 
Hi @Luca,

There really is not enough information here to really give any informed suggestions.

Like picture showing the board, and or schematic of your board, or details for example regulated +5v... How?
Do you have some VR or DC/DC converter that is contained on your board? If so which one? What voltage is coming in?

I am asking this as there are some voltage converters that may not work very well. That is they may have a slow voltage ramp up speed or the like. I ran into this awhile ago with using a BEC
I think it was this one (https://smile.amazon.com/gp/product/B000MXAR12) that did not work.

What other pins are hooked up?

What code are you running?

Sorry again not sure what else to mention without understanding more of your setup
 
Crashing into T_4.0 bootloader is an odd sign, in fact first report?
> is there a pattern/count with a pause in the RED bootloader LED blinking?

Generally the first easy thing would be to look into 'CrashReport'. Though that only works while the Teensy stays powered between restarts. Given the switch between external power and USB that won't be easy to accomplish.
Code:
void setup() {
  Serial.begin(9600); // With TeensyDuino 1.54 Serial.begin() may return connected
  if ( Serial && CrashReport ) 
  { // Make sure Serial is alive and there is a CrashReport stored.
    Serial.print(CrashReport); // Once called any crash data is cleared
    // In this case USB Serial is used - but any Stream capable output will work : SD Card or other UART Serial
  }

Perhaps if you had a sacrificial USB cable that could be opened to cut the '5V' wire the USB cable could be left connected and then when externally powered the USB interface to the PC would still work.

That might allow seeing the problem 'go away' when normal USB communications were present.
If not, then normal code output would appear showing the activity allowing some info and debugging of the code before it fails. Adding Serial.flush() after .print()'s would have them complete transfer before proceeding.
Then, hopefully with a Button press, uploading the code would be possible and having that code to the above check for a CrashReport might offer any details if it was triggered before the code 'exited'.
Also, there may be some info on this event that Teensy Loader gets when the Loader's: menu Help / 'Verbose info' window is open.

If more help is needed seeing and understanding what CODE is involved might help, and knowing what devices are attached to the Teensy.
 
Forgot to mention: If the program LED is flashing a blink sequence, the number of blinks might tell you something.

More information up on the page: https://www.pjrc.com/store/ic_mkl02_t4.html

Yes, that was the reason behind the second line in my crosspost.

@KurtE - has there ever been cases of the RED blink after running started?

p#1 says: "executes the code for around a second and then it stops working at all"

Not clear what signs were given it was executing - or just taking a second to fail to properly start?

If going to solid LED it would be ready to program in bootloader mode, if a blink 'pattern' it shows a startup issue. And IIRC it a simple unbroken repeat blink because the bootloader isn't finding a host machine

That brings up a question WRT to: " the Arduino IDE can't find the COM port associated to the teensy"
When on external power the USB cable needs to be disconnected unless the underside trace has been cut, or as noted above the cable has the 5V line cut.
>> Question: if the USB cable was disconnected how would the IDE see the Teensy?

If the CABLE and the External power were applied - that isn't a good supported configuration when both are supplying power.
 
@defragster - yes we cross posted. ;) :D

Again not enough information yet other than to throw darts.

Now if it were me and I had this issue. I would probably do something like:

Go into cores\teensy4\debug\printf.c and uncomment the line:
//#define PRINT_DEBUG_STUFF

And rebuild and download... Assume that still is working...

I would then hook up some form of USB to Serial adapter to Serial4 of that teensy... Note: This could be another teensy and use the
usb to serial example sketch. Connected up at 9600 baud.

The kernel will print out debug stuff to Serial4 and maybe something would pop up... and/or I would additional...

But again wondering about the power setup...
 
Back
Top