User Tools

Site Tools


arm:teensy3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arm:teensy3 [2014/04/16 21:19] – [HID Debug] redoxarm:teensy3 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-# Teensy 3 
-## Overview 
-{{ :arm:teensy3:teensy3.png?direct&200|Teensy3}} I won't get into much details. The official website, [[http://pjrc.com/teensy/|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 
-{{ :arm:teensy3:teensy31.png?direct&200|}} 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 [[http://pjrc.com/teensy/teensy31.html|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 [[http://www.pjrc.com/teensy/td_download.html|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: {{:arm:teensy3:tsy3_blinkled.tar.gz|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 usb\_debug\_only feature on the Teensy2, so I though I would do something like that for the Teensy3. 
- 
-Digging through my sources, I found I didn't separate the HID Debug and the RawHID I had to develop for the project I was working on so... no separate source here (yet, I hope to fix that someday...). 
- 
-### RawHID 
- 
-I needed some USB communication, (basically, I needed to send some data from slave devices through USB, in a portable way) so I went for Raw HID. With Full Speed USB, you can send up to 64bytes at once, no driver needed on the computer side, ... 
- 
-The code provides __usb\_debug__ (through the _hid\_listen_ tool) and __raw\_hid__ (tests with the _rawhid_ tool). It's currently available here: {{:arm:teensy3:tsy3_tsyusb_sept2k14.tar.gz|TsyUSB_Sept2014}} 
- 
-<note important>I found out later that it's not really HID compliant, and then doesn't install correctly on Windows (XP, Vista, Seven). I fixed it in the final project but not in this code. Runs fine under Linux though...</note> 
- 
-## I2C 
-### Master 
- 
-### Slave 
- 
- 
-## ADC 
- 
- 
-## PWM 
- 
- 
-## Links 
- 
-* [[http://www.seanet.com/~karllunt/bareteensy31.html|Bare-metal Teensy 3.x Development]]. Featured on [[http://hackaday.com/|Hackaday]], which reminded me I still hadn't published my own code/experience... 
/home/share/www/redox.ws/wiki/data/attic/arm/teensy3.1397683140.txt.gz · Last modified: 2023/11/24 21:55 (external edit)