🛠 Pousser la carte : overclocking 912 MHz, gestion d'alimentation, sécurité et récupération
Objectives
The maturity tutorial: overclock cleanly, size the power supply, use the VBAT battery and the On/Off pin, and know how to recover a seemingly lost board — keeping in mind the absence of a hardware reset.
Overclocking: what is official, what is not
- Nominal frequency: 600 MHz; officially supported overclocking: 912 MHz (PJRC technical table).
- Community tests ("Overclocking the Teensy 4.x — Ultimate Thread"): 720/816/912/960/1008 MHz, with a
YES_COOLINGsafeguard beyond 912 MHz — "Overclocking where COOLING IS REQUIRED". Active cooling (heatsink + fan) is essential. - The "1012 MHz" figure sometimes cited: >
- Core voltage generated by the embedded buck converter: 1.25 V at 600 MHz, 1.15 V at ≤528 MHz, 0.95 V at 24 MHz, adjustable in 50 mV steps.
- Typical consumption: "approximately 100 mA" at 600 MHz under 5 V (product page) — plan for ample headroom with overclock + LED + audio.
Complete code
// Overclock officiel max + reset logiciel (aucune broche reset !).
void setup {
Serial.begin(9600);
set_arm_clock(912000000); // 912 MHz : max OFFICIEL — refroidir !
Serial.printf("ARM = %u MHz\n",
(unsigned)(F_CPU_ACTUAL / 1000000UL));
}
void loop {
if (Serial.available && Serial.read == 'r') {
Serial.println("reinitialisation...");
delay(10);
SCB_AIRCR = 0x05FA0004; // SYSRESETREQ : le seul reset possible
} // (pas de broche reset sur Teensy 4.0)
}
Power supply and battery
- CR2032 battery on VBAT: maintains the RTC (embedded 32.768 kHz crystal — unlike the Teensy 3.2, nothing to solder) and the 16 bytes of RTC RAM (LPGPR0-3 registers).
- On/Off pin: 4 s hold = cuts the 3.3 V rail; 0.5 s = restart; the state is retained by the VBAT battery.
- VIN and VUSB are connected: injecting 5 V onto VIN while micro-USB is plugged in backfeeds into the PC — cut the separation pads on the back. On boards from before August 2022, erratic startup occurs if VUSB-VIN < 4.1 V (R4 changed to 470 K afterwards).
- Powering via 3.3 V: not supported without hardware modification; the 3.3 V pin is an output (250 mA max).
Safety and recovery
- The bootloader lives in a separate chip: uploading cannot destroy it — a board "that blinks" is recoverable.
- Hold the Program button for 13 to 17 s: erases ALL non-volatile memory (program + emulated EEPROM) and restores the backup LED-blink program.
- Lockable variant: configurable fuses, permanent secure mode, JTAG disabled, encrypted firmware EHEX, bus encryption engine; the CAU hardware accelerator has "currently no library support", true random generation goes through the Entropy library.
- No hardware reset: in production, arm a watchdog (3 hardware watchdogs, 49 timers in total) rather than relying on physical intervention.
Expected verification
The Monitor displays "ARM = 912 MHz"; the internal temperature sensor (tutorial 3) shows thermal drift before/after fan activation. The 'r' command triggers serial port re-enumeration: software reset works. Remove USB for 10 minutes: the RTC keeps time thanks to VBAT. Test recovery on a test board: 13-17 s erase → the LED starts blinking (backup program) → a simple upload brings the board back to life.
Common errors
- Overclocking to 912+ without cooling in a closed case: random instability, corruptions — the community explicitly requires it beyond 912 MHz.
- Believing the "1012 MHz" from the internet: stick to the official 912 MHz (1008 MHz tested by community, assumed liability). >
- Panicking over a "dead" board: first check the USB cable, then the Program button (weak red LED = bootloader alive).
- Losing the EEPROM by doing a 13-17 s erase "just to see": it's the nuclear option, label your test boards.
- Relying on a reset button that doesn't exist: integrate watchdog + state saving on EEPROM/RTC RAM from the first embedded prototype.
- Neglecting core voltage when underclocking: at 24 MHz the core drops to 0.95 V — manual voltage adjustments (50 mV steps) are tested with a multimeter, not by guesswork.
Other tutorials for this board
- Premiers pas sur le Teensy 4.0 : Teensyduino, Loader et premier Blink
- GPIO et PWM sous 3,3 V : les règles d'or du Teensy 4.0
- Entrées analogiques et capteur de température interne : le ADC et ses limites
- Piloter un ruban WS2812 sans bloquer le CPU : WS2812Serial et OctoWS2811
- Contrôleur MIDI USB : un potard qui joue du piano (MIDIx4/MIDIx16)
- Comprendre la mémoire : 2 Mo de flash, 1 Mo de RAM TCM/DMA, EEPROM émulée et LittleFS
Code examples for this board
clignotante.inoArduinotouche-capacitive.inoArduinoanalogique-12-bits.inoArduinomidi-piano.inoArduinopwm-respiration.inoArduinoservo-angle.inoArduino