PDA

View Full Version : Coming Soon: Teensy-LC (low cost Teensy)



Pages : [1] 2 3

Paul
01-26-2015, 10:56 PM
Teensy-LC (low cost) is coming in about 1 month (edit: Release is scheduled for March 10th), featuring a 32 bit Cortex-M0+ processor at 48 MHz, 62K flash, 8K RAM, and a rich hardware peripheral set.... at a retail price of $11.65 (usd).

High-res Photo:
3643
(click for full size)

First Prototype:
3391

As a special thanks to very active forum contributors and library authors, we're making an early, hand-soldered pre-production run. PJRC will send free Teensy-LC prototypes to these people:


cartere, christoph, Constantin, duff, el_supremo, embedded-creations, Experimentalist, Frank B, GremlinWrangler, Headroom, JBeale, jimmayhugh, johnnyfp, Jp3141, kriegsman, KurtE, linuxgeek, manitou, MichaelMeissner, MickMad, mortonkopf, mortonkopf, MuShoo, mxxx, Nantonos, nlecaude, nox771, onehorse, Pedvide, Pensive, pictographer, potatotron, robsoles, stevech, sumotoy, syso2342, teachop, tlb, turtle9er, whollender, WMXZ, Wozzy, xxxajk


We'll start with 9 purple prototypes, next week, and the rest with green prototypes in about 2 weeks. I'd like to invite everyone on this list to reply with something like "I have time to beta test now, please send me one of those first 9 boards", and if outside the USA, "I can pay the extra fees+duty UPS charges when delivering the package". Otherwise, we'll send you a green prototype in a couple weeks... still well before the regular production boards go on sale.

Over the last several weeks, many small hints have been dropped. Now, finally, here's detailed technical information:

Edit: An official Teensy-LC web page (http://www.pjrc.com/teensy/teensyLC.html) is now available, as well as a pre-order (http://www.pjrc.com/store/teensylc.html) product page.

Teensy-LC is based on Freescale part MKL26Z64. It has 64K of flash (2K is reserved for emulating 128 bytes EEPROM) and 8K of RAM. A total of 27 digital I/O pins are available, 4 with 20 mA drive capability, the rest with 5mA output. Most pins have interrupts.

There are 13 analog inputs, 8 PWM outputs, and one 12 bit DAC output.

Plenty of serial communication ports are available. There are 3 hardware serial ports, 2 SPI ports and 2 I2C ports. Of course, Teensy-LC has DMA-based hardware USB, for very efficient USB communication that can support all the same USB options as Teensy 3.1.

A 5V output buffer is provided for pin 17, to output a 5V logic signal useful for driving WS2812/NeoPixel LED strips.

The goal behind Teensy-LC is to give you as many features, enough memory for Arduino compatibility, and as much performance as possible, at a great price. But some features of Teensy 3.1 simply aren't available at this lower price point. The I/O pins are not 5V tolerant. The maximum speed is only 48 MHz, and the Cortex-M0+ omits M4's special math instructions. CAN bus is not available. Teensy-LC has only 4 lightweight DMA channels, rather than 16 fully featured channels. Serial1 & Serial2 have only standard buffers, not FIFOs. A total of 7 hardware timers are available, enough for excellent Arduino compatibility, but fewer than the 12 in Teensy 3.1.

Teensy-LC is designed to be pin-compatible with Teensy 3.0 and 3.1. This table shows which pins have which features:



Pin Analog PWM Serial SPI I2C INT Touch Out Drive
--- ------ --- ------ --- --- --- ----- ---------
0 RX1 MOSI1 Touch 5mA
1 TX1 MISO1 Touch 5mA
2 CS0 INT2 5mA
3 PWM INT3 Touch 5mA (driven high during upload)
4 PWM INT4 Touch 5mA
5 INT5 20mA
6 PWM CS1 INT6 5mA
7 RX3 INT7 5mA
8 TX3 INT8 5mA
9 PWM RX2 INT9 5mA
10 PWM TX2 CS0 INT10 5mA
11 MOSI0 INT11 5mA
12 MISO0 INT12 5mA
13 SCK0 INT13 5mA
14 A0 INT14 5mA
15 A1 INT15 Touch 5mA
16 A2 PWM Touch 20mA
17 A3 PWM Touch 20mA + 5V:8mA
18 A4 SDA0 Touch 5mA
19 A5 SCL0 Touch 5mA
20 A6 PWM SCK1 INT20 5mA
21 A7 INT21 20mA
22 A8 PWM SCL1 INT22 Touch 5mA
23 A9 PWM SDA1 INT23 Touch 5mA
24 A10 5mA
25 A11 5mA
26 A12/DAC 5mA

onehorse
01-26-2015, 11:06 PM
Wonderful!

I have time to beta test now, please send me one of those first 9 boards!

Probably too late but here I am anyway!

Yay, two SPI ports!

What are the double row of pins between pin 20 and 3V3? Oh pins 21-26, of course!

And what are the pins at the non-USB end, still DAC/PROGRAM/GND/3V3/VBAT?

And no pin pads on the bottom?

PaulStoffregen
01-27-2015, 12:08 AM
And what are the pins at the non-USB end, still DAC/PROGRAM/GND/3V3/VBAT?


DAC - Program - GND - 3.3V - pin 17 5volt output

VBAT changed to the WS2812/Neopixel output.



And no pin pads on the bottom?

Correct, no bottom side pads.

duff
01-27-2015, 12:18 AM
cool, sign me up! This will perfect fo my SDI-12 sensor controller! Is there a reference manual on your site yet?

Constantin
01-27-2015, 12:47 AM
Hey that is so awesome. Look forward to harassing the latest baby in the Teensy family. :D

Keep warm everyone in the NE, we may get as much as 3' of snow tonight! Wind is blowing pretty good already. All batteries charged!

Ristola
01-27-2015, 12:52 AM
Great News !
I may not be on the list, but I can't wait to get my hands on a few :)

stevech
01-27-2015, 01:04 AM
Count me in. Perhaps first try RadioHead. Should work, as RH squeezes into a mega328 with ease (in terms of RAM). I can have the Teensy-LC w/RH talk to other RH boards I have running: Mega328, Teensy 3, and some M4s using CMSIS/HAL with RH.

No FIFO on UARTs. Is there DMA for UART transmit?

potatotron
01-27-2015, 01:32 AM
Thanks! I was actually going to PM you (Paul) today to ask about availability -- I have an upcoming project that I can begin testing with immediately.

I apologize if this has already been discussed, but there's no built in RTC so you'd need something like a DS3231?

Looking forward to testing the new boards.

MichaelMeissner
01-27-2015, 02:48 AM
I can wait for others with a more pressing need than me to get the early boards. Thanks by the way. I hope I have unpacked my soldering station by then (I had to pack up the soldering station when we set up the Christmas tree, on orders of SWMBO [she who must be obeyed]).

I assume that the pin 17 output on the back will put out VIN and not 5v, so if I power the normal VIN with with a Lipo battery, it will be 3.7v (i.e. it is a MOSFET or equivalent, and not a 3.3->5v boost circuit).

GremlinWrangler
01-27-2015, 04:22 AM
Hey thanks!

On 8 weeks leave with intention on getting into some meaty projects, so happy to work on the bleeding edge. Do note my code Fu isn't what I'd like it to be so when prioritising your shipments stick me in the 'happy to legwork through existing libraries' group rather than 'can spin code from the raw aether' class.

Edit, happy to pay postage seeing as it's coming most of the way round the world to >40C country. I assume I can make an ordinary order and have it packed in with that?

GW

pictographer
01-27-2015, 04:41 AM
Thanks! I'm delighted. I'd be able to do light testing on touch sensing, the DAC, and the audio library. I would put myself low on the priority list because I'm not the author of any of the major hardware-oriented libraries. I could also do proof-reading if there's any documentation that needs it.

nox771
01-27-2015, 05:07 AM
Also thanks! I can do some testing, but I'd rather have the green board in a couple weeks - currently in the middle of moving.

Frank B
01-27-2015, 07:39 AM
Hi Paul,

thank you, great.

But I'll wait for a green board.
UPS to Germany is $73, and Airmail takes several weeks, so its better give the first prototypes to other recipients.

Regards,
Frank.

christoph
01-27-2015, 08:17 AM
Thank you, but I second that - give the boards to those who can deliver feedback faster and cheaper. I'm looking forward to the green one.

Regards

Christoph

manitou
01-27-2015, 09:00 AM
I have time to beta test now, please send me one of those first 9 boards.

I'll do my usual broad but not deep tests that I do for "comparative anatomy" of various MCUs

Pedvide
01-27-2015, 09:13 AM
Thank you Paul,

I don't have that much time to be a beta tester, but I'll make sure the ADC library works as soon as I get the green prototype.

MuShoo
01-27-2015, 09:34 AM
Thanks, Paul! Never actually expected to be one of those 'top contributors!'

If there's still any available, I should have time to beta test now. I'll probably do some MIDI tests (especially to see how difficult it'll be to get it running my 3x-ports HID descriptor setup), and perhaps using it as a brain for a bluetooth-based lighting control system I've been mulling over. If not, I can most certainly wait for a green board.

WMXZ
01-27-2015, 10:51 AM
Hi Paul,

thank you, great.

But I'll wait for a green board.
UPS to Germany is $73, and Airmail takes several weeks, so its better give the first prototypes to other recipients.

Regards,
Frank.

Idem,
shipping to Italy is even worse than to Germany. So give first prototypes to people who actually build something in the past and are within shipping days and not shipping months.

Maybe, all experienced users could check the specs and share with us ideas that may be useful for the Teensy-LC. I have first to spin-up my gray cells.

jimmayhugh
01-27-2015, 11:04 AM
Cool! I'm willing to wait for the later prototypes. Thanks Paul, for all of your work.

manitou
01-27-2015, 11:24 AM
cool, sign me up! This will perfect fo my SDI-12 sensor controller! Is there a reference manual on your site yet?

data sheet and ref manual (i presume)
http://cache.freescale.com/files/microcontrollers/doc/data_sheet/KL26P64M48SF5.pdf?fasp=1

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fasp=1


teensy3/core work in progress at https://github.com/PaulStoffregen/cores/tree/master/teensy3
__MKL26Z64__
KINETISL

macaba
01-27-2015, 11:26 AM
This is superb (2 SPI ports!). Thanks Paul.

christoph
01-27-2015, 12:32 PM
Yes, and DMA, so I'll have to think about how to support two SPIs in that library without duplicating lots of code.

PaulStoffregen
01-27-2015, 01:01 PM
Looks like there might be more than 9 requests for the first 9 boards. If that happens, Robin & I will use some highly arbitrary (and probably unfair) process to decide who gets the first 9 boards. Please bear with us and understand we're doing everything we can. The rest of the boards will be here fairly soon.

Now, let's see if I can get all the questions answered quickly.....



No FIFO on UARTs. Is there DMA for UART transmit?

Yes, there's DMA, but I'm not planning a DMA-based UART driver.

If anyone contributes such a thing, I'll probably merge it into the code. Odds are strong such code would be disabled by default, so editing a #define would be needed.

Edit: I should also mention, if you're doing high baud rate serial communication and also stuff concurrently, odds are good you'd want the extra RAM and much faster CPU of Teensy 3.1 anyway!



but there's no built in RTC so you'd need something like a DS3231?


TL;DR = correct, there's no RTC. You'd need an external RTC chip.

If you read the chip's reference manual, or perhaps overly-optimistic marketing literature from Freescale, you'll see a RTC is mentioned. But there's no separate oscillator or dedicated power domain, so it's pretty much worthless. As a general rule, PJRC tries very hard to promote realistic expectations, so we won't be mentioning the RTC.




I assume that the pin 17 output on the back will put out VIN and not 5v, so if I power the normal VIN with with a Lipo battery, it will be 3.7v (i.e. it is a MOSFET or equivalent, and not a 3.3->5v boost circuit).

Correct, the buffer is powered by VIN, so the output high voltage will be whatever your VIN voltage is. There's no boost converter.



UPS to Germany is $73, and Airmail takes several weeks, so its better give the first prototypes to other recipients.


PJRC will pay for UPS shipping if you want one of those 9 boards. But you'll have to pay any extra fees UPS charges when the package arrives. Sometimes those extra fees can be substantial.

Frank, you've done so much great work. I'm happy to pay for the UPS shipping if you want one of those first 9 boards. If you want one, don't be shy!

Nantonos
01-27-2015, 01:09 PM
I'm thrilled to be listed, and excited by the feature set at such a low price point.

Priority for the first 9 should go to others who are closer geographically so that the lead time isn't burned up by transatlantic shipping. Besides living in France, I will be in Australia on business from 4 to 16 Feb. So it makes more sense to put me in the second batch.

cartere
01-27-2015, 01:37 PM
Thanks Paul, humbling to be included in such a list, I can wait for the production run.

Nantonos
01-27-2015, 02:33 PM
Pin 2 and pin 10 are both CS0?

nlecaude
01-27-2015, 02:54 PM
Wow thanks, that's really nice !
I can wait for the green board too. No problem paying shipping to Canada too.
:)

Nantonos
01-27-2015, 03:04 PM
I took the pins info Paul posted earlier, and the low resolution board image, and made a quick, rough draft of the usual pinout card (based on the teensy 3.1 card). Zipped Scribus source and PDF attached. Its very rough but may be helpful.
3395
3396

potatotron
01-27-2015, 03:29 PM
Looks like there might be more than 9 requests for the first 9 boards.

I can wait until the next round if there's a queue.

Frank B
01-27-2015, 03:41 PM
give the boards to those who can deliver feedback faster and cheaper. I'm looking forward to the green one.
Christoph,
Maybe we can organize a bulk order, and thereby save on postage (for the green ones)

Vielleicht können wir ja eine Sammelbestellung organisieren um zu Porto sparen.
Gibt es ja noch mehr User aus Deutschland ?

christoph
01-27-2015, 03:48 PM
Frank, we can do that. I don't know who else from the tester list is from germany, though.

linuxgeek
01-27-2015, 03:49 PM
Looking forward to a green one. Purple is better reserved for others who can provide more feedback in the near term. Thanks!

Cosford
01-27-2015, 04:05 PM
Awesome stuff. I'd been intending to make our prototype run of our product in development using 3.1's but these should do the trick perfectly and save a fair chunk of the development budget. =) Looking forward to the full release.

mortonkopf
01-27-2015, 04:27 PM
Paul, Robin, very nice thought. glad to see this was based on posting quantity not quality ;) otherwise, well…

please exclude me from early testing, as I'm in London.
I would love to get a greeny hooked up to explore the scope of the 5v data logic pin 17, along with bluetooth and wifi connectivity.

all the best
m

whollender
01-27-2015, 04:29 PM
Thanks for including me on the list!

My current priority is laying out the audio boards, so I definitely won't have a chance to look at one of the early 9 as quickly as some of the others on the list.

mortonkopf
01-27-2015, 04:36 PM
Question, will the Media Access Control (MAC) address be burnt in. It is a really great feature.

I believe that this is related to the use of K20 with M4 so not on the M0?, but really, I have no idea about these things.

el_supremo
01-27-2015, 04:38 PM
Thanks for putting me on the list. I wouldn't be able to do justice to the testing if I were one-of-9, so I'm content to wait for a green one.

Pete

Nantonos
01-27-2015, 05:04 PM
As this is a 48MHz chip, will it be run at 48MHz or (like the 48Mhz Teensy 3.0) at 96 Mhz? What will F_Bus be at the normal speed?

Will be interesting to see how the T3-LC does with MIDI-DIN and MIDI-USB stuff.

I assume that the lack of M4 DSP and Math instructions mean the Audio Library will not work?

With two SPI buses, I wonder if one can be an SPI master (to talk to some sensor that makes a lot of data) whilre the other is an SPI slave (to send some processed, filtered, or otherwise down-sized derived data on to a Teensy 3.1 which is SPI master)?

Constantin
01-27-2015, 05:30 PM
i am happy to wait also. Others maintain libraries, etc so they should get the first go.

When the time comes, I'll have a go at trying to get the 'RTC' feature tested / calibrated. FWIW, the NX Crystal used in the Teensy was pretty good re stability so their approach may be good enough for indoor applications.

onehorse
01-27-2015, 05:36 PM
there's no built in RTC so you'd need something like a DS3231?

I humbly suggest something like this (https://forum.pjrc.com/threads/27437-Appallingly-small-RTC) might fill the bill. I'll update tonight with my latest adventures getting this to work as I want.

MichaelMeissner
01-27-2015, 06:07 PM
I humbly suggest something like this (https://forum.pjrc.com/threads/27437-Appallingly-small-RTC) might fill the bill. I'll update tonight with my latest adventures getting this to work as I want.

Though if you need an RTC, it probably would be simpler to stay with a Teensy 3.1, unless you wanted to use the fancier temp. controlled RTC's.

Frank B
01-27-2015, 06:10 PM
I apologize if this has already been discussed, but there's no built in RTC so you'd need something like a DS3231?

If this is the right document http://cache.freescale.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fasp=1 , there's a built-in rtc:

34.1.1
Features
The RTC module features include:
• 32-bit seconds counter with roll-over protection and 32-bit alarm
• 16-bit prescaler with compensation that can correct errors between 0.12 ppm and
3906 ppm
• Register write protection
• Lock register requires POR or software reset to enable write access
• 1 Hz square wave output

http://cache.freescale.com/files/graphic/block_diagram/KL2_BD.jpg

manitou
01-27-2015, 06:24 PM
Re: builtin RTC, see Paul's reply #23 in this thread.

Frank B
01-27-2015, 06:34 PM
ahh... i see !

Frank B
01-27-2015, 06:37 PM
@Paul..
ok.. then... "I have time to beta test now, please send me one of those first 9 boards"

THANK YOU!!

PaulStoffregen
01-27-2015, 08:50 PM
Question, will the Media Access Control (MAC) address be burnt in. It is a really great feature.


Yes, Teensy-LC will come with the unique MAC number.

I currently have the test fixture programming the number, but how we're going to manage uniqueness between Teensy 3.1 and Teensy-LC is one of *many* small issues I still need to resolve. Like most things, I do have a plan, but it involves a more work to do....



As this is a 48MHz chip, will it be run at 48MHz or (like the 48Mhz Teensy 3.0) at 96 Mhz?


I haven't tried running faster than 48 MHz yet.

Freescale's documentation shows fewer options for the clock dividers, so every appearance is options will be pretty limited. I'm not optimistic for overclocking on this chip.




What will F_Bus be at the normal speed?


24 MHz.

A couple of the peripherals run directly from the system clock.




Will be interesting to see how the T3-LC does with MIDI-DIN and MIDI-USB stuff.


This is still on my list of stuff to test, but so far the serial stuff and USB stuff works great, so I'm not anticipating any issues.




I assume that the lack of M4 DSP and Math instructions mean the Audio Library will not work?


Correct. The audio library doesn't even compile, due to heavy use of those M4 instructions and the PDB timer.

Eventually (not soon) I'm planning to pretty substantially edit the audio library, to use one of the other timers for LC, and to turn most of the synthesis, filter and FFT objects into "null". Realistically, Teensy-LC should be able to play sounds, do mixing and other simple stuff. Most synthesis and effect objects will never run on the Cortex-M0+ process.




With two SPI buses, I wonder if one can be an SPI master (to talk to some sensor that makes a lot of data) whilre the other is an SPI slave (to send some processed, filtered, or otherwise down-sized derived data on to a Teensy 3.1 which is SPI master)?

That ought to work, but of course it will depend on the software details. SPI slave mode is tricky to support well in software.

Jp3141
01-27-2015, 09:00 PM
Paul -- I'd be interested, but realistically won't have time to experiment. My main use for Teensy's is to develop instrumentation for debugging chips my company develops, and frankly software ease-of-use is way higher on my priority list than cost/size for these projects.

I'm interested in the smaller Teensy for personal projects though in the future; but best to give the initial samples to the truly needy !

stevech
01-27-2015, 11:30 PM
If you can't stand the answer, don't ask the question.
But I will, anyway.
Will there be a way to connect my Atmel JTAG/SWD debugger's two pins for debugging, SWDIO and SWCLK to this new board?

PaulStoffregen
01-27-2015, 11:35 PM
Steve, Teensy-LC keeps the form factor as close as possible to Teensy 3.1, which means no way to connect to those pins.

I do have some longer-term plans around SWD, which I can't discuss at this time. For now, Teensy-LC is meant to be as close as possible to Teensy 3.1, but offering a lower cost option.

Headroom
01-28-2015, 01:03 AM
Not sure I am worthy of this but I certainly will try to update the special boards.txt to get the Teensy-LC working with the Arduino Eclipse plugin/IDE.

Don't really need the hardware though so that can go to another needy soul. These will be very interesting for my LED lighting systems in the future as I really don't always need the power of the Teensy 3.x

stevech
01-28-2015, 03:31 AM
UART and DMA
I've been using UART TX DMA - to offset the lack of hardware FIFOs in the UARTs. A 16 deep FIFO (common in UARTS) can interrupt at 75% or so, and thereby reduce the interrupts per second by more than a factor of 10.
At 115.2Kbaud and without a FIFO and no DMA, that's 11,000 interrupts per second. It's not that a UART sustains that rate, but the burst of interrupts can disrupt other code's timing. And even 11K/sec requires some decent interrupt latency and no sloppy code that blocks interrupts too long.

Some M4's also lack a hardware timer in the UART to interrupt on the receive side if n character times go by with no (more) incoming data. Data Timeout some say.This helps a bit. The NXP ARM7's had a good UART.
One case I saw, and want to implement, is to use one of the ARM's timers, where the timer reset cause is setup to be a transition on the UART RX pin. Thus, when RX data ceases, or never occurred, the timer interrupts and one can attend to the UART RX.
Another case I saw was setting up RX DMA with a circular buffer, and have the DMA interrupt when the DMA address wraps the circular buffer.. that being a counter that was set when the circular buffer's address and size was sent to the DMA controller. I suppose a timer is also needed, for the no-data-present case.

Why do they cheap-out and use UARTs lacking FIFOs??? How much $ can that save?

Nantonos
01-28-2015, 06:30 AM
This could still use a bit of tidying, a high res image (and the card for the back).
Edit: corrections
- typos for plural I2S and SPI ports
- pin 21 is 20mA

3418

3417
3416

mxxx
01-28-2015, 07:31 AM
oh, thanks! (and thanks for being on the list)!

i've only just seen this now ... ha, i guess it's too late now to say i'm happy to step back from the purple ones because of shipping etc to places outside the US.





Christoph,
Maybe we can organize a bulk order, and thereby save on postage (for the green ones)

Vielleicht können wir ja eine Sammelbestellung organisieren um zu Porto sparen.
Gibt es ja noch mehr User aus Deutschland ?

i'd be in!

stevech
01-28-2015, 07:57 AM
@nantonos
Very nice work on the crib card.

Nit: Plural on the purple I2C Ports and below it, SPI Ports

syso2342
01-28-2015, 08:17 AM
Thanks Paul for including me on the list! I always have time for some beta testing.
I live in Europe, Germany. Let me know how we can make it happen. Maybe the Teensy-LC
would be also interesting for our upcoming Hardware Maker Space here in Berlin.

Nantonos
01-28-2015, 12:39 PM
Nit: Plural on the purple I2C Ports and below it, SPI Ports

Thanks, fixed.

nevvkid
01-28-2015, 12:56 PM
Thanks Paul for including me on the list! I always have time for some beta testing.
I live in Europe, Germany. Let me know how we can make it happen. Maybe the Teensy-LC
would be also interesting for our upcoming Hardware Maker Space here in Berlin.

Hi there, i am also in Berlin and could do some MIDI-DIN / MIDI-USB related testing.
As i have a breakout using the 3.1 to drive solenoids with MIDI Signals.

Also Friends of mine have around 80 boards with wiflys to wirlessly drive WS2812B LED strips.
>https://www.tindie.com/products/zedled/ws2812b-teensywifi-led-controller/

@mxxx @syso2342 @Frank B @christoph
If we get a batch together i could split the package and hand them over or make smaller envelopes and send them to you.

@paul - thanks for the amazing work!

christoph
01-28-2015, 01:05 PM
I've asked paul what he thinks about a bulk package to germany

mxxx
01-28-2015, 02:42 PM
Hi there, i am also in Berlin and could do some MIDI-DIN / MIDI-USB related testing.

@mxxx @syso2342 @Frank B @christoph
If we get a batch together i could split the package and hand them over or make smaller envelopes and send them to you.


sounds good -- i'm in berlin, too.

nevvkid
01-28-2015, 02:50 PM
sounds good -- i'm in berlin, too.

Nice! We should have a Teensy Noisemakers Meetup :)

Robin
01-28-2015, 03:02 PM
I think we can arrange a batch shipment to Germany. :)

stevech
01-28-2015, 04:40 PM
I think we can arrange a batch shipment to Germany. :)

I'll hand-carry for you, to Munich or Garmisch Partenkirchen. :p

Jp3141
01-28-2015, 05:46 PM
@Paul -- I'm going to Europe on Friday. I'll mail some to people in Europe for you if you want & can get them to me by 10am Fri morning in the US.

PaulStoffregen
01-28-2015, 06:04 PM
We're going to ship the first 9 on Monday.

Edit: sometime over the weekend, Robin & I make the arbitrary/unfair decisions on who gets these first boards.

The decisions on shipping are up to Robin. She'll be doing all the shipping stuff, which lets me stay focused on the tech side.

manitou
01-28-2015, 06:28 PM
looking forward to a little TLC :rolleyes:

Re: internal ADC regs on teensy LC
From the ref/datasheet docs it appears that TLC has the same chip temperature sensor register (AD26) as teensy 3.0 and 3.1, but TLC does not have VREF output (AD22 on teensy 3.0), so you can't use analogRead(39) to, for example, check the battery voltage level against VREF output (1.195v). HOWEVER, for the TLC one could use the bandgap (AD27) at 1.0v.

I did a quick test on the teensy 3.0, hacking analog.c and replacing AD22 with AD27, and in the sketch using 1000mv in place of 1195 mv to calculate Vcc. You must also enable the Vbg with
PMC_REGSC |= PMC_REGSC_BGBE;
That seemed to work, but I may not understand the underlying differences between VREF output as reference vs bandgap.

nevvkid
01-28-2015, 06:56 PM
I'll hand-carry for you, to Munich or Garmisch Partenkirchen. :p

Hi stevech.

Garmisch? Nice. I am actually from Seehausen am Staffelsee - living in Berlin.

PaulStoffregen
01-28-2015, 07:29 PM
From the ref/datasheet docs it appears that TLC has the same chip temperature sensor register (AD26) as teensy 3.0 and 3.1


I briefly tried the temp sensor while porting the analogRead() code. I got only zeros and I didn't invest more time into why.

This certainly is something I hope can get worked out next week, when people start getting the boards. But it's also possible the temperature sensor might not actually be supported in this chip?

onehorse
01-28-2015, 09:43 PM
Nice job Nantonos! Isn't pin 21 the 20 mA pin, not pin 20?

Can I use any of the 5 mA pins as a GND with digitalWrite to sink 20 mA of current. In other words, if I use pin 21 as a 3V3 source for 20 mA in a circuit, can I use pin, say, 4 as the GND? Or does the GND also need to be a 20 mA pin?

Pensive
01-28-2015, 10:36 PM
Humbled to be listed :) Thank you Paul

I am available to beta test now, however I think that the first 9 boards should go to others as i'm in the UK. Happy to pay any additional costs for shipping - its a shame the audio library won't compile yet for simple flash sample playback as I have a mini audio DAC output project in mind for my kids which would be perfect for this platform :)

But I would like to play with and make something with it :)

I also work in the lighting industry and have designs on a Teensy DALI controller. This chip is PERFECT for whacking in a DIN rail box with a 22v PSU and doing commercial lighting control with.

PaulStoffregen
01-29-2015, 01:28 AM
It's looking like release date is going to be March 10th.

kriegsman
01-29-2015, 01:32 AM
Hi Paul! Daniel Garcia and I would like to get FastLED ready for these, especially with the (awesome!) 5-volt level pin specifically for driving WS2811/WS2812 Neopixels.
Please let me know what's the best way to get a couple of these new boards to test. Happy to pay for the boards and/or shipping. Thanks very much -- they look like a they'll be right in the sweet spot for a lot of projects.
-Mark

MichaelMeissner
01-29-2015, 04:45 AM
In looking at the layout of the Teensy-LC, and thinking about neopixel wearables, I wish the 3.3v power in the back was routed to VIN and not 3.3V. Yeah, it would have been another difference from the Teensy-3.x, but it would have allowed attaching the 3 wires for neopixels (power, ground, data) directly to the teensy. You could have used a connector like: https://www.pololu.com/product/2703.

It isn't a major problem, as I can just use wires to make a connection, but it would have been nice.

Nantonos
01-29-2015, 06:31 AM
Nice job Nantonos! Isn't pin 21 the 20 mA pin, not pin 20?
Yes, good catch, fixed.

dpharris
01-29-2015, 06:47 AM
Nice addition to the line-up. I will buy some for sure, but do not have time for beta testing, sorry.

johnnyfp
01-29-2015, 07:59 AM
thanks for the include,

Is the bootloader the same setup? Seems smaller than the mini tan 54, maybe a micro tan?

Jfp

KurtE
01-29-2015, 01:08 PM
I missed this... Yes I have time to play! But can wait the couple of weeks to let others, get a chance at the first 9

PaulStoffregen
01-29-2015, 10:18 PM
Hi Paul! Daniel Garcia and I would like to get FastLED ready for these, especially with the (awesome!) 5-volt level pin specifically for driving WS2811/WS2812 Neopixels.


Yes, I'll add one more to the green board build, and put you on the list.

FastLED is awesome!

Paul
01-29-2015, 10:57 PM
The rest of the purple PCBs just arrived from OSH Park.

Here's a quick shout-out for Erin, who's hard at work hand soldering them!

3421
(click for full size)


3422
(click for full size)

Constantin
01-30-2015, 01:20 AM
What, no toaster reflow oven? ;)

stevech
01-30-2015, 03:01 AM
Erin - such patience - is saintly.

Constantin
01-30-2015, 03:43 AM
Not just patience - very good finger / hand control too! I'm glad she benefits from a nice set of magnifying glasses, as soldering the PJRC version of the Mini54 by hand is not something I would ever attempt due to the tight pitch and the fairly inaccessible pins on the bottom of the die.

Between two left thumbs, fat twitchy fingers, and only a $35 set of magnifiers, my results would be rather predictable, aka lots of magic smoke being released. So I stick to the biggest version of the Mini54 and whenever I make a board, I usuallu have to deal with bridging on that too, carefully removing some solder at a time.

So, hat off to Erin, kudos for the development of the LC, and I can't wait to see if the RTC on this one can be made accurate too!

MichaelMeissner
01-30-2015, 03:32 PM
I didn't notice whether a LED is included in the initial pre-announcement sheet. Does Teensy-LC have a LED on pin 13 like Teensy-3.0 and Teensy-3.1?

Constantin
01-30-2015, 03:35 PM
Michael, looks like it's in the top right corner, LED (white) and drop-down resistor (black).

MichaelMeissner
01-30-2015, 08:08 PM
Constantin, yeah I figured that was the LED, but it doesn't hurt to ask.

PaulStoffregen
01-30-2015, 08:32 PM
Yup, LED is on pin 13.

I tried very hard to keep as much compatibility with Teensy 3.1's footprint and features as possible.

MichaelMeissner
01-30-2015, 09:50 PM
Yup, LED is on pin 13.

I tried very hard to keep as much compatibility with Teensy 3.1's footprint and features as possible.

Thanks and it is appreciated. I was updating my spreadsheet comparing the Teensy pinouts, and I'm curious why the DAC pin on the back was renamed A12 from A14? This is the pin that was reset in Teensy 3.0, and A14/DAC on Teensy 3.1. I realize because A12 is normally under 3.0/3.1, it would not have been accessible. But if you kept the numbering at A14, and made A12 unused, people could share scripts/shields written for the 3.1 that uses the DAC (or analog pin A14) without having to use conditional compilation.

Nantonos
01-30-2015, 10:13 PM
Because Teensy 3.1 has A12 and A13 on the back, so that pin is A14. Teensy 3-LC does not have the rear pads.

However, reasonable question. What is the path of "least surprise"? Calling it A14 (so sketches that use A14 on Teensy 3.1 also work on LC, but requiring explanation of "why is it 14 and where are 12 and 13") or calling it A12 (so it is a contiguous block of analog input numbers).

I suspect that it doesn't matter too much since in practice that pin is more frequently used as a DAC than as an ADC.

PaulStoffregen
01-30-2015, 10:21 PM
Yeah, I thought about this too, for quite some time. On one hand, keeping the pin name identical would be nice. On the other hand, numbering the pins sequentially is a well established Arduino convention.

We haven't printed documentation cards yet. The first 9 beta test boards ship on Monday. So it's still possible to change what the pin is named.

My gut feeling says following the well established Arduino convention is probably best over the long term. But maybe calling it "26/A14/DAC" would be better than "26/A12/DAC"? Or maybe that's just replacing the A14 -> A12 question with a question about the "missing" A12 & A13 pins?

PaulStoffregen
01-30-2015, 10:23 PM
I should also mention, this pin and also A10 and A11 have digital I/O capability. On Teensy 3.1 they're analog only.

Things are very similar, but not perfectly identical between the 2 boards. While I want the 2 boards to be as interchangeable as possible, I also want the reference card to clearly communicate (at a glance) when the actual hardware capability actually is.

GremlinWrangler
01-30-2015, 10:48 PM
My two 2cents on the A12/A14 question is that 'least surprise' would be to conform to the existing Teensy pinout, with the reference card having a '*' to say that A12 and A13 are only found on higher spec Teensy3.1. As it is the card I'm looking at here goes A0-A9 and then jumps to A14, since the rest of the labels are on the back so we already have non sequential numbering after A9 on the ref card.

That said this does leave you open to complaints from new customers working out what they can do for $10, buying an LC and then complaining when they come up short by two pins.

In fact my suggestion would be for the final ref card to make it quite clear what the LC cannot do (link to an incompatible libraries page?) to minimise the number of 'I brought a Teensy and it doesn't do X' problems showing up. There is some potential for a fraudulent reseller to onsell LCs for the Teensy3 price and a lot of the time user code would 'work'. At least the two boards are visually very distinct so we can ask 'is your IC vertical or 45' if people are having trouble with the Audio or CAN libraries.

GW

manitou
01-30-2015, 11:14 PM
I should also mention, this pin and also A10 and A11 have digital I/O capability. On Teensy 3.1 they're analog only.



So just to confirm, ALL of the pins on the TLC have digital I/O capability. Yes?

PaulStoffregen
01-30-2015, 11:35 PM
Yes, all the pins on Teensy-LC have digital I/O, except of course the power and ground.

I believe all of our official distributors are very reputable companies, who would never intentionally misrepresent a product. Robin & I feel pretty strongly about business ethics. If we felt a distributor was acting deceptively, we'd almost certainly stop doing business them. Fortunately, all our official distributors are really good companies run by great people, so of all the possibilities that might go wrong, I feel this is the least likely to ever happen.

Also, the new board has "Teensy-LC" printed on the bottom, since there's no SMT pads and other stuff taking up all the space, like Teensy 3.1.

Nantonos
01-30-2015, 11:43 PM
That said this does leave you open to complaints from new customers working out what they can do for $10, buying an LC and then complaining when they come up short by two pins.

That is a great point, and argues for keeping the A12 designation. "Well it says A14 so naturally I assumed there were at least 14 analog inputs".

Cosford
01-30-2015, 11:47 PM
Regarding A12/A14 scenario;

It depends on how you're marketing the board. I see it as a Low Cost Teensy 3.0/3.1; as such, I'd say keeping pinouts and stuff including numbering as close to the T3.0/3.1 makes sense.

If you were trying to market it as teensy 3.2 or something, then I'd renumber the pins correctly, but in this case, you've gone way out of the way to make sure they're as hardware compatible as possible; you may as-well make them as logical and software compatible as possible too.

Just my two cents.

GremlinWrangler
01-31-2015, 01:37 AM
Sorry wasn't sniping at the official distributors and the simple fact that you have ignored your 'marketing department' and are not talking of the LC as 'new and improved' or as a 'Teensy3LC' or '4' is admirable. Was more thinking about how the ref card could be worded (and what the board layout already does) to define what the LC is (awesome but not as awesome as a 3.1) for people meeting it for the first time.

Another way to look at the long term is 'can we make as much code as possible designed for an LC just work on a 3.1'. At the moment assuming the user sticks to serial ports and the default SPI or I2C ports the only issues are a couple of PWM pins and the 5V out pin (plus anybody who uses the ADC as a digital out).

Which brings the question back to 'call it A14 for programing simplicity' or 'call it A12 for buyer simplicity'.

Hey at least it doesn't have a pin33!

GW

PaulStoffregen
01-31-2015, 01:57 AM
Yeah, this time I left the NMI pin unconnected on Teensy-LC. Learned my lesson on that one!

HWGuy
01-31-2015, 05:20 AM
With the new bootloader IC, does the "old" Mini54 support the MKL26Z64 from the Teensy-LC (And vice versa, MK20DX256 with MKL02Z32)?

Nantonos
01-31-2015, 09:15 AM
Teensy-LC is based on Freescale part MKL26Z64.

I'm wondering what symbol is provided by the toolchain for testing in an ifdef for this new board.


ifdef MKL26Z64

Is that the exact string to use and not, say, MKL26Z64VFT4?

PaulStoffregen
01-31-2015, 09:32 AM
Use this:



#if defined(__MKL26Z64__)


Edit: I also created KINETISK and KINETISL. At this point, I do not recommend their use outside the core library. I'm still debating if they should be __KINETISK__ and __KINETISL__ or something else. If you do use these, please expect them to change.

In fact, everything you see on github at this moment should be considered "alpha" or "experimental" or even "unpredictable" status.

Well, except for __MKL26Z64__. You can depend on that remaining stable. Likewise for Arduino APIs and well documented Teensyduino extensions, like IntervalTimer and elapsedMillis.

PaulStoffregen
01-31-2015, 09:47 AM
does the "old" Mini54 support the MKL26Z64 from the Teensy-LC (And vice versa, MK20DX256 with MKL02Z32)?

No. Each bootloader chip only supports the same chip it's used with on Teensy.

At some point in the (perhaps very distant) future, we'll probably switch Teensy 3.1 from the Mini54 to the MKL02Z32. When/if that happens, the MKL02Z32 will gain support for the MK20DX256 chip. But that could be a long way off, or it might never come about.

Likewise, future Teensy boards will probably use the MKL02Z32. When those arrive, I'll probably make unified firmware. Maybe. But right now, I'm pretty focused on simply getting Teensy-LC officially released!

nevvkid
01-31-2015, 10:53 AM
As i understand - there are no SMT Pads on the bottom at all.
This means a breakout for the USB which works for the 3.1 with spring loaded connectors / pogo pins won't work for the Teensy-LC?

Adding a 5$ adapter to have proper usb is not the nicest option to integrate the teensy in projects which require a solid USB connection.

And what about the separation of VIN and USB Power, is this Option also missing?

THX, J

Experimentalist
01-31-2015, 12:01 PM
As a special thanks to very active forum contributors and library authors, we're making an early, hand-soldered pre-production run. PJRC will send free Teensy-LC prototypes to these people: ..., Experimentalist, ...

Hi Paul,

Thank you, that's great.

Happy to wait for a green board and will be glad to help.

looking forward to testing with it

Ex.

manitou
01-31-2015, 12:19 PM
I briefly tried the temp sensor while porting the analogRead() code. I got only zeros and I didn't invest more time into why.

This certainly is something I hope can get worked out next week, when people start getting the boards. But it's also possible the temperature sensor might not actually be supported in this chip?

So looking at your current version of analog.c, it appears you are not mapping the temp sensor. I was also wondering about adding analogRead(41) for the bandgap ADC channel on all 3 teensy's....

__MKL26Z64__
KINETISL

PaulStoffregen
01-31-2015, 02:36 PM
Good news. We got a 10th purple board built, and all 10 passed testing, so a total of 10 will ship on Monday.

I just read this thread, and a few emails. I found 7 definitive requests for the first purple boards:

duff
embedded-creations
Frank B
kriegsman
manitou
onehorse
potatotron

If anyone else *really* wants a purple board for early beta testing, and definitely has time available starting next week, please speak up now. Please, do not worry about shipping costs. If you really do have time and strong interest for beta testing next week, I want to get one of these purple boards into your hands ASAP.

I found 3 more messages indicating available time to test, but perhaps a preference to let the purple boards go to others.

Pensive
MuShoo
syso2342

If I've missed anyone, please speak up now!!

The green pre-production boards should start shipping in a couple weeks (all them hand-soldered by Erin and/or me). Everyone listed on the original post will get either a purple or green board, regardless of beta testing.

Robin will be handling all the shipping details, so I can stay focused on the technical side. If you have a question or concern about shipping, please email Robin directly (robin at pjrc dot com).

Robin
01-31-2015, 02:55 PM
I've sent messages to the first 7 people on the list asking for shipping info. You can also email me directly - robin at pjrc

Do not worry about the shipping cost, even if you are outside the US. This testing is very important to us and the cost of shipping is well worth it to get these boards to users who are willing to put some effort in to testing this board and giving good feedback.

manitou
01-31-2015, 03:11 PM
Paul,
do you have a LC TODO list? what is working? what you're working on? what needs to be done? triage?

I think FreqMeasure might need some TLC ... if you don't get to it, I'll poke at it.
FreqCount might be good to go.

Pensive
01-31-2015, 07:36 PM
I'll put some time in Paul, I'll email by details through. Thanks

Jon

edit:mail sent

Pensive
01-31-2015, 10:13 PM
I ordered this with 12 pots:

https://learn.adafruit.com/untztrument-trellis-midi-instrument

Should be here before the end of the week. Reckon it's 1 evening to build and 2 or 3 evenings to code. This should test i2c, all but one analogue, usb_midi, and i'll probably sink a few leds and buttons in and around it to fill up the remainder of the pins.

Teensy-LC will be up to this task easily I'm sure.....excited!! :)

GremlinWrangler
02-01-2015, 03:29 AM
Re purple boards

Have plenty of time to test but as per the others unsure of the value of my contribution and on the wrong end of a shipping delay. Unless targeted elsewhere would be working through my assorted display and sensor breakouts verifying no surprises. Also interested in how the power consumption measures up for a potential soil monitoring setup.

GW

manitou
02-01-2015, 11:56 AM
Re: teensy LC DMA

Here is an untested snippet at using TLC DMA to do memcpy(). The registers aren't yet defined in kinetis.h.



#define DMA_SAR0 (*(volatile const void * volatile *)0x40008100)
#define DMA_DAR0 (*(volatile void * volatile *)0x40008104)
#define DMA_DSR_BCR0 (*(volatile uint32_t *)0x40008108)
#define DMA_DCR0 (*(volatile uint32_t *)0x4000810C)


#define DMA_DCR_SSIZE(n) (((n) & 0x3) << 20)
#define DMA_DCR_DSIZE(n) (((n) & 0x3) << 17)
#define DMA_DCR_START 0x00010000
#define DMA_DCR_SINC ((uint32_t)1<<22)
#define DMA_DCR_DINC ((uint32_t)1<<19)
#define DMA_DSR_BCR_DONE 0x01000000
#define DMA_DSR_BCR_BSY 0x02000000


void memcpy32(int *dest, const int *src, unsigned int count)
{
DMA_SAR0 = src;
DMA_DAR0 = dest;
DMA_DSR_BCR0 = count * 4; // bytes
DMA_DCR0 = DMA_DCR_SINC | DMA_DCR_DINC | DMA_DCR_START;
while (!(DMA_DSR_BCR0 & DMA_DSR_BCR_DONE)) /* wait */ ;
}

void memset32(int *dest, int val, unsigned int count)
{
DMA_SAR0 = &val;
DMA_DAR0 = dest;
DMA_DSR_BCR0 = count * 4; // bytes
DMA_DCR0 = DMA_DCR_DINC | DMA_DCR_START;
while (!(DMA_DSR_BCR0 & DMA_DSR_BCR_DONE)) /* wait */ ;
}



This is based on teensy 3 sketch defined at
https://github.com/manitou48/teensy3/blob/master/mem2mem.pde
and discussed in the thread:
https://forum.pjrc.com/threads/18237-teensy-3-0-memory-to-memory-DMA-help
where there was speed up on teensy 3.0 but not(?) on teensy 3.1

will test on LC "real soon now"

freescale readings: DMA on KINETIS L series
http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4631.pdf

PaulStoffregen
02-01-2015, 03:14 PM
do you have a LC TODO list? what is working? what you're working on? what needs to be done? triage?


Yes, I do. It's been changing pretty rapidly as I test stuff and fix bugs, and also as I find more stuff to test.

I'll post it on a thread dedicated to the beta testing, on Monday or Tuesday morning.

jakorten
02-01-2015, 03:15 PM
I just came up with an addition for our large (medical simulation) project that would be nice to use the LC version for (since it needs to connect to the other teensies using i2c but also with an extender chip that uses i2c as well (and I want to make it very modular) so using a through hole teensy module with two i2c ports would be very convenient as the 3.1 uses the SMD pads for the second i2c port of course!

MichaelMeissner
02-01-2015, 08:52 PM
I just reworked my spreadsheet to compare the Teensy 3.0, 3.1, and LC micro-processors: https://docs.google.com/spreadsheets/d/1LSi0c17iqtvpKuNSYksMG306_FpWdJcniSRR6aGNNYQ/edit#gid=1103027528.

jakorten
02-01-2015, 08:54 PM
That is a handy spreadsheet indeed!

manitou
02-01-2015, 09:02 PM
I just reworked my spreadsheet to compare the Teensy 3.0, 3.1, and LC micro-processors: https://docs.google.com/spreadsheets/d/1LSi0c17iqtvpKuNSYksMG306_FpWdJcniSRR6aGNNYQ/edit#gid=1103027528.

looking at Paul's core github (eeprom.c), the LC appears to be configured for only 128 bytes of EEPROM.


#define EEPROM_SIZE 128

i think it uses the tail end of flash.

MichaelMeissner
02-01-2015, 09:12 PM
Ok, I hadn't noticed the EEPROM size is different. Thanks.

Paul
02-01-2015, 09:53 PM
Yes, the top 2K of flash is reserved for EEPROM emulation.

I've edited the original post. Michael, maybe the spreadsheet should mention 62K flash?

MichaelMeissner
02-01-2015, 10:03 PM
Spreadsheet updated (62K program flash, 2K EEPROM).

PaulStoffregen
02-01-2015, 11:26 PM
Spreadsheet updated (62K program flash, 2K EEPROM).

It's actually only 128 bytes of emulated EEPROM.

EEPROM emulation uses wear leveling over a bigger chunk of lower endurance, block-erase Flash to emulate a much smaller amount of higher endurance, byte-erase EEPROM. The amount of flash memory consumed by the emulation is 2K, resulting in 128 bytes of emulated EEPROM.

PaulStoffregen
02-01-2015, 11:34 PM
On Teensy 3.1, the 2K of EEPROM is also emulated, but the wear leveling and emulation algorithms are all implemented in hardware. That hardware includes a dedicated 2K block of RAM, and a dedicated 32K block of flash. Reads and writes complete in a single bus cycle, but after a write it becomes "busy" for some time while the hardware completes the wear leveling writing and management of the flash.

On Teensy-LC, none of that hardware exists, so I had to build it all in software. My software is much slower than the all-hardware approach! Because there's no dedicated flash block, code execution stalls for about 8 microseconds during the actual write operation. The whole flash memory on Teensy-LC is only twice the size of Teensy 3.1's dedicated flash for EEPROM emulation. The dedicated RAM section, which Freescale calls "FlexRAM", is 25% the size of Teensy-LC's entire memory.

When you think about it... the hardware in Teensy 3.1 is really pretty amazing!

GremlinWrangler
02-02-2015, 12:30 AM
Having just been for a poke through the EEPROM files is there a correct way to access the eeprom_write_word and eeprom_write_dword functions?

My thought would be adding entries EEPROM.CPP but checking if I missed a some other place they were being declared. I'm assuming real programers just go straight to the calls in cores/EEPROM but not quite sure if I'm up for that yet.

MichaelMeissner
02-02-2015, 12:32 AM
Hmmm, I had designed an EEPROM structure to hold various things between boots, and it is 88 bytes. When I set this up with the ATtiny85's 512 byte EEPROM structure, 88 bytes wasn't that bad. It will need to be trimmed somewhat. Now, I set this up sort of as the possible things I might want to preserve, but at present, the only thing I depend on is a random number seed.

Given how expensive it is to write to EEPROM, I wish the EEPROM libraries had an interface to read/byte a chunk of bytes, rather than byte at a time.

Yep, the 3.1 hardware is amazing. I must admit, to $8 difference may sway me to use Teensy 3.1's instead of the LC, given the unaligned storage issues and small/expensive EEPROM area.

MichaelMeissner
02-02-2015, 12:37 AM
Now, I haven't looked into the M0 (or arm at all), but it may make sense to have some sort of trap handler to catch segfaults on unaligned read/writes. The trouble is what to do in a trap handler? Perhaps call a user specified function so the user can appropriately flash LED 13, write to the USB serial line, etc.

PaulStoffregen
02-02-2015, 12:49 AM
it may make sense to have some sort of trap handler to catch segfaults on unaligned read/writes. The trouble is what to do in a trap handler?

It's already in there. See fault_isr() in mk20dx128.c starting on line 53 (https://github.com/PaulStoffregen/cores/blob/master/teensy3/mk20dx128.c#L53).

Actually sending the stack dump out Serial1 is disabled by default. If you want to see it, you'll need to edit the code to enable it.



Perhaps call a user specified function so the user can appropriately flash LED 13, write to the USB serial line, etc.

Calling anything unknown while in fault mode is risky. Another fault while already in fault mode puts the CPU into a special "hard lockup" mode.

It's really desirable to keep running the USB polling while in fault mode, so you can easily upload new code from Arduino. Otherwise, you'd have to manually press the button on Teensy. Yeah, that's pretty horrible... but speaking from experience of porting and testing so much code, I really like not having to manually press the pushbutton!

MichaelMeissner
02-02-2015, 03:26 AM
Agreed, I've debugged enough compilers code on raw machines and occasionally brought code up to new machines (debugging user code with an OS debugger was 'interesting') that I know the challenges. I was just wondering out loud if we could do anything when a fault occurs.

Frank B
02-02-2015, 07:45 AM
Some time ago i posted some code:
https://forum.pjrc.com/threads/25835-BUG-FYI-16-32Bit-access-to-adress-0x1FFF_FFFF-cause-hang-%28Teensy-3-x%29?p=62169&viewfull=1#post62169

It lacks calling the original-nmi, but that can be added easyly. And pls understand it as an idea how this could be handled, not more :-)

PaulStoffregen
02-02-2015, 02:42 PM
Here's a new/permanent page with info about Teensy-LC.

http://www.pjrc.com/teensy/teensyLC.html

Shouldn't be any big surprises. Oh, there's also a pre-order link. ;)

KurtE
02-02-2015, 06:08 PM
Looks good! Might want to include link to the datasheet for it or maybe on your main datasheets page.

Assuming the links on the first page of this thread is correct including: http://cache.freescale.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fasp=1
I believe the UARTs still support half duplex (1 wire mode). I use this when talking to the Dynamixel Servos at 1mbs. That is one of things I want to try out once I get my hands on one of these.

Kurt

pictographer
02-02-2015, 08:49 PM
Oh, and if you're adding links... A link to the forum would be good. People sometimes don't realize what an amazing resource the forum is.

Robin
02-02-2015, 09:13 PM
I've contacted everyone who has sent me their shipping information. If you are on the first round of beta testers and have not heard from me, please email me directly robin at pjrc dot com

First Round Testers
duff
embedded-creations
Frank B
kriegsman
manitou
onehorse
potatotron
Pensive
MuShoo
syso2342

Robin
02-02-2015, 11:21 PM
Eight of the ten beta boards shipped out today. They should be delivered before the end of the week. :)

Thanks to everyone who said they wanted to help test and have time to test now.

There are 2 people who have not heard from and I don't have a shipping address for. If I don't hear anything by Wednesday afternoon we will ship them to other people. We really want to move forward with testing!

manitou
02-03-2015, 01:03 AM
LC manual suggests SPI0 runs at bus clock(24mhz) and SPI1 runs at system clock(48mhz). So does that mean SPI1 can run twice as fast as SPI0. the LC SPI library uses SPI0 (F_BUS).

syso2342
02-03-2015, 07:22 AM
I received my Tracking Code from Robin yesterday. I will let you know when it arrives and then I will give it a testimonial :)

Nantonos
02-03-2015, 10:38 AM
I'm sorry not to be helping with first-round testing. I'm literally heading to the other side of the world tomorrow for two weeks.

neilh20
02-03-2015, 04:46 PM
Fantastic Spreadsheet
BTW though Note 6) You say no RTC - the silicon does implement an RTC, however it requires an external clock oscillator to drive RTC_CLKIN/PTC1 - but can't figure out if PTC1 comes out on the Teensy-LC.

MichaelMeissner
02-03-2015, 06:37 PM
Thanks neilh20. I'll wait for Paul to chime in on whether the RTC is available (but you would need to provide the crystal, and of course it isn't powered).

Right now, I don't have a column for the interrupt numbers. This morning, I split i2c, spi, serial, can, i2s into separate columns. I don't know what I'll do when the big boy (Teensy 3.1++ or Teensy 4) comes out.

PaulStoffregen
02-03-2015, 08:28 PM
See this message (https://forum.pjrc.com/threads/27624-Coming-Soon-Teensy-LC-%28low-cost-Teensy%29?p=63027&viewfull=1#post63027) regarding my thoughts on the RTC. I feel pretty strongly about promoting realistic expectations. I know pretty much everyone else markets hardware with a lot of hype about every feature, even when there's hidden gotchas. I don't like that.

PTC1 is pin 22, if you really want to give the on-chip RTC a try. A schematic will be posted shortly after the official release, just like all the other Teensy boards. The pinout info can also be found in core_pins.h.

But even if you get the RTC counting time with an external clock, what's going to happen when you lose power?

Constantin
02-03-2015, 08:45 PM
I totally agree, the lack of a VBAT pin makes the Teensy-LC RTC option a lot less attractive as far as keeping absolute time is concerned. However, there are datalogger applications where the absolute time is not as important as logging on a precise interval. With temperature-compensation, you may be able to get sub 5PPM performance out of what I presume would be a oscillator, not a crystal, right? Or, apply a appallingly small RTC (https://www.tindie.com/products/onehorse/m41t262-real-time-clock-add-on-for-teensy-3x/) and do it all over I2C.

Given the high quality/stability of the crystals that ship with the Teensy MCUs I wonder if an external RTC crystal/oscillator is necessarily needed to allow precise intervals. Can one compensate the 'system clock' the way that the RTC clock registers can be manipulated?

onehorse
02-03-2015, 08:49 PM
In addition to my zoo of motion sensors, Adafruit's displays, nRF24L01+ SPI radio, and nRF8001 bluetooth, I plan to include the M41T62 RTC + environmental sensor in my simple-minded testing.

MichaelMeissner
02-03-2015, 08:54 PM
Well if you add a DS3231 real time clock, you also get some i2c storage space, which should help if you use EEprom. Of course it pushes the cost closer to the $19.80 of the Teensy 3.1. Of course you do have to add in the 32.768kHz crystal in the Teensy. 3.1 case, but that is fairly cheap. The only things that come to mind why you might prefer a Teensy LC + RTC over Teensy 3.1 might be the 2nd SPI port, 2nd i2c port accessible without soldering the bottom pads, or the back pin that delivers VIN voltage when A3 is written to.

FWIW, I happened to order a DS3231 RTC today for $4.68 (to replace a RTC for a raspberry pi I seemed to have burned out), which would bring the combined price to 16.33.

DemolishunWork
02-03-2015, 09:04 PM
PAUL!!!

Holy crap do I WANT this board!

I have been looking for a cheap Arduino "like" board. The Teensy 3.1 is awesome, but for $12 HOLY CRAP!

I really wanted a cheap, small device for lighting control and 3d printer filament maker control. Wow!

When can I buy this?!

PaulStoffregen
02-03-2015, 09:14 PM
You can pre-order (http://www.pjrc.com/store/teensylc.html) right now. That'll get you one as soon as they're ready.

Woobatron
02-03-2015, 09:42 PM
Congratulations on the new board!

onehorse
02-03-2015, 09:51 PM
Well if you add a DS3231 real time clock, you also get some i2c storage space

The DS1307 and DS3231 are fine RTC solutions for the $5 you might pay on Amazon, but a bit too big for my taste. I made the I2C M41T62 RTC board so small it can ride piggy back on the Teensy (3.x or LC) such that you might not even know it's there. Plus it has a pressure sensor and supercap power backup as well as the 64 kByte or 256 kByte of EEPROM for logging, just like the EEPROM usually added to the DS3231 boards. The M41T62 RTC board is more expensive, but it is more capable and pleasantly, appallingly small.

Frank B
02-03-2015, 09:55 PM
onehorse, what do think about making some spi-flash & spi-(f)ram boards ? escpecially the ram could be interesting for the LC
+ LC has 2x SPI

onehorse
02-03-2015, 10:10 PM
making some spi-flash & spi-(f)ram board

Yes, I have looked at this. ST makes a 256 kByte SPI EEPROM similar to the 256 kByte I2C EEPROM I have already been using. It would be relatively easy to make a small board with 512 kByte of EEPROM that uses an SPI interface (I like the simplicity and robustness of EEPROM). Sort of the analog of this (https://www.tindie.com/products/onehorse/m24m02-2-x-256-kbyte-eeprom-add-on-for-teensy-31/) board. But it would likely be a little wider since the SPI port near the non-USB end of the Teensy 3.x/LC is 3 pins wide. Is 512 kByte enough to interest many people? Do you have another memory chip that you would prefer that would fit on an equally small board?

Just took a look at FRAM, it is max 2 Mbit just like ST's EEPROM but about four times as expensive!

But this (http://www.mouser.com/ds/2/268/S71271-81384.pdf) looks interesting!

uTasker
02-03-2015, 11:15 PM
Hi All

I have worked with the KL26 on the Freescale FRDM-KL26Z boards so prepared a project for the Teensy LC for when the HW is available.

Some notes:
1. Would it not be better to use a KL26Z128 on the board since the 64k Flash and 8k Ram are quite tight; I needed to skimp on RAM to use USB CDC and 3 UARTs by allocating much reduced buffer space to normal. 16k is quite comfortable but 8k may be below the cut-off threshold for some work. The part with double the memory is otherwise identical and costs 30c more (if the quantities are high).
2. I see much discussion about the RTC. I never really understood the RTC in the KL parts because it really needs a low power 32kHz oscillator in combination with the very low power modes to be a real RTC. The following discusses the KL RTC in some more general details: http://www.utasker.com/kinetis/KL_RTC.html
3. I don't find a circuit diagram so quessed at some pinouts for the moment.
4. This is what I based the configuration on : http://www.utasker.com/kinetis/FRDM-KL26Z.html, mixed with http://www.utasker.com/kinetis/TEENSY_3.1.html so it supports Tx DMA on the UARTs and the low leakage modes (see also http://www.utasker.com/kinetis/LLWU.html)
5. The Teensy LC stuff has been prepared here: http://www.utasker.com/kinetis/TEENSY_LC.html
The (provisonal) binaries may work but most probably need at least some pin configuration changes. The code has been proven on the KL26 (on Freescale Freedom and Tower boards) and simulated on the Teensy LC board/processor type.
I'll tweek once the ciruit diagram is published and test once production starts.

Regards

Mark

http://www.utasker.com/index.html

uTasker
02-04-2015, 12:06 AM
Hi

I have attached memcpy code from the uTasker project below (there is also memset which is very similar) which is suitable for the KL26.
It can be used generally since it will work out the alignment of input and output buffer and optimised 32 bit copies where possible. This means that it doesn't have to be used only specially for 32 bit copies but can be use instead of the library routine.

Beware that you should add protection in your code for the following case - if an interrupt arrives which calls the the routine while the whie() is in progress it will cause the DMA operation to fail and the code to hang (crash). In the uTasker code this is accomplished by checking the DMA_DCR content and falling back to general memcpy() loop code if needed.

Note that there is also a define for the DMA channel used since there are only 4 in the KL26 and these will be moved around between various peripherals etc. DMA_MEMCPY_CHANNEL defines which one is used for the library operations.

Finally note that the memset() library routines from some compile chains (eg. IAR) will easily out-perform a DMA based solution (they load a group of registers with the the value to be written and use a Cortex instruction that writes the group to memory over and over again - this is about 3x faster!!

Regards

Mark

http://www.utasker.com/kinetis.html



extern void *memcpy(void *ptrTo, const void *ptrFrom, size_t Size)
{
register unsigned char *ptr = (unsigned char *)ptrTo;
register unsigned char *buffer = (unsigned char *)ptrFrom;

if (Size >= SMALLEST_DMA_COPY) { // if large enough to be worthwhile
KINETIS_DMA *ptrDMA = (KINETIS_DMA *)DMA_BLOCK;
ptrDMA += DMA_MEMCPY_CHANNEL;
if (ptrDMA->DMA_DCR == 0) { // if not already in use
unsigned long ulTransfer;
while (((unsigned long)buffer) & 0x3) { // move to a long word boundary for source
*ptr++ = *buffer++;
Size--;
}
ptrDMA->DMA_DSR_BCR = DMA_DSR_BCR_DONE; // clear the DONE flag and clear errors etc.
if (((unsigned long)ptr & 0x3) != 0) { // if the destination is not also long word aligned
if ((unsigned long)ptr & 0x1) { // not short word aligned
ulTransfer = Size;
ptrDMA->DMA_DCR = (DMA_DCR_DINC | DMA_DCR_SINC | DMA_DCR_D_REQ | DMA_DCR_DSIZE_8 | DMA_DCR_SSIZE_8 | DMA_DCR_DMOD_OFF | DMA_DCR_SMOD_OFF); // set mode and protect from interrupts that could use the function in the process
}
else {
ulTransfer = (Size & ~0x1); // ensure length is suitable for short words
ptrDMA->DMA_DCR = (DMA_DCR_DINC | DMA_DCR_SINC | DMA_DCR_D_REQ | DMA_DCR_DSIZE_16 | DMA_DCR_SSIZE_16 | DMA_DCR_DMOD_OFF | DMA_DCR_SMOD_OFF); // set mode and protect from interrupts that could use the function in the process
}
}
else {
ptrDMA->DMA_DCR = (DMA_DCR_DINC | DMA_DCR_SINC | DMA_DCR_D_REQ | DMA_DCR_DSIZE_32 | DMA_DCR_SSIZE_32 | DMA_DCR_DMOD_OFF | DMA_DCR_SMOD_OFF); // set mode and protect from interrupts that could use the function in the process
ulTransfer = (Size & ~0x3); // ensure length is suitable for long words
}
ptrDMA->DMA_SAR = (unsigned long)buffer; // set address of sourse
ptrDMA->DMA_DAR = (unsigned long)ptr; // set address of destination
ptrDMA->DMA_DSR_BCR = (ulTransfer & DMA_DSR_BCR_BCR_MASK); // set transfer count (don't set DMA_DSR_BCR_DONE at the same time otherwise BCR is reset)
ptrDMA->DMA_DCR |= (DMA_DCR_START); // start DMA transfer
ptr += ulTransfer; // move the destination pointer to beyond the transfer
buffer += ulTransfer; // move the source pointer to beyond the transfer
Size -= ulTransfer; // bytes remaining

while ((ptrDMA->DMA_DSR_BCR & DMA_DSR_BCR_DONE) == 0) {} // wait until completed

while (Size--) { // complete any remaining bytes
*ptr++ = *buffer++;
}

ptrDMA->DMA_DCR = 0; // free the DMA channel for further use
return ptrTo; // return pointer to original buffer according to memcpy() declaration
}
}
// Normal memcpy() solution
//
while (Size--) {
*ptr++ = *buffer++; // copy from input buffer to output buffer
}
return ptrTo; // return pointer to original buffer according to memcpy() declaration
}

wcalvert
02-04-2015, 01:18 AM
I've done a small amount of tinkering with the KL26 series, and I'm very curious about the Teensy LC. I'm mainly wondering if the other chip, which I presume is a Nuvoton ARM of some kind, is powered off of the KL26's internal regulator? That would really impact the lowest possible sleep current you could achieve for the whole board. The L series chips are pretty well regarded as being very good for lower power designs so it will be interesting to see how the LC performs overall.

PaulStoffregen
02-04-2015, 02:25 AM
1. Would it not be better to use a KL26Z128 on the board since the 64k Flash and 8k Ram are quite tight;


Choices and trade-offs had to be made to keep the cost low. If the bigger chip had been only pennies more, I would have used it. The chip and all other hardware stuff is fixed and will not be changed.

Right now, Teensyduino is burning about 10K flash and 2K ram, based on code that was designed for Teensy 3.0 & 3.1. I'm pretty sure I'll manage to cut that roughly in half by release next month.

mxxx
02-04-2015, 06:51 AM
Just took a look at FRAM, it is max 2 Mbit just like ST's EEPROM but about four times as expensive!

But this (http://www.mouser.com/ds/2/268/S71271-81384.pdf) looks interesting!

i've only looked briefly at it but isn't that pretty much identical to W25Q128FV? there's a couple of SOIC-16 ones along these lines with up to 1Gb (spansion "FL" series, for instance. the larger ones are kind of $ though).

onehorse
02-04-2015, 07:02 AM
Similar but this one is 16 Mbit or 2 MByte, 16 times more memory than the W25Q128FV, and at 5 mm x 6 mm a little larger than I'd like but it would fit on a small board just fine. And it is not too pricey, about $1.50 per. So it looks like a pretty good choice for SPI flash. The trouble is, just like EEPROM, the more memory the larger and more expensive the chips get. I'd like to keep the add-on board 0.3 inch x 0.7 inch so it fits nice and snug at the end of the Teensy. So 5 mm is about the limit.

mxxx
02-04-2015, 07:20 AM
ah right, i keep confusing W25Q128FV and W25Q256FV in my search bar. but that's good to know. being soic-8, it should work with the audio board, too.

edit: wait, no but W25Q128FV *is* 128 Mbit = 16 MB ??

anyways, time to get a coffee.

manitou
02-04-2015, 10:21 AM
Re: 5v on alternate pin 17
google hasn't helped me much, what is 74LV1T125? is it opamp requiring 5v feed or a step-up converter, or ?

WMXZ
02-04-2015, 10:31 AM
Re: 5v on alternate pin 17
google hasn't helped me much, what is 74LV1T125? is it opamp requiring 5v feed or a step-up converter, or ?
according to google it must be a custom chip from pjrc.com, or most likely a typo

PaulStoffregen
02-04-2015, 10:55 AM
Try your search on Digikey, rather than Google! ;)

Frank B
02-04-2015, 11:16 AM
Just took a look at FRAM, it is max 2 Mbit just like ST's EEPROM but about four times as expensive!

But this (http://www.mouser.com/ds/2/268/S71271-81384.pdf) looks interesting!

Yes, FRAM is very expensive, but its fast.
Personally, I would be interested in SPI-SRAM, I need a large buffer for a project . I am still looking for a solution (more than 8 kb, 32kb-64kb would be fantastic).
Is there any chip?

mxxx
02-04-2015, 12:24 PM
Yes, FRAM is very expensive, but its fast.
Personally, I would be interested in SPI-SRAM, I need a large buffer for a project . I am still looking for a solution (more than 8 kb, 32kb-64kb would be fantastic).
Is there any chip?

there's 23LC1024 ? 1Mbit, that's the one meant to be used with the audio adapter, IIRC

onehorse
02-04-2015, 05:11 PM
wait, no but W25Q128FV *is* 128 Mbit = 16 MB ??

yeah, I was thinking of the 1Mbit SOIC-8 chips. This (http://www.digikey.com/product-search/en?mpart=W25Q128FVEIG&vendor=256) 128 Mbit W25Q128FV SPI flash chip in the 6 x 5 mm WSON package is less than $2 each, sweet!. I'll see about making an appallingly small add-on board for the Teensy 3.x/LC with it using SPI port 0.


I am still looking for a solution (more than 8 kb, 32kb-64kb would be fantastic).

The 512 kb EEPROM add-on boards offered on Tindie read/write pages via I2C in 10 ms. Is this too slow?

immortalSpirit
02-04-2015, 05:21 PM
Bravo Paul! May u sell many and prosper!

stevech
02-04-2015, 05:26 PM
I've used and have SPI based code for the 128mbit (16MB) Spansion flash chips. 8 pin.
Very fast - like 40MHz clock if you wish. Even has mode to let a smart device boot from serial flash easily.
Digikey's price @1ea is $1.90 for the S25FL127SABMFI101
http://www.digikey.com/product-search/en?v=1274&mpart=S25FL127SABMFI101
Price reduces with smaller capacities.

onehorse
02-04-2015, 05:47 PM
Can you share your code with me? One of the reasons I have been reluctant to use SPI flash is I don't understand how to use it well yet. All of these SPI flash chips seem to come in a 6 x 5 mm WSON package which is great. I don't think there should be much difference between Winbond, Spansion, or SST 128 Mbit Flash, should there be? They all seem to be about the same.

Frank B
02-04-2015, 07:24 PM
The 512 kb EEPROM add-on boards offered on Tindie read/write pages via I2C in 10 ms. Is this too slow?
I need it for Audiobuffering, with some channels (simultanous). The SRAM from above is great, i just ordered some. But i have to remove the flash now from the audioboard..
Hopefully i can manage this and solder the sram when it arrives.. my eyes are not the best :-(
That's why i asked for ready-to-use boards. Great would be a "memory board" - a combination of all three types(eeprom/flash/sram) + spare soic16 (+ microsd??) on one board (maybe with a binary->decimal decoder for all the chipselects )
Hm, ok, this is maybe a bit too special for most users:-)

onehorse
02-04-2015, 07:47 PM
Great would be a "memory board" - a combination of all three types(eeprom/flash/sram) + spare soic16 (+ microsd??) on one board (maybe with a binary->decimal decoder for all the chipselects )

Not sure the advantage of SRAM over EEPROM, both seem limited to 2 Mbit.

And if you have 16 Mb of flash why would you need EEPROM too?

One thing I am trying to understand is, if I have more than one chip that communicates via SPI, how do I select/deselect? Do I need to connect each chip to its own chip select pin? If not, how does a decoder do its magic? One possibility is to put two 16 Mb SPI-enabled flash chips on one 0.4 in x 0.7 in add-on board to be mounted on the non-USB end of the Teensy 3.x/LC. But how would I toggle between them?

Frank B
02-04-2015, 08:03 PM
The RAM is 20 MHZ, much faster than I2C-EEPROM.
Flash needs erasing (takes time) before it can be written, eeprom not (i think (?) - i've never used eeprom).. so every type has its own advatages/disadvantages..
SPI: Yes, every chip needs it's own Chipselect - the idea to use a decoder saves some pins on the teensy. 2 pins->3chipselects, 3pins-> 7chipselects
With two chips, the decoder is no advantage.

But thats all very off-topic now.. :-) Sorry Paul

stevech
02-04-2015, 08:36 PM
Can you share your code with me? One of the reasons I have been reluctant to use SPI flash is I don't understand how to use it well yet. All of these SPI flash chips seem to come in a 6 x 5 mm WSON package which is great. I don't think there should be much difference between Winbond, Spansion, or SST 128 Mbit Flash, should there be? They all seem to be about the same.
let's start a new thread on this. I've noted that the JDEC standards for these flash chips lets most vendors' chips have almost identical command sets.
I wish boards like Teensy had some unpopulated interconnect for add-on flash. Something that is board real estate friendly - pads for a vertical socket or some such.

sumotoy
02-04-2015, 10:59 PM
:D Wow! Great news Paul! I'm sure it will be my second preferred toy ever...

potatotron
02-05-2015, 01:34 AM
Hi all,

I received my LC in the mail today. Here are some pics of it, and it compared to a Teensy 3, Uno, and RPI A+.

http://imgur.com/a/WTJ2n

More news soon.

PaulStoffregen
02-05-2015, 01:49 AM
I tweeted a link to your photos. :)

Any chance you could add another picture to that album, showing the back side?

potatotron
02-05-2015, 02:01 AM
Thanks! That was an obvious oversite on my part. I've added a picture of the back.

PaulStoffregen
02-05-2015, 03:55 AM
I also neglected to take any photos of the back side. I'm glad you did. I can focus on answering questions and porting IRremote, instead of setting my camera up again....

christoph
02-05-2015, 04:37 PM
Just had a look at the photos: they're great! But wait - that's hand-soldered? My compliments to Erin!

mortonkopf
02-05-2015, 04:52 PM
Great photos Potatotron, that UNO looks like it hasn't been used in some time, seriously dusty! ;-)

potatotron
02-05-2015, 06:26 PM
Great photos Potatotron, that UNO looks like it hasn't been used in some time, seriously dusty! ;-)

Thanks!

The Teensy 3.0 came out I said good riddance to the ATMega328 and the weirdness of pgm_read_word_near() et al. I'm having a hard time remembering the last time I actually used my Uno…over a year ago at least. For a while I was using it as a programmer for ATTiny projects but someone gave me an AVRISP so now I don't even need it for that.

To tell you the truth ever since the announcement of the Teensy LC I've been reading over the documentation for the MKL02Z32 and thinking maybe there's something I can do with that. 32K Flash / 4K RAM / 48 Mhz @ $1.64 is pretty attractive compared to 4K Flash / 256 B RAM / 8 Mhz @ $2.76.

[edited to fix typos - I am not good at phone typing]

STAR297
02-05-2015, 09:58 PM
Paul, are you going to continue with the Teensy3.1 and would you like the final stage of adding the completed libraries that are now ready to the Mbed platforms page?

PaulStoffregen
02-05-2015, 10:15 PM
Yes, of course we're going to continue making Teensy 3.1. Teensy-LC doesn't make 3.1 obsolete.

A high-end board will also be coming at some point in the future. Right now, it's unclear if we'll wait for Cortex-M7 chips, or use one of the M4-based K22F chips.

I had planned to make both of these last year, but the audio library took much of 2014's engineering time!


Edit: However, the days of continuing to carry stock for the old Teensy 3.0 board are numbered. 3.1 is a replacement for 3.0. When the current stock runs out, probably near the end of 2015 at the slow rate it's selling, we'll probably discontinue 3.0.

Pensive
02-05-2015, 10:22 PM
A high-end board will also be coming at some point in the future.

_rubs hands with glee_

PaulStoffregen
02-06-2015, 01:30 AM
Good news, we're going to have several more early protos, shipping on Monday!

These are green boards, but not exactly the same as the final production ones. They were made by Sunstone (who did them much faster than we can get from OSH Park). They have tin plating, rather than the gold plating that'll be on the final version.

I'd like to invite everyone on the list who hasn't been shipped a board yet to reply with "please send me one of these next batch with tin plating" or "I'd prefer one of the final version with gold plating" (which should start shipping 1 week later).


Edit: here's a photo:

3482
(click for full size)

Demolishun
02-06-2015, 01:52 AM
I am not picky. So just "PLEASE!!!".

;)

KurtE
02-06-2015, 01:57 AM
Tin would be fine :)

MichaelMeissner
02-06-2015, 02:02 AM
At this point, my soldering station is still packed away, so feel free to put me on the final shipment.

el_supremo
02-06-2015, 02:37 AM
Tin would be fine.

BTW are Teensy2 and Teensy++2 still in production?

Pete

GremlinWrangler
02-06-2015, 03:15 AM
Happy for a tin version

GW

turtle9er
02-06-2015, 03:59 AM
I am happy to wait for the gold plating, limited time this month to do much testing. Thanks again.

pictographer
02-06-2015, 06:05 AM
"please send me one of these next batch with tin plating"

I'm not picky either! :rolleyes:

jakorten
02-06-2015, 06:11 AM
@pictographer, so am I ;) pre-ordered a few already too.

WMXZ
02-06-2015, 07:29 AM
Happy to wait for the gold edition.
Walter

christoph
02-06-2015, 08:22 AM
please send me one of these next batch with tin plating

Cosford
02-06-2015, 08:30 AM
If you're going to have extra stock in prior to the release date, any chance of buying one of these early ones? I'd like to contribute to the testing process but wasn't on the list.

STAR297
02-06-2015, 10:33 AM
Yes, of course we're going to continue making Teensy 3.1. Teensy-LC doesn't make 3.1 obsolete.

A high-end board will also be coming at some point in the future. Right now, it's unclear if we'll wait for Cortex-M7 chips, or use one of the M4-based K22F chips.

I had planned to make both of these last year, but the audio library took much of 2014's engineering time!


Edit: However, the days of continuing to carry stock for the old Teensy 3.0 board are numbered. 3.1 is a replacement for 3.0. When the current stock runs out, probably near the end of 2015 at the slow rate it's selling, we'll probably discontinue 3.0.


Can you confirm with a yes or no if the Teensy3.1 platform can or can not be added to the Mbed platforms page so that owners of this board can use the Mbed compiler?
I'm sure many people would like to know.

Also Mbed has the K22F platform available now that can be configured to .hex output if you were to produce a K22F board.

syso2342
02-06-2015, 11:04 AM
I just received my Teensy-LC and I'm wondering which version of Teensyduino supports it.
Any start tips, Paul

GremlinWrangler
02-06-2015, 11:08 AM
The newest software and the list of libraries untested/confirmed working/needing fixes is
https://forum.pjrc.com/threads/27689-Teensy-LC-Beta-Testing

Constantin
02-06-2015, 11:19 AM
Can you confirm with a yes or no if the Teensy3.1 platform can or can not be added to the Mbed platforms page so that owners of this board can use the Mbed compiler?

I think the better question is why one would want to do that? There are plenty of compilers and IDE's out there for Teensyduino, including EmbeddedXCode, Eclipse, Atmel Studio, Arduino, etc. They all rely in one shape or the other on GCC, if memory serves. EmbeddedXCode also offers to work as a IDE for mbed, though I did not install that option, nor plan to. I have enough trouble programming for one platform! :p

Why don't you buy a Teensy 3 and see? The cost of admission is only $20.

Headroom
02-06-2015, 11:27 AM
Tin or gold. Whatever works best for PJRC.
I am honored to be on the list either way.

PaulStoffregen
02-06-2015, 11:29 AM
I believe this question is more about asking permission to do something? I'm not entirely sure. I believe I have an email or two about this in my inbox... and many more, pretty much every email from the last month that wasn't an urgent customer issue has been unanswered while I've been working on getting the Teensy-LC product released.

@STAR297 - Did you also email me directly? Or is this unrelated? I'm not entirely clear what's being asked.

Certainly, it's fine to add Teensy support to Mbed's tools (assuming you're associated with Mbed... right?)

syso2342
02-06-2015, 11:38 AM
3484

Here is an image of mine, btw :)
I will beta-test on the weekend.

jimmayhugh
02-06-2015, 02:00 PM
I'm willing to wait for the Gold Standard.

Frank B
02-06-2015, 03:13 PM
My LC arrived and is blinking.
Unbelievable that it is hand-soldered!

nevvkid
02-06-2015, 03:55 PM
About the VIN Information on http://www.pjrc.com/teensy/teensyLC.html
> the Spec tells > 3.3V only.

3485

But the Graphic and also the Board itself shows 5V VIN?

So @Paul & @Nantonos whats right?

PaulStoffregen
02-06-2015, 04:04 PM
> the Spec tells > 3.3V only.


Which specific spec? Perhaps you could say which document, page number, section and specific line you're reading?

My guess is you're looking at Freescale's datasheet, but perhaps not paying careful attention to which pins the spec applies. The VREGIN pin is the VIN power.

nevvkid
02-06-2015, 04:13 PM
Sorry i attached the screenshot from http://www.pjrc.com/teensy/teensyLC.html.
Spec = the Table you have on the site.

Thx

manitou
02-06-2015, 04:32 PM
i'm guessin' the LC has a VREGIN like the teensy 3's that can take 5v into the internal regulator. the MCU runs at 3.3v
Vin connects to VREGIN on teensy 3s.

nox771
02-06-2015, 04:44 PM
I can wait for the final board. My solder station is also packed away...

mortonkopf
02-06-2015, 04:50 PM
Paul, if a european mail out is happening, "please send me one of these next batch with tin plating" with anything coming over, and we can sort out cheaper mailing once over here. If no batch posting, I am happy to sit tight.

STAR297
02-06-2015, 05:17 PM
I believe this question is more about asking permission to do something? I'm not entirely sure. I believe I have an email or two about this in my inbox... and many more, pretty much every email from the last month that wasn't an urgent customer issue has been unanswered while I've been working on getting the Teensy-LC product released.

@STAR297 - Did you also email me directly? Or is this unrelated? I'm not entirely clear what's being asked.

Certainly, it's fine to add Teensy support to Mbed's tools (assuming you're associated with Mbed... right?)



I can see you have been very busy indeed Paul and yes it is regarding your permission to add support for the Teensy3.1, as you are happy for this to go ahead I will ask Mbed official to contact you directly. Which would be the best email address to use?

onehorse
02-06-2015, 06:13 PM
Brian, I know you are busy, but what is the prospect of a version of i2c_t3.h for the Teensy LC?

STAR297
02-06-2015, 07:03 PM
I'm not sure of the clock set up with this board (IRC or crystal and what frequency).

But regarding RTC functionality with the KLxx MCU's. If this series are clocked via external 32Khz crystal with correct set up, the RTC does function as normal but no battery back up is possible. That will result in loss of RTC time register values during power cycle, however the RTC does not get cleared on hard reset. Using this clock set up will give a slight reduction of power and deep sleep wake up timer will be more accurate as this can be configured on Xtal rather than IRC. In this mode you would expect to achieve approximately 3.5uA MCU power consumption with accurate RTC and wake up timer.

Another consideration is maximum serial baud rate is around 129k as the KLxx's are lacking a fractional board rate devisor function. , I have not checked this particular MCU, however.

nox771
02-06-2015, 08:06 PM
Brian, I know you are busy, but what is the prospect of a version of i2c_t3.h for the Teensy LC?

I'm waiting for a test board. Plan is to make the library compatible with it.

PaulStoffregen
02-06-2015, 09:28 PM
If this series are clocked via external 32Khz crystal with correct set up

Teensy-LC uses a 16 MHz crystal, which is necessary for a proper, low-jitter USB clock from the PLL.

Because neither the oscillator nor backup power are present, the on-chip RTC is basically worthless. I feel pretty strongly about setting reasonable expectations for microcontrollers, especially when promoting to hobbyists. You won't see PJRC saying Teensy-LC features RTC hardware, even though there is RTC digital logic on-chip, because it simply isn't usable.


maximum serial baud rate is around 129k as the KLxx's are lacking a fractional board rate devisor function

The maximum baud rate is 3 Mbit/sec on Serial1 and 1.5 MBit/sec on Serial2 & Serial3. All possible baud rates are integer division of those maximums. The fastest standard baud rates would be 230.4 kbit/sec on Serial1 and 115.2 kbit/sec on Serial2 & Serial3, with 0.16% error.

I have so far done all my serial port testing at 115200, communicating with a USB-serial cable based on a FTDI chip.

stevech
02-07-2015, 12:13 AM
the PLL frequency and subsequent dividers for other bus clocks can be adjusted to minimize the baud rate clocks, right? It's not about whether the crystal is 16MHz or ye ole no-PLL crystals at 14.7456MHz?

PaulStoffregen
02-07-2015, 04:28 AM
the PLL frequency and subsequent dividers for other bus clocks can be adjusted to minimize the baud rate clocks, right?

Yes, but doing so slows many other things too, and can cause some features to not be available.

For the USB to operate, the PLL must be 96 MHz. Teensy-LC lacks a programmable divider dedicated for the USB clock. The bus clock divider gets its input from the CPU clock, not directly from the PLL as on Teensy 3.1, and there's no separate clock for the flash memory, as Teensy 3.1 provides. Obviously those extra dividers are some of the non-essential stuff Freescale decided to remove to keep the chip size/cost lower.

Teensy-LC has much less flexibility than Teensy 3.1 to choose different settings, if you want all peripherals to work at best performance. For now, Teensyduino is only going to support 48 and 24 MHz CPU speed, both with 24 MHz bus clock. Duff is going to look at slower speeds, without USB, and I hope to add those at some point. But like Teensy 3.1, the slow speeds will probably be added to Teensyduino some time after the official release.

Of course, if you want solder a different crystal, or provide a 48 MHz external clock for the USB, or try any number of other settings, you certainly can. If you find some combination that works well for all or most peripherals (on the hardware as shipped by PJRC), I'd certainly consider adding it. But my focus is mainly on testing and porting all Arduino libraries, and going forward, adding more features many people want. I have an incredibly long list of those features, and supporting alternate settings in all libraries greatly increases the hours required to port so much code, so I'm going to focus only on 48 and 24 MHz for Teensy-LC.

Jerware
02-07-2015, 07:34 PM
I'm porting my Game Frame project over to Teensy, and Teensy LC could be perfect. I'm curious if you hope to have the following libraries working upon release...?

#include <SPI.h>
#include <EEPROM.h>
#include <Time.h>
#include <SdFat.h>
#include <Adafruit_NeoPixel.h>
#include <Entropy.h>
#include <Wire.h>
#include <DS1307RTC.h>

PaulStoffregen
02-07-2015, 08:10 PM
Take a look at the beta testing thread (https://forum.pjrc.com/threads/27689-Teensy-LC-Beta-Testing), to see what works, what doesn't work (yet), and what's on the list to be tested.

christoph
02-08-2015, 04:52 PM
I started porting the DMA SPI library to teensy LC, my code compiles but I'll have to wait for the board to start testing. The LC's SPIs are very different from the larger chips', but I think the overall scheme can remain the same.

Frank B
02-08-2015, 07:59 PM
Paul, do you plan to use the IOPORT interface for digitalWrite & read ?

PaulStoffregen
02-08-2015, 09:11 PM
The LC's SPIs are very different from the larger chips', but I think the overall scheme can remain the same.

Yup, the SPI is very different.

Another detail that's not perfectly clear in Freescale's documentation is that SPI0 is only standard buffered, but SPI1 has the FIFO feature.

If you access those last 2 registers on SPI0, you'll get a hard fault. They only exist on SPI1.

PaulStoffregen
02-08-2015, 09:12 PM
Paul, do you plan to use the IOPORT interface for digitalWrite & read ?

I do not understand this question.

Frank B
02-08-2015, 09:16 PM
excuse me...

"42.3 FGPIO memory map and register definition
The GPIO registers are also aliased to the IOPORT interface on the Cortex-M0+ from
address 0xF800_0000.
Accesses via the IOPORT interface occur in parallel with any instruction fetches and will
therefore complete in a single cycle. This aliased Fast GPIO memory map is called
FGPIO."

Are you using this feature ?

PaulStoffregen
02-08-2015, 09:22 PM
Are you using this feature ?

Yes!

Everything uses the CORE_PINxyz names, which resolve to those fast registers. Here's the code:

https://github.com/PaulStoffregen/cores/blob/master/teensy3/core_pins.h#L515

Of course, for fast I/O you must use digitalReadFast() and digitalWriteFast(). The versions without "Fast" are function calls and they emulate the AVR quirks. The "Fast" versions are inline code, optimized for speed!

PaulStoffregen
02-08-2015, 09:27 PM
Oh, except when I said "everything", there is one exception.

Deep inside the AVR register emulation code, when emulating the DDR registers, the normal IO registers are used. The fast IOPORT registers are not compatible with the Bit Manipulation Engine. For emulating the AVR DDR registers, which have atomic bit set and bit clear instructions on AVR processors, I used some trickery to remap to the BME, so I could faithfully emulate AVR's atomic bit set and bit clear without the overhead of interrupt disable and reenable.

phangmoh
02-09-2015, 02:50 AM
Paul,

I'm sorry if this is already answered somewhere in the thread.

Must/Can we assign the CS0 pin to another pin if the Serial2 is being used?
Must this CS0 be used as an output pin for the SPI0 to work?

Thank you.

PaulStoffregen
02-09-2015, 03:14 AM
Must/Can we assign the CS0 pin to another pin if the Serial2 is being used?


So far, all libraries supporting SPI on Teensy-LC use normal GPIO for chip selects. With normal GPIO, you can use any digital pin.

The Ethernet library is hard-coded to pin 10, and pin 9 for reset if using a W5200 ethernet chip. Serial2 and Ethernet can't work together.



Must this CS0 be used as an output pin for the SPI0 to work?


If you're used to AVR, pin 10 has to be in output mode, or remain high if it's input mode. Teensy-LC does not have that problem.

xxxajk
02-09-2015, 07:55 AM
Paul: I saw myself on the beta testing list... Nothing in the mail yet?

PaulStoffregen
02-09-2015, 08:04 AM
So far, only 10 beta have shipped.

6 more will ship on Monday, and maybe another 2 or 3 on Tuesday. Do you want one of those?

The rest should ship in about 1 week to 10 days. If you don't explicitly request an early board, you "default" to this last round.

christoph
02-09-2015, 08:07 AM
Yup, the SPI is very different.

Another detail that's not perfectly clear in Freescale's documentation is that SPI0 is only standard buffered, but SPI1 has the FIFO feature.

If you access those last 2 registers on SPI0, you'll get a hard fault. They only exist on SPI1.

Huh? I understand that SPI0_C3 doesn't exist, but the register before that is SPI0_CI (clear interrupt reg) and that should certainly exist. So what do you mean by "those last two registers"?

xxxajk
02-09-2015, 08:10 AM
If it helps you, and takes the pressure off, I can wait the extra week.
As you are probabbly aware, I am pretty deep in the USB code here.

While I got a chance to mention it, please consider this modification to boards.txt.
https://forum.pjrc.com/threads/27583-boards-txt-disable-USB-on-teensy-3-x
Once I get a no usb option, more can be done with USB directly.


Thanks :-)

PaulStoffregen
02-09-2015, 08:40 AM
Huh? I understand that SPI0_C3 doesn't exist, but the register before that is SPI0_CI (clear interrupt reg) and that should certainly exist.

The CI register doesn't exist on SPI0. Those interrupt conditions are all associated with the FIFO feature.

In standard buffer mode, the SPI0_S register has the interrupt flag. CI doesn't exist, because only 2 types of events can trigger an interrupt without the FIFO.

But in either mode, SPI interrupts are pretty much worthless, unless you're using a very slow bitrate. DMA looks like it could be quite useful, but for DMA usage you'd get the interrupt from the DMA controller, not the SPI.

Dirty Engineer
02-09-2015, 03:17 PM
Can any of the product testers enlighten me as to what the two circular pads above pins 1&2 on the bottom side of board are connected to?
http://i.imgur.com/7mVJU1p.jpg

PaulStoffregen
02-09-2015, 03:28 PM
Those are test points, which we use while testing the board and programming the bootloader.

Here's a page I wrote a couple years ago, about the test fixture for Teensy 3.0.

https://www.kickstarter.com/projects/paulstoffregen/teensy-30-32-bit-arm-cortex-m4-usable-in-arduino-a/posts/305527

As you can see in the photos, several extra test pins are located in the center, which touch similar pads on the bottom side of Teensy 3.0. For Teensy-LC, we've made a very similar test fixture. Because Teensy-LC is a simpler board, only 2 special test pads are needed.

Dirty Engineer
02-09-2015, 03:42 PM
Thank you Paul. Truly wonderful documentation. I'm very excited for the release of the LC.

PaulStoffregen
02-09-2015, 10:49 PM
Here's a photo of the tester for Teensy-LC. :)

3512
(click for full size)

If you look closely, you can probably see a 3rd test point close to pin 0 was originally planned. It turned out to not be necessary.

Dirty Engineer
02-09-2015, 11:05 PM
Are those pogo pins hand soldered or reflowed? So clean.

Also, how often does the Red LED light? I'm assuming the failure rate is quite low.

jakorten
02-10-2015, 04:49 PM
Interesting Paul those pogo pins. I just ordered a bunch some weeks ago to do the opposite. Soldering them to a Teensy and then use them to test the boards that I will mount the Teensies on.

Found out that DX.com has them for a crazy low price b.t.w.

tlb
02-12-2015, 01:38 AM
Got Robin's email and started looking up about this part. Have been busy figuring out the one path for resource allocation to add position latching with my Teensy 3.1's and not doing much Forum monitoring.

Got a hold of the Freescale documentation and read:


All TPM modules in the
device are configured only as basic TPM function, do not support quadrature decoder
function,


Looks like I will have to add 'Teensy 3.x Only' to my code. :(

TLB

MickMad
02-12-2015, 08:11 AM
Hey there,

I woke up this morning and I found Robin's email.

I really thank you for considering me as part of this beta testing; I'm probably late, but I can wait for the green boards; I wouldn't have the time to thoroughly test the beta so I won't be of much help with early beta testing, but I really cannot wait to test the new Teensy LC with a project I'm currently working on, those 8 PWM outputs look very promising for what I have in mind!

And, dude, the cost of the LC is crazy.

Again, thank you very much, I can't wait to test this baby :D

PaulStoffregen
02-12-2015, 09:08 PM
Looks like I will have to add 'Teensy 3.x Only' to my code. :(


Yeah, many of the other peripherals also have only their basic functions.

Really, it's pretty amazing how many special and really nice extra features are packed into Teensy 3.1's peripherals!

PaulStoffregen
02-12-2015, 09:30 PM
The final green boards with gold plating just arrived. Erin is hand soldering right now! We'll be sending all the rest of the early boards over the next week (Feb 16-20).

KurtE
02-15-2015, 11:11 PM
For the fun of it, I started trying to figure out which Teensy Arduino pins connect to which pins on the underlying processor as to get an idea if there are possibilities for using different pins for some things. Example if I wish to use SPI1 and USART0 which by the cheat sheet both use Pins 0 and 1.

So hopefully figuring out the pin mapping:
(B16, B17, D0, ...) and using the pin mapping table in the PDF, I think we have:
3544
Note: It took me awhile to import text of pdf to excel so very possibly I have some data slightly off.
But if this is correct, it does look like UART0 could go to pins 3,4
And it looks like at least parts of SPI1 can be remapped as well.

Probably should just experiment.

Kurt

Edit: Card should also show that the CS0 on pin 6 is for SPI1

neslekkim
02-16-2015, 11:46 AM
The final green boards with gold plating just arrived. Erin is hand soldering right now! We'll be sending all the rest of the early boards over the next week (Feb 16-20).

Are all Teensy's handsoldered?

Robin
02-16-2015, 03:11 PM
Are all Teensy's handsoldered?

No. The initial round of Teensy-LC boards have been hand soldered so that test can happen before the production run is complete.

KurtE
02-16-2015, 03:19 PM
I was still playing around with my Excel document for how Teensy pins map, to see Alternatives if I have two things I want that by default are on the same pin.
3552

I started to play with marking PWM ones on the chart, which are probably the TPMn_n like values. (should verify again in manual), I got up to where
Teeny LC pin 21 is parked as PWM on the cheat sheet, but not sure it maps?
I believe is the processor pin D6, which I think is on pin 47 of the QFN48 chip and I don't see anything... ?

jakorten
02-16-2015, 03:20 PM
Robin, if you have any Teensies hand soldered I would be happy to help testing. Ordered 4 last week already (apart from the 3.1).

neslekkim
02-16-2015, 03:30 PM
No. The initial round of Teensy-LC boards have been hand soldered so that test can happen before the production run is complete.

Ah, I was wondering since Paul said the final green boards was beeing soldered, so I thought they where final..
So if we pre-order now, we are going to get the ones from production when everything is done, right?

PaulStoffregen
02-16-2015, 08:00 PM
Ah, I was wondering since Paul said the final green boards was beeing soldered, so I thought they where final..


This last round of hand soldered boards are using the final PCBs. The prior 2 rounds used prototypes we had made at OSH Park and Sunstone, so the PCB is physically different material.

All the early boards are hand soldered, which takes an enormous amount of manual labor. Erin has done most of it. I did a little on the first several. We're only building just enough for everyone on the list at the beginning of this thread. Everyone on that list has contributed greatly at some point within the last several months, answering questions or writing libraries or testing and giving really useful feedback on early beta software. Robin and I really wanted to do something special for everyone who's contributed so much.... so we got extra protos from OSH Park & Sunstone, and put the labor & shipping into getting the early boards made.



So if we pre-order now, we are going to get the ones from production when everything is done, right?

Yes, absolutely. All pre-order boards will be from the normal production.

If you want one as soon as possible, definitely get a pre-order in. Those will all ship first.

christoph
02-19-2015, 08:43 PM
What is written below may sound silly, but...

Whoa! I just discovered that I can track packages from you. Awesome. I just never tried it before, because the mail simply says "The customs bar code ID on your package is ...". But it's a USPS tracking number. So my LC is in germany already, waiting for someone to carry it to my door. Can't wait!

jakorten
02-19-2015, 08:45 PM
Sending Teensies to Europe always goes very well from PJRC is my experience indeed ;) didn't know about tracing either!

Will you happen to be at Embedded World Nürnberg next week christoph, a friend and I will go there on wednesday!

Robin
02-19-2015, 08:50 PM
What is written below may sound silly, but...

Whoa! I just discovered that I can track packages from you. Awesome. I just never tried it before, because the mail simply says "The customs bar code ID on your package is ...". But it's a USPS tracking number. So my LC is in germany already, waiting for someone to carry it to my door. Can't wait!

International tracking has improved quite a lot over the last year. Some countries better than others with tracking/delivery. It's good to hear Germany is on the list of countries with better tracking.

jakorten
02-19-2015, 08:54 PM
Isn't that on the USPS side Robin? I can also see my Teensies 3.1 have departed from the US yesterday. Will try to see if that also works within NL.

Update: nope, doesn't work in NL yet. Guess we should have just have stayed German territory after all in 1945 ;)

christoph
02-19-2015, 08:54 PM
@jakorten no, don't think so. I'll have a fluid mechanics exam on tuesday, and during the next two weeks I'll have to see how 260 students tried to pass. Besides, my employer wouldn't pay for that trip.

jakorten
02-19-2015, 08:59 PM
Too bad :) So you are also a teacher or doing a course beside your job. I fortunately have no lectures to give on wednesday so take one of my former students with me. We have a startup and use Teensies a lot in our products (still in prototype stage but coming along, other students will be using it the next couple of months for research). We will use the LC too in a sensor module.