|Shopping Cart Download Website|
|You are here: PJRC Store Teensy 32 bit MKL02 T4.x Chip|
Bootloader Chip for DIY Teensy 4.0 & 4.1 Projects
Update, August 12, 2021: We are temporarily pausing sales of this chip, as the current programming can not support code security.
Supported ChipsUpdate, July 7, 2021: PJRC has a small supply of extra IMXRT1062DVJ6B chips. If you need a small number (up to 10 pieces) for prototyping and can't find them, contact us. We may be able to help.
An IMXRT microcontroller and flash memory chip must be paired with this MKL02 to form a working system. No programming or other setup is needed on these other chips. Blank chips sold by distributors are used.
IMXRT1062 chips with extended temperature range are likely to work, but have not been tested.
Winbond flash memory chips with a "Q" at the end of their part number do not work. Only the "M" parts are supported.
Power Up SequenceThe IMXRT1062 chip has special power-up sequence requirements. While PJRC generally recommends following the Teensy 4.0 or Teensy 4.1 schematic, understanding the proper power-up process is important for any design changes you may choose to make while designing your own PCB.
Power Design NotesThe built-in USB voltage regulator operates independently from the rest of the IMXRT power management. It may be powered up first, last, or at any time. USB power may also be removed and reapplied at any time without impacting the rest of the chip.
The SNVS voltage regulator must be powered up before any other on-chip regulators, except the USB regulator which is completely separate. The SNVS (Secure Non-Volatile Storage) system manages the power for the rest of the chip. If power is applied to the other regulators first, the IMXRT may fail to boot.
Before 3.3V power is applied, PMIC_ON_REQ is driven high with only 1.1V. The voltage regulator must be able to recognize 1.1V for proper startup. If a different voltage regulator is used, check its enable voltage threshold. Some chips require 1.5V or higher, which may not reliably start up.
If only 3.3V power is used, a solid state switch or P-channel mosfet should be used instead of the 3.3V regulator. For proper startup, 3.3V power to the IMXRT should be turned on when PMIC_ON_REQ is asserted.
PJRC does not recommend using a resistor-capacitor delay circuit to control DCDC_PSWITCH. This signal is not level sensitive. Simply being high will not enable the switching power supply. A low-to-high transition is required after 3.3V power is stable to cause the buck converted to start up.
Crystal Oscillator GuidelinesThe 24 MHz crystal is required. As with all crystal oscillators, a solid ground plane should be routed on the PCB layer directly underneath the crystal. 2 capacitors and 1 resistor are required. See NXP's Hardware Development Guide for the MIMXRT1050/MIMXRT1060 Applications Processor, Rev.0, 08/2018 for details.
The 32.768 kHz crystal is optional. If not used, the IMXRT will automatically use a low accuracy 32 kHz internal oscillator.
BGA Pinout Diagram
Printable PDF of this pinout diagram.
PCB Design and BGA RoutingBall Grid Array (BGA) routing can feel daunting. Don't be intimidated. For inspiration, here is the PCB layout used for an early 4 layer Teensy 4.0 prototype.
With the smaller 10x10mm BGA chip, where the pins are at 0.65mm pitch, signals and ground/power planes can not route between adjacent vias on other layers (unless using an expensive premium PCB process).
One BGA routing strategy is keep some rows free of vias. This approach allows only about half of all the pins to be used, which is plenty for the Teensy 4.0 design. The no-via rows allow power & ground to connect on the inner layers, and provide space for decoupling capacitors or signal routing on the bottom layer.
With the larger 12x12mm BGA chip, where the pins are at 0.8mm pitch, adjacent vias do allow a signal to route between them on other layers. For a design where more than 60% of the BGA pins must be routed, the larger 0.8mm pitch BGA chip allows use a standard PCB process.
Hardware InitializationIMXRT fuses are initialized the first time the IMXRT1062 and MKL02 chip are used together. Bits 4 and 19 in the HW_OCOTP_CFG5 fuse word are set. Bit 4 allows booting from flash memory. Bit 19 configures IMXRT to communicate using JTAG.
The HW_OCOTP_MAC0 and HW_OCOTP_MAC1 fuses are also set with unique 48 bit Ethernet Mac address. Only a single IMXRT1062 may be initialized.
The first time the Program button is pressed, the top 4K of flash memory is written with a known-good LED blink program. When the program button is pressed for 15 seconds, the rest of the flash chip is erased and this LED blink is copied to the beginning of the flash memory. Because this copy is created on the first non-15-second press, the 15 second press for restore only works if a short press for normal bootloader entry has been done at least once.
Security SettingsThe fuse settings are not locked, as they would be with a production Teensy 4.0 or Teensy 4.1. PJRC does not recommend setting any of the HW_OCOTP_CFG5 fuses. Altering these fuses could permanently "brick" your hardware.
TODO: program to lock fuse settings, to make hardware "unbrickable"
Currently the IMXRT authenication and encryption features are not supported. PJRC hopes to offer support for flash security with a future software update.
Troubleshooting & Diagnostic Blink CodesIf your custom board does not start up, first check the power supply. As described in the power supply startup sequence, the IMXRT internal voltage regulators must start first, then 3.3V power is turned on when PMIC_ON_REQ is driven high.
When the MKL02 chip receives stable 3.3V power, it will activate an internal pullup resistor on the Program signal (pin 10, PTB2). It will also drive DCDC_PSWITCH (connected to pin 3, PTA3) initially low and then high after 3.3V has remained stable for several milliseconds. This behavior on pin 3, PTA3 and the weak pullup in pin 10, PTB2 can confirm if the MKL02 has started properly.
If DCDC_PSWITCH has been driven high, the buck converter should develop 1.15 volts at VDD_SOC_IN. The processor and nearly all digital logic inside the IMXRT depends on proper VDD_SOC_IN power.
Once running, the MKL02 will blink its red LED when error conditions are detected. The blinks appear at 0.6 seconds apart and if the error condition remains, the pattern repeats after a 2 second pause.
Technical Support (Forum)Please understand PJRC can not provide direct technical assistance with custom PCB design.
Diagnosing problems with a brand new PCB design can be tough. If you are stuck, please consider posting a request for help on the public forum. You will need to show some or all of your custom PCB. Historically, many of the PCB designs using the Teensy 3.x bootloader chip were diagnosed on the forum. When those conversations yield valuable insight which may help others, we add links to those forum conversations from this page.
This Initial forum thread is where much of the bootloader chip development was discussed.