How to reset Teensy 4.0?

Status
Not open for further replies.

roach374

Member
I have the following code in a library for resetting Teensy 3.x.
Code:
#ifdef CORE_TEENSY
// Software reset macros / MMap for Cortex M3-based boards (possibly others?)
// see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/Cihcbadd.html#Cihehdge , under "Application Interrupt and Reset Control Register"
#define CPU_RESTART_VAL 0x5FA0004                                              // write this magic number...
#define CPU_RESTART_ADDR 0xE000ED0C                                            // to this memory location...
#define CPU_RESTART (*(volatile uint32_t *)CPU_RESTART_ADDR) = CPU_RESTART_VAL // presto!
#endif

Can someone tell me if it will also work for Teensy 4.0 / M7?

EDIT: Equivalent M7 functionality appears to be outlined here. If I'm reading that right, the same values for CPU_RESTART_VAL and CPU_RESTART_ADDR should work on M7 the way they do on M3.
 
Status
Not open for further replies.
Back
Top