hi there,
long story short im looking how to make my own pcb using the arm cortex m4 chip that the teensy 3(.1) uses.
im fairly new to this pipeline, so i have some noob questions,
1. do i need to burn a bootloader onto the chip? if so how do i go about this? i read something about teensy running halfkey. if i was to just buy the cotex chip itself, how would i get this bootloader on it?
2. if its not quite realistic to get the bootloader on the chip, would it be plausible to desolder the chip from a teensy development board, and then resolder the chip to my own pcb?
3. what are the dangers of this concerning power? at times i will be plugged in to a USB and other times running off a 3.7v (4v max) battery. what concerns should i have and what resistors would i need?
thanks for any input.
making custom teensy 3 pcb
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
Re: making custom teensy 3 pcb
You should ask over here http://www.pjrc.com/ They make the Teensy.
- paulstoffregen
- Posts: 444
- Joined: Sun Oct 11, 2009 11:23 am
Re: making custom teensy 3 pcb
You buy this chip which has the bootloader.pts wrote: 1. do i need to burn a bootloader onto the chip? if so how do i go about this? i read something about teensy running halfkey. if i was to just buy the cotex chip itself, how would i get this bootloader on it?
http://www.pjrc.com/store/ic_mini54_tqfp.html
You can use a blank MK20 chip with this.
- pts
- Posts: 63
- Joined: Tue Mar 26, 2013 3:55 pm
Re: making custom teensy 3 pcb
that link is exactly what im looking for! thank you for the enlightening!
can you inform me why/how i need the blank mk20?
can you inform me why/how i need the blank mk20?
- pts
- Posts: 63
- Joined: Tue Mar 26, 2013 3:55 pm
Re: making custom teensy 3 pcb
From other posts it looks like the mk20 is used for the flash memory ? Is this correct ? If so are there another compatible options that are a tad physically smaller? My sketch doesn't need quite that much memory and needs to fit in a tight area
- cmagagna
- Posts: 8
- Joined: Sat Sep 21, 2013 11:37 pm
Re: making custom teensy 3 pcb
If you don't need all the I/O pins there's a 48-pin version of the MK20 that comes in various Flash & RAM memory sizes. Digikey shows 6 options but only the MK20DX128VLF5 is in stock; Mouser shows 12 versions with 5 in stock. You should verify with Paul Stoffregen that the Mini54 / Teensyduino will work with these chips; I've never tried.
Good luck!
Good luck!
- paulstoffregen
- Posts: 444
- Joined: Sun Oct 11, 2009 11:23 am
Re: making custom teensy 3 pcb
Only 2 chips are confirmed to work with the Mini54. They are MK20DX128VLH5 and MK20DX256VLH7 (64 pin LQPF packages). PJRC has never checked whether the Mini54 works any other versions of these chips. As far as I know, nobody else has tried this either. If you do, I hope you'll post a followup to let others know if it works or doesn't work.
The Mini54 chip will automatically detect which chip you've used and implement Teensy 3.0 or 3.1. I can tell you this detection is done by reading the registers that describe the memory size. It does not read the more specific device ID register that identifies the package/pinout, so there is at least a reasonable chance it might work on similar chips.
But if it doesn't happen to work with a different chip, you'll pretty much have to just scrap your PCB and try again. I'd recommend using MK20DX128VLH5 or MK20DX256VLH7.
The Mini54 chip will automatically detect which chip you've used and implement Teensy 3.0 or 3.1. I can tell you this detection is done by reading the registers that describe the memory size. It does not read the more specific device ID register that identifies the package/pinout, so there is at least a reasonable chance it might work on similar chips.
But if it doesn't happen to work with a different chip, you'll pretty much have to just scrap your PCB and try again. I'd recommend using MK20DX128VLH5 or MK20DX256VLH7.
Last edited by paulstoffregen on Tue Jan 21, 2014 8:03 am, edited 1 time in total.
- paulstoffregen
- Posts: 444
- Joined: Sun Oct 11, 2009 11:23 am
Re: making custom teensy 3 pcb
The MK20 chip is the main processor you're programming. Your sketch from Arduino actually runs on the MK20 chip. It has the fast ARM processor, flash, RAM, USB, serial ports, I2C, SPI, timers, and everything else. While your sketch is running, the Mini54 sits there doing pretty nothing, other than waiting waiting for the moment you want to upload a new sketch.pts wrote:From other posts it looks like the mk20 is used for the flash memory ? Is this correct ?
The MK20 lacks a hardware bootloader feature similar to the Atmel AVR chips used on most Arduino products. When I first learned about these chips, almost 4 years ago (before they were actually selling), I knew they would be awesome for running Arduino sketches. They're so fast and they have all the stuff you normally use in Arduino, plus so much more. But the one thing they lack is the bootloader functionality that is the foundation of Arduino compatibility.
To solve that seemingly impossible limitation, I came up with a hack where the Mini54 takes control of the MK20 when it's time to upload a sketch. Conceptually it's pretty simple, the Mini54 just controls the MK20 and emulates the missing hardware bootloader functionality. That lets it work very nicely with Arduino. A lot of very difficult optimization went into making the upload go fast, since these chips have a lot of flash memory (just try uploading 256K of data to an Arduino Mega or Due to see the difference), but the concept is pretty simple. The Mini54 just adds the bootloader capability. It's not unlike how the ATmega328 chip lacks USB, so the 16u2 chip on Arduino Uno adds that missing feature.
Two really nice little extra features you get with the Mini54 are complete access to the entire MK20 chip and rapid startup. Normally a bootloader consumes part of the chip's memory. Usually it's a small part, but still a piece you can't use. The Mini54 lets you use the entire MK20 chip. Many bootloaders have to delay the board's startup. It's only a few seconds on modern Arduino boards, but it's still a pretty noticeable delay from when you apply power until you own code actually runs. Since MK20 chip is entirely dedicated to your own sketch, it starts running your code as quickly as possible, limited only by the MK20's own reset sequence which is very fast.
Whew, this message turned out longer than I'd planned, but hopefully this gives you a solid idea of what the Mini54 does and why it's needed to make these MK20 chips work so well with Arduino.
- westfw
- Posts: 2008
- Joined: Fri Apr 27, 2007 1:01 pm
Re: making custom teensy 3 pcb
So the mini54 isn't connected to USB at all?
It just senses reset, loads a bootloader into the MK20 RAM and runs it (from RAM) (using JTAG?) (Um, neat. I think. What's freescale thinking, not providing any bootloader-like functionality?)
It just senses reset, loads a bootloader into the MK20 RAM and runs it (from RAM) (using JTAG?) (Um, neat. I think. What's freescale thinking, not providing any bootloader-like functionality?)
- paulstoffregen
- Posts: 444
- Joined: Sun Oct 11, 2009 11:23 am
- cstratton
- Posts: 294
- Joined: Wed Sep 29, 2010 3:52 pm
Re: making custom teensy 3 pcb
They probably expect people to use SWD, which is more or less the standard for working with ARM Cortex MCUs.westfw wrote:What's freescale thinking, not providing any bootloader-like functionality?
That said, factory serial or USB bootloaders are nice for devices where end users might occasionally change the program, without wanting to have even a <$10 SWD adapter on hand.
Please be positive and constructive with your questions and comments.