-
Notifications
You must be signed in to change notification settings - Fork 5
Reset
Frank edited this page Jan 16, 2021
·
7 revisions
All 3.x and 4.x Teensies can do a reset in software:
SCB_AIRCR = 0x05FA0004;
asm volatile ("dsb");
Similar to reset, but starts the bootlader:
asm volatile ("BKPT 254");
The Teensy 4 can be switched off in software, too.
!!Attention!! It switches off immedately, so adding this to setup() is a bad Idea.
SNVS_LPCR |= SNVS_LPCR_TOP; //Switch off now
asm volatile ("dsb");
For using the Power-Pin on the Teensy 4 you can use this library:
https://github.com/TeensyUser/doc/wiki/Teensy-Libraries#teensy-4041-power-button-support
Teensy is a PJRC trademark. Notes here are for reference and will typically refer to the ARM variants unless noted.