PDA

View Full Version : Teensyduino 1.18 Release Candidate #2 Available



Paul
01-05-2014, 06:51 AM
Here is a second release candidate for Teensyduino 1.18.


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html



Please give this a try and report any bugs. Try to include a sample program that reproduces the problem!


Here's a list of the changes since Teensyduino 1.18-rc1:


Speed up SD library
Fix upload > 128k on Teensy 3.1

stevech
01-05-2014, 07:07 AM
OK! new loader fed micropython to T3.1 and it runs. early alpha, indeed!
thanks

manitou
01-05-2014, 11:11 AM
So channel fix for VREF on teensy 3.1 didn't seem to get fixed? Previously described here
http://forum.pjrc.com/threads/24691-teensy-3-1-bug-and-vref

Bill Greiman
01-07-2014, 02:58 PM
Serial.available() seems to have a bug.

If you do a Serial.read() with no data available, read returns -1 as expected but then calls to Serial.available() return non-zero.

This example:


void setup() {
Serial.begin(9600);
while(!Serial);
}
void loop() {
Serial.println(Serial.available());
Serial.read();
delay(1000);
}


Prints these results for Serial.avalable().


0
57344
49152
40960
32768
24576
16384
8192
0
57344
49152
40960
32768
24576
16384
8192

stevech
01-07-2014, 05:33 PM
the list of numbers from Serial.available() are decreasing by 8192 per call. A clue?
I wouldn't think that the ISR/driver is able to buffer 57344 (0xE000) bytes. That's a multiple of 8192 (0x2000)

sumotoy
01-08-2014, 12:00 AM
I'm experiencing some weird Serial problem too. Yesterday I simply cannot get any printout. Btw, I never get consistent printout from Setup on Teensy3, forced me to linkup an LCD from long time, but I almost get working inside the Loop. With this last version I got printouts only with very simple sketches but on several projects I cannot get any printout at all. Tomorrow I try to figure out what breaks out.
Win7/64, Teensy3,0. Ide 18/rc2

el_supremo
01-08-2014, 01:24 AM
Do you wait for the port to open - like this:


Serial.begin(9600);
// wait for the port to open
while(!Serial);
// wait for 2 seconds just to make sure
delay(2000);


Pete

stevech
01-08-2014, 03:08 AM
I've not had troubles with Serial.print or Serial1.print on T3.1

sumotoy
01-08-2014, 12:10 PM
Do you wait for the port to open - like this:


Serial.begin(9600);
// wait for the port to open
while(!Serial);
// wait for 2 seconds just to make sure
delay(2000);


Pete

Hi Pete,
this never fully worked from the ancient time so I simply forget any printout in setup. Maybe it's something related to my 2xWin/64 computers but as I said now serial not always works even in Loop and any Wait,Delay solutions not helped. It's strange because the arduinos laying around my table all working (even in setup). Maybe driver get messed up during upgrade?

sumotoy
01-08-2014, 12:46 PM
I find a solution apparently... I got another serial problem in an application I wrote in Java time ago and after some quick research I discovered that I'm actually run Java 32 bit on a 64 bit machine. I installed 64 bit version and magically I solved the serial problems.
On the other computer the same story but I still not deinstalled Java because I want to understand why it affects some serial communication and not all.

Edit: oops! Too early!

Adding while(!Serial); in setup worked a couple of times but now the While loop seems stucked in an infinite loop and sketch not start.

sumotoy
01-09-2014, 03:57 AM
Deinstalled completely Java, cleaned all registers, cleaned folders with Java crap. Installed the correct 64 bit version... And finally now works as it should. Damn beans!
A question, Arduino IDE uses Java, it's possible to use an external java or the arduino one has something special?

stevech
01-09-2014, 05:19 AM
Curious or bug:
Teensy 3.1

with

void setup() {
delay(5000);
Serial.begin(9600);
Serial.print(Serial == 0);
}
and using the serial monitor in the Arduino IDE, the Serial == 0 print shows 0.
Same code, connect to COM16 via a dumb terminal emulator, not the IDE's serial monitor, the same Serial == 0 print shows 1.

In either case, the following loops forever, no matter the delay, no matter if it's in setup() or loop(), no matter which terminal display program is used.


while (!Serial)
;

I've just used a delay several seconds to give me time to open the desired terminal display (IDE or external).
Probably better to just loop and read one character from Serial before proceeding from startup. Do so in loop().

Avenue33
01-30-2014, 05:40 PM
Hi!

I'm experiencing issues with uploading to the Teensy 3.0 and 3.1 boards with Teensyduino 1.18 RC2 on OS X 10.9 Mavericks.

I dug into the Java code and managed to assemble those two functions:

$ /Applications/Teensyduino.app/Contents/Resources/Java/hardware/tools/teensy_post_compile -file=sketch_jan30a.cpp -path=/var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build7991789148304455895.tmp/ -tools=/Applications/Teensyduino.app/Contents/Resources/Java/hardware/tools/

$ /Applications/Teensyduino.app/Contents/Resources/Java/hardware/tools/teensy_reboot -v -v -v -v -pmk20dx128 -chalfkay -P/dev/cu.usbmodem1411 -b12000000 -D -Uflash:w:/var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build7991789148304455895.tmp/sketch_jan30a.cpp.hex:i


Is there something missing?

Based on the blink example,
• When I connect the Teensy 3.0 or 3.1 board to the second USB port, port remains unchanged at /dev/cu.usbmodem1411 while it should be /dev/tty.usbmodem1421

• When I perform a ls /dev/tty.usb*, I obtain /dev/tty.usbmodem20561 not /dev/cu.usbmodem1411 or /dev/tty.usbmodem1421.

Thank you!

BJB
02-02-2014, 08:25 PM
Known problems with Teensyduino 1.18-rc2 installer on WinXP? Attempted both before and after removal of previous version.

Installer does not allow continue after the Choose Location step.

Perhaps just have a corrupted download.

EDIT:
Never mind - more windoze weirdness fixed after a few reboots. Having to develop w/Win is getting tiresome - hopefully an errant Mac truck will flatten me long before the boss makes me go to .net.

sumotoy
02-03-2014, 02:49 AM
Curious or bug:
Teensy 3.1

with

void setup() {
delay(5000);
Serial.begin(9600);
Serial.print(Serial == 0);
}
and using the serial monitor in the Arduino IDE, the Serial == 0 print shows 0.
Same code, connect to COM16 via a dumb terminal emulator, not the IDE's serial monitor, the same Serial == 0 print shows 1.

In either case, the following loops forever, no matter the delay, no matter if it's in setup() or loop(), no matter which terminal display program is used.


while (!Serial)
;

I've just used a delay several seconds to give me time to open the desired terminal display (IDE or external).
Probably better to just loop and read one character from Serial before proceeding from startup. Do so in loop().

So I'm not the only one going mad with serial issues! I've experimented the same thing (with exact results) and was suprised that none has similar issues. It's frustrating since I use serial mostly for debugging and those long delays for startup Serial (that NOT always works) are boring since Teensy3 it's blazing fast during uploading and a snail during startup, thanks for those not wanted delay and while loops. I have also troubles when have to debug a library with serial, most of the time I can succesfully debug only the part of the code that runs in loop but never the initializations, etc. that happen in setup, even if I use those long delays and while stuff.
My only way to get a reliable serial connection:

while (!Serial)
;
but have to wait some seconds before open Terminal and I'm forced to open terminal aniway otherwise it just hang in while loop, all this with preview1 and all older ones, still not tried this one but I'm sure it will be the same.
Did you know if the other serial out has the same issues? I mean, working immediately without delays, while loop and whatever...
This is my only issue with Teensy3 and 3.1 so far, I love it, it's tiny, powerful, marvellous designed and first class supported but serial out it's a big no, no, no.

stevech
02-03-2014, 03:10 AM
the hang in
while !Serial() ;

is intermittent, for me. Most often works properly.

It may be related to another discussion here where it is said that some host computer operating systems, some of the time, take too long to respond to the new connection establishment protocol exchanges.

pictographer
02-03-2014, 05:00 AM
I solved my Teensy 3.0 serial intermittent connection issues by not using the Arduino built-in serial monitor. Instead I use cu, screen, or Putty. The only minor annoyance is that I can't upload new code while a serial session is active, but it's quick enough to disconnect, upload, and reconnect. I work on OS X Mavericks, Linux, and Windows 7.

stevech
02-10-2014, 05:23 PM
On windows, the terminal program called "Bray's terminal", has a user option to automatically close/reopen the serial port when the window focus comes/goes. So when you click away on some other window, it closes the port, and vice-versa.

kam42
02-11-2014, 12:57 AM
Speed up SD library


Quick question - are those SD speed ups patched in to the standard SD library? I know it's a long shot, but do you have a general idea of how it compares to the 'stock' SD library and/or the SD fat library? Perhaps I'm missing a post somewhere, if so, I'd love a spin in the right direction.

Thanks!

Epyon
05-12-2014, 01:03 PM
Known problems with Teensyduino 1.18-rc2 installer on WinXP? Attempted both before and after removal of previous version.

Installer does not allow continue after the Choose Location step.
I had this problem too (Win7 64). Reinstalling the Arduino IDE fixed it.