ninja2
Well-known member
I am using a Micromod Teensy and a T4.1 fitted to this expansion board from BurgessWorld on Tindie. I need both to have the capability for force a soft reboot. On the Micromod the instruction '_reboot_Teensyduino_()' does the job nicely, the processor shuts down and retarts cleanly.
But when I try the same on the T4.1 the processor shuts down but locks up into a state where it won't respond to the reset button (with the tiny red LED glowing). The only way I can recover is a full power cycle. I tried the expanded the shutdown function shown below, but it made no difference.
Is there a way around this?
(and as an aside: what does the tiny red LED indicate?)
TIA
But when I try the same on the T4.1 the processor shuts down but locks up into a state where it won't respond to the reset button (with the tiny red LED glowing). The only way I can recover is a full power cycle. I tried the expanded the shutdown function shown below, but it made no difference.
Is there a way around this?
(and as an aside: what does the tiny red LED indicate?)
TIA
Code:
void safe_system_reboot() {
Wire.end();
Serial.flush();
Serial1.end();
Serial2.end();
pinMode(LEDpin, OUTPUT);
digitalWrite(LEDpin, LOW);
digitalWrite(PIEZOpin, LOW);
delay(150);
_reboot_Teensyduino_(); // Trigger software reboot
while (1);
}