Graduating from the Teensy 3.1

For the last year or so, I’ve been using a Teensy 3.1 from PJRC to power one of my projects. I quickly graduated from using the Teensyduino to using pure C. It has been, by far, my deepest dive into the world of ARM MCUs - and we’re about to go deeper!

Teensy 3.1

The Teensy

I chose the Teensy 3.1 because I needed a cheap, easy to use, yet capable, MCU dev board that I could rapidly prototype with but also as a reference design if I ever dreamt to go to production. It’s powered by an ARM Cortex-M4 (MK20DX256VLH7) spec’d at 72 MHz with USB OTG. At a little under $20 - it was a no brainier!

Now that I’ve a prototype ready, it’s time to clone the Teensy!

Kinetis K22 (120 MHz)

I didn’t want to deviate too much from the Teensy but I wanted to minimize cost while maximizing the specs I cared about. To my surprise, I found a chip (MK22FN512VLH12) that’s a bit cheaper yet spec’d at almost twice the speed and memory. Hardware and software wise, it’s almost a drop-in replacement!

IC Package

ARM chips are not known to be maker friendly. Virtually none of them are available in through hole packages. For an ARM chip of this caliber, QFP is as friendly as they come :(

The chip of choice comes in a 64 pin LQFP with 0.5mm pitch which means you have around 0.3mm to 0.2mm clearance between the pins. In other words, soldering fun!

PCB Design

Because of the existence of high speed signals, we can’t use a simple breakout board. Some components (crystal, bypass caps, etc) must be as close to the IC as possible. To avoid complexity we’ll be ignore a few special pins (USB, analog, etc).

Flashing

The Teensy uses a second, smaller, MCU (Mini54) to handle the flashing and bootloading over the EzPort interface. EzPort is a SPI compatible interface for reading/writing the IC’s memories. We’ll need to come up with our own programmer. Sounds like an Arduino project!

Bootstrapping

The Teensy comes from the K20 family. It’s pretty close to the K22 so hopefully the bootstrapping is pretty similar. The memory sizes are a bit different, so we’ll have fun with the linker script. Also probably some fun with the clock registers.

published on in projects/Bitsy
comments powered by Disqus