What is the proper way to turn off Teensy 4.1?

Status
Not open for further replies.

teensy_teen

Active member
Hi, what is the proper way to shut down Teensy 4.1 after use? It is safe to just unplug the usb cable or the battery?
 
Unless it needs to complete some EEPROM or SD Card or other data storage for data integrity, just losing/dropping power won't bother anything.

The processor will simply load code and start again when repowered.
 
Thank you. How do I know if it needs to complete some EEPROM or SD Card or other data storage for data integrity?

It will be based on the code you write. Unless you have some access or use of those elements - there is nothing in the system that will make use of them.
 
That's the difference between a microcontroller and a computer - the microcontroller runs just the
program you write (plus the libraries it uses), and nothing else, no operating system, nothing in
the background (unless you wrote it or a library does this). They are usually rock solid against power
cycling (thousands of times a second if you like (though if there's a bootloader that might not cope))!
 
The Teensy 4.0/4.1 have an additional method, that may be useful depending on what you want to do.

There is a socket on the Teensy 4.0 back row of pins, and the interior row of pins on the Teensy 4.1 just before the micro-SD card. It is next to pin #13 on the Teensy 4.0 and pin #38 on the Teensy 4.1.

If you connect this socket to ground for a given amount of time (default 5 seconds), the Teensy 4.0/4.1 will shut itself off. It will turn itself back on if you release the connection to ground, and then you connect it to ground once again. If you have a battery connected to the RTC (real time clock), it will remember this on/off state even if the Teensy is powered off. If you don't have a battery backed RTC, it will remember the on/off state until the Teensy is powered off.

So, I generally just install a button between that pin and ground, and I hold the button dow until it shuts off. There is a way to change the timeout period.
 
The Teensy 4.0/4.1 have an additional method, that may be useful depending on what you want to do.

There is a socket on the Teensy 4.0 back row of pins, and the interior row of pins on the Teensy 4.1 just before the micro-SD card. It is next to pin #13 on the Teensy 4.0 and pin #38 on the Teensy 4.1.

If you connect this socket to ground for a given amount of time (default 5 seconds), the Teensy 4.0/4.1 will shut itself off. It will turn itself back on if you release the connection to ground, and then you connect it to ground once again. If you have a battery connected to the RTC (real time clock), it will remember this on/off state even if the Teensy is powered off. If you don't have a battery backed RTC, it will remember the on/off state until the Teensy is powered off.

So, I generally just install a button between that pin and ground, and I hold the button dow until it shuts off. There is a way to change the timeout period.

Thanks @MichaelMeissner. There is a photo of the back of the Teensy 4.1 at:

https://www.pjrc.com/store/teensy41.html (just above USB Host)

I see there is a row of pins next to the winbond memory chip but I cannot find a socket next to pin 38. Which socket are you talking about?
 
There is a row of pins by the button on both the T_4.0 and 4.1. That row of pins has the same function and order as labeled for the Teensy 4.0 on the 4.1 - it is just shifted.

One of those pins is labelled as the On/Off pin.
 
Thanks @MichaelMeissner. There is a photo of the back of the Teensy 4.1 at:

https://www.pjrc.com/store/teensy41.html (just above USB Host)

I see there is a row of pins next to the winbond memory chip but I cannot find a socket next to pin 38. Which socket are you talking about?

Defragster answered already, but by socket, I meant the through hole pin slot, next to pin 38 and in front of the micro-SD card reader.

Unfortunately, those pins do not have labeling on the PCB. If you go to the Teensy 4.0 pinout page (https://www.pjrc.com/teensy/pinout.html), on the reverse view of the Teensy 4.0, is the description of the 5 pins at the back. Those 5 pins have the same use in the Teensy 4.1, and are just before the micro-SD card.

I.e. starting with the pin next to pin 38:
  • On/off
  • Program
  • GND (ground)
  • 3.3v
  • Vbat (connect coin cell '+' to Vbat and '-' to GND to keep the RTC powered, and the Teensy on/off pin to remember the state)
 
Status
Not open for further replies.
Back
Top