On/Off delay for Teensy-4.1

Ee Meng

New member
Hi,

According to the Teensy-4.1 documentation, holding the On/Off button for 4 seconds when powered turns off power, and pressing for 0.5 seconds while power is off turns the 3.3V power back on and reboots the processor.
Is it possible to increase the time delay for powering on the Teensy-4.1?

Thanks
 
I believe 0.5 seconds is the maximum. Look at the ON_TIME field in SNVS_LPCR register in the reference manual on page 1248. But there is also a DEBOUNCE option on page 1249. I don't know if that has an effect of lengthening the time, but it might be worth a try.
 
Hi,

Thanks for the help! I've been looking through the forums, and there is a 3rd party library for setting on/off delays: https://github.com/FrankBoesing/T4_PowerButton/tree/master.
I've not written any code which work with registers before, but based on what was documented, is writing to the SNVS_LPCR variable changes the value of the SNVS_LPCR register in the RT1060 processor?
Code:
int on_time = 0; //500ms turn on time (NVS_LPCR ON_TIME)
SNVS_LPCR = (SNVS_LPCR & ~(3 << 20)) | (on_time << 20); //Write to ON_TIME registers (21-20)
 
Back
Top