The Teensy 3.1 has a 32-bit Freescale MK20DX256VLH7 Cortex-M4 with 256kB of flash. The RAM has quadrupled, as compared to the Tennsy 3.0, from 16K to 64K, and the clock speed is up from 48MHz to 72MHz. It overclocks at 96MHz, and that's the way mine came by default. Memory bandwidth has doubled to 192MB per second. In addition, the 3.3V I/O is now 5V tolerant. The pins that are exclusively analog inputs are not - they are still 3.3V maximum.
There was a change in the color of the board right before we picked up our copy. Why color? It seems the black solder mask has lower resolution than the green mask, and that matters for quality during assembly.
There are 34 digital I/O pins, 21 16-bit analog inputs, and a 12-bit analog output. The Teensy 3.1 also has two independent ADC systems, so two conversions may take place at one time. There are dual I2C, a CAN bus, and 3 serial ports, two with FIFO buffers. Because the board is small, there are pads on the bottom for many of the I/O pins. You should add a capacitor to the bottom (there are pads) if you are going to run the USB as a host "OTG" port.
There are accessory boards available, one of which has a Transflash socket and pads for a Wiznet WIZ820io ehternet module. They can be assembled to plug in, or can be soldered onto the Teensy 3.1 from above.
To give you an idea of the speed, we did a test of the performance of the digitalWrite() function when toggling a port bit repeatedly to make the fastest square wave we could. The time to toggle from low to high on an Arduino Uno is just over 5uS. On the Teensy 3.1, the same action takes 330nS, which is faster than just the increased clock speed would suggest. Another interesting number is the time spent by Arduino to "recycle" the loop(). The Uno takes 1uS, but the Teensy 3.1 takes only 90nS. Both values are 11 to 12 times faster on the Teensy, but the clock is only 4.5 times faster. Crank the clock from 96MHz up to 144MHz and the numbers get even better. Power consumption when overclocked at 144MHz is higher at 51.5mA in the benchmark.
That is helped by the ARM compiler which can optimize what would be a read-modify-write process on another CPU into a single machine instruction. So it isn't just the clock that is fast - software is more efficient on the Teensy 3.1, too.
Until you see it in person, you don't get the horsepower to weight ratio of this thing. It is only 0.1" longer than the Arduino Pro Mini, even with on-board USB. The USB port, which also supports USB On-the-Go, is controlled by an ARM Cortex M0. If you ratchet the CPU by overclocking, it recovers at boot time because the Cortex M0 is controlling the larger M4 during bootloading.
With the latest Teensyduino 1.25-beta2 code the clock speed may be exposed in the boards.txt file. Overclocking options are 96MHz, 120MHz, 144MHz, and 168MHz. 96MHz is the highest default option, but uncommenting some lines will get the above speeds up on the menu, so you can just select the one you want. Mine won't run more than one or two seconds at 168MHz, but it runs like a racehorse at 144MHz. Completely stable, based on running benchmark code for days. Temperature rise is just under 20°F at 144MHz running the benchmark code.
If you need to do some computation, or to move some data around quickly, the Teensy 3.1 might be worth a look. It is 2/3 the cost of an Arduino Uno, and can have up to 10 times the speed, 32 times the RAM, and is only 1/6th the size.
|PJRC Teensy 3.1|
|Test Current Draw||18.7mA@3.7V|
The Teensy 3.1 has been replaced by the Teensy 3.2, which is functionally identical, but has some changes in the USB section, specifically, the Nuvoton MINI54 chip has been replaced by a Freescale part. All code and I/O should work without modification.