Teensy 4.1 entering constant bootloop on connection

michael2415

New member
I have been a Teensy user for a few years and this problem has mee stumped.

I have a Teensy 4.1 and with an 8MB SDRAM chip installed and the 5v line bridged. Its been working perfectly on a project for the last 6 months+ but now it constanly enters a boot loop whether attached to USB or disconnected and powered by 5v.

This is what i have tried so far:
  • Isolating the Teensy from the project and powering it on a bench supply.
  • Using different USB leads to attempt to rule out dodgy connections.
  • I have purchased a brand new Teensy and observed the same behaviour.
  • I have used multiple devices set up for Teensy through Arduino 1.8.19 IDE with Teensyduino installed and again had the same behaviour.

This is for a Final year project for University of which ends in a month.

Any advice is welcomed.
 
I don't know what you mean by "boot loop". Could you be more specific in describing the actual behavior you're seeing?
 
By bootlooping i mean that the teensy constantly connects and disconnects on USB but also when powered independantly, The robot i built will stop and start as iff the program is being run from the beginning
 
Is there an 8 second delay in the restarting or no real delay?

It might be crashing. On computer with SerMon connected it might show that:
Code:
void setup() {
	Serial.begin(115200);
	while (!Serial && millis() < 4000 );
	Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
	if ( CrashReport ) {
	  Serial.print( CrashReport );
	  delay(5000);
	}
	Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);

...
}

This should display the file+date+time info twice if it is getting that far and if there is a discovered Crash - that info will show between those lines.
 
Teensy 4.1 has a default fault handler which tries to automatically reboot after 8 seconds. You didn't mention anything specific about timing, so this is just a blind guess, but maybe the problem you're seeing is something about your program crashes and then the fault handler manages to reboot 8 seconds later?

The fault handler logs some basic info about whatever went wrong. You can access it with CrashReport. This library has examples.

https://github.com/PaulStoffregen/MyFault
 
I have the Teensy connected now and your are correct, It does loop every 8(ish) seconds.

I cant get the code you suggested on there.

"""Arduino: 1.8.19 (Windows 10), TD: 1.57, Board: "Teensy 4.1, Serial, 600 MHz, Faster, United Kingdom"

C:\Users\Alcock\AppData\Local\Temp\arduino_build_380291/..\arduino_cache_666784\core\core_547e52a679d6ffb8361375ecfac58023.a(main.cpp.o): In function `main':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/main.cpp:53: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

Error compiling for board Teensy 4.1."""


This is what the debug panel puts out.
 
Dealing with 2 problems at once is more than twice as hard as tackling each on its own.

Please understand this error is entirely due to something wrong on your PC. It has nothing to do with the Teensy hardware.

C:\Users\Alcock\AppData\Local\Temp\arduino_build_3 80291/..\arduino_cache_666784\core\core_547e52a679d6ffb8 361375ecfac58023.a(main.cpp.o): In function `main':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/main.cpp:53: undefined reference to `loop'

Why this is happening is difficult to say. First, try opening File > Examples > 01.Basics > Blink. Click Verify to check whether it is able to compile.

If not even the basic blink will compile, that's a sure sign something about the software on your PC has become corrupted. You might need to reinstall, or just switch to a different computer.

If blink compiles but your program doesn't, then you can focus your effort on what's wrong in your code. But check blink first so you don't waste a lot of time working with a corrupted PC.
 
Thank you Paul, I have run the blink scetch and waited an extended period of time and the problem seems to hace gone away. As you point out it seems to be hardware(Computer) and code related. If i find the route cause i will return with an answer.
 
Back
Top