User Tools

Site Tools


arm:teensy3

This is an old revision of the document!


# Teensy 3 ## Overview Teensy3 I won't get into much details. The official website, PJRC.com, does its job really well.

I already had experience with the Teensy2, but I needed more power, better ADC, … for a larger project (work, can't tell much more sorry)°. Before going for the Teensy3, I reviewed different ARM breakout boards, but I didn't need any special features or a large board.

### Teensy3.1 Shortly after I worked with the Teensy 3, PJRC released a new version, Teensy 3.1

No more black PCB, but gold plated finish instead of tin plated. You can't have everything, right ?! It's basically a simple CPU upgrade, but you can find more details on this page.

## Tools

### Arduino vs C Well, the only thing that was not really cool (for me) with the Teensy3 was there was no toolchain, no libraries, no tutorial whatsoever for one to start coding.

Paul, from PJRC, has made a really great work to make the Teensy3 fully Arduino-compatible, but that was not what I was looking for. I wanted to code in pure, bare-metal C, with a GNU/Linux environment. I took me a while to understand the datasheet (1200+ pages of fun !, the Arduino libraries, … and have my code running on the Teensy3.

### Toolchain

Just a quick note, it's really easy. I'm working with GNU/Linux environments, my main workstation is currently running an Archlinux x64. To start developping for ARM you need only two packages, which are in the _community_ repository, so it's just:

  sudo pacman -S arm-none-eabi-gcc arm-none-eabi-binutils

That's all folks, you're good to go ;)

On others distros, it should be something really close =)

### Teensy Loader CLI

Once again, Paul made a great USB bootloader. It's even better than the one on the Teensy2, since it's harder to brick; actually, there's a second µC on the board, that load the bootloader in RAM when you press the Reset button on the Teensy.

You need the teensyloadercli software, but, obviously, updated for the Teensy3. It can be found in the Teensyduino package). Usage is then really simple:

* Start the application with the correct arguments. Like ` ./teensyloadercli -mmcu=mk20dx128 -w -v YOUR_HEX.hex` * Press the onboard button * Wait until completion * Done !

## LED Blink Or, as it's often called, the _Hello World_ for µC

Nothing fancy, it just blinks the onboard LED on the Teensy3. The source is here: Tsy3_BlinkLED

Compile with `make` then program with `make program` (you need the teensyloadercli software in the source folder, I moved it system-wide later I think…). Press the button on your board, it should be flashed and then reboot. The LED blinks ! =D

## USB ### HID Debug It should work with the hid\_listen software from PRJC…

Well, blinking a LED is really cool (I _love_ LEDs)° but the Teensy3 is a bit too-much for doing just that. Moving on to USB, I really liked the hid_debug_only feature on the Teensy2, so I though I would do something like that for the Teensy3.

### RawHID

## I2C ### Master

### Slave

## ADC

## PWM

## Links

* Bare-metal Teensy 3.x Development. Featured on Hackaday, which reminded me I still hadn't published my own code/experience…

/home/share/www/redox.ws/wiki/data/attic/arm/teensy3.1397680853.txt.gz · Last modified: 2023/11/24 21:55 (external edit)