PDA

View Full Version : Teensyduino 1.39 Released



Paul
09-06-2017, 12:07 PM
Teensyduino 1.39 has been released.

https://www.pjrc.com/teensy/td_download.html

No changes were made since 1.39-beta2.

christoph
09-17-2017, 11:46 AM
I'm working on an update for DMASPI to work with the refactored SPI classes.

nox771
09-20-2017, 06:06 AM
Just FYI, please pull a new i2c_t3 release to include for your next TD version. There have been a few bug fixes since the version included in TD 1.39. Here is the link:
https://github.com/nox771/i2c_t3
(https://github.com/nox771/i2c_t3)

PaulStoffregen
09-20-2017, 10:42 AM
Just FYI, please pull a new i2c_t3 release to include for your next TD version.

Done, and I just sent you a pull request for the 1 tiny customization that was in my copy.

nox771
09-20-2017, 03:40 PM
Done, and I just sent you a pull request for the 1 tiny customization that was in my copy.

I merged this. GitHub and forum download are updated.

christoph
09-20-2017, 09:17 PM
DMASPI was updated and tested on a T3.6 (SPI0 and SPI1). Thank you for creating a common base for the SPIs, Paul!

PaulStoffregen
09-20-2017, 10:51 PM
Kurt actually deserves most of the credit for unifying the SPI classes! :)

christoph
09-21-2017, 05:54 PM
It only took about two years to convince you: https://forum.pjrc.com/threads/28155-Why-is-SPI1-an-extra-class?p=68641&viewfull=1#post68641

Would probably be longer if this was standard arduino...

defragster
09-23-2017, 10:18 PM
EventResponder::runFromYield(); in yield breaks standing use of replacing/removing the 'weak' yield() to keep Teensy Bare Metal.

Minimal-Blink-fails-with-void-yield() (https://forum.pjrc.com/threads/46442-Minimal-Blink-fails-with-void-yield())

christoph
09-24-2017, 11:19 AM
Patched yield() declaration (https://github.com/PaulStoffregen/cores/commit/2d7cf7acddd4d2d5fcf7e13fe98c3f8b8151bf81) also helps with the Zilch library (cooperative multitasking).

dundakitty
09-26-2017, 12:49 PM
I just tried to use SPI1 on a teensy 3.2. The compile failed with "SPI1 was not declared in this scope". If I compile as a Teensy 3.6, 3.5, or LC the compile completes. The compile fails on teensy 3.0 and 3.2/3.1. Doesn't the 3.2 have the second SPI hardware?

MichaelMeissner
09-26-2017, 12:59 PM
I just tried to use SPI1 on a teensy 3.2. The compile failed with "SPI1 was not declared in this scope". If I compile as a Teensy 3.6, 3.5, or LC the compile completes. The compile fails on teensy 3.0 and 3.2/3.1. Doesn't the 3.2 have the second SPI hardware?

No, the Teensy 3.1/3.2 only has 1 SPI bus. The LC has 2 SPI buses and the 3.5/3.6 have 3 SPI buses. Note, on the 3.5/3.6, only the first SPI is buffered, which means you might want to put high speed devices only on the first bus.

On the LC/3.5/3.6, the standard 2nd SPI bus uses pin 0 for MOSI1 (pin 21/A7 is the alternate MOSI1) and pin 1 for MISO1 (pin 5 is the alternate MISO1).

The MISO2/MOSI2 pins are on solder pads underneath the Teensy 3.5/3.6.

KurtE
09-26-2017, 01:01 PM
As far as I know the T3.2 does not have a second SPI port. If you look at the card that comes with the board you will notice that the SPI pins (11, 12, 13) are simply marked as DIN/DOUT/SCK...

Where as on for example on the T3.5 they are marked as MOSI0, MISO0, SCK0. Note: the naming of the pins sort of changed from DOUT->MOSI (Data Out --- Master Out Slave IN)
DIN->MISO (Data In --- Master In Slave Out)

dundakitty
09-26-2017, 01:37 PM
Thanks, I was trying to use 11, 12, 13 as SPI and 7,8,14 as SPI1. Guess it's a single SPI but alternate pins.

MichaelMeissner
09-26-2017, 01:44 PM
Thanks, I was trying to use 11, 12, 13 as SPI and 7,8,14 as SPI1. Guess it's a single SPI but alternate pins.

Yes, that is correct.

mjs513
10-02-2017, 10:07 PM
Know 1.40 is out but I just downloaded the lastest fastLED library and it threw an error for the T3.5 (see below). I deleted it and used the one downloaded with TD1.39 and it worked fine again. Just wanted to give you all a heads up.


In file included from C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/FastLED.h:51:0,

from C:\Users\CyberPalin\Documents\Arduino\TeensyOpenMV 2\TeensyOpenMV2.ino:10:

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/fastpin.h: In instantiation of 'class FastPin<31u>':

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/platforms/avr/clockless_trinket.h:96:49: required from 'class ClocklessController<31u, 39, 39, 77, (EOrder)10u, 0, false, 10>'

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/chipsets.h:460:7: required from 'class WS2811Controller800Khz<31u, (EOrder)10u>'

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/FastLED.h:110:52: required from 'class WS2811<31u, (EOrder)10u>'

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/FastLED.h:297:39: required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2811; unsigned char DATA_PIN = 31u; EOrder RGB_ORDER = (EOrder)10u]'

C:\Users\CyberPalin\Documents\Arduino\TeensyOpenMV 2\TeensyOpenMV2.ino:98:56: required from here

C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED/fastpin.h:206:2: error: static assertion failed: Invalid pin specified

static_assert(validpin(), "Invalid pin specified");

^

PaulStoffregen
10-03-2017, 12:35 PM
Know 1.40 is out but I just downloaded the lastest fastLED library and it threw an error for the T3.5 (see below).

I tried just now, but I was unable to reproduce the problem. Since I don't have TeensyOpenMV2.ino, I opened FastLED's DemoReel100 example. I selected Teensy 3.5 and left all the settings at their defaults.

Here's a screenshot, using Arduino 1.8.5 and Teensyduino 1.40-beta2.

11685

mjs513
10-03-2017, 01:04 PM
Thanks for checking Paul. I had two copies of FastLED, one in my Arduino Lib folder and one in the Teensy libraries that I downloaded with TD. The revision of both (library.properties) is at 3.1.6. Then I get the message (with both installed):

Multiple libraries were found for "FastLED.h"
Used: C:\Users\CyberPalin\Documents\Arduino\libraries\Fa stLED
Not used: C:\Local Programs\arduino-1.8.5\hardware\teensy\avr\libraries\FastLED
Error compiling for board Teensy 3.5.

When I deleted the copy in the Arduino libraries folder it worked fine. Not sure why this would happen. But anyway, TeensyOpenMV is too big to send so I copied the FastLED stuff from it to its own sketch and was able to reproduce the problem (using 1.85/1.40 now) if I had the two libs installed since it only uses one or the other.

Just by way of an update the version that I downloaded via the library manager in the IDE is the problem. The version that is part of the TD works fine. (Just tested as I was writing this).


#include <FastLED.h>

Thanks
Mike

//Malek Systems RGB LED WS2812B
#define DATA_PIN 31
#define NUM_LEDS 8
#define BRIGHTNESS 64
CRGB leds[NUM_LEDS];

void setup() {
//LED Setup
delay(2000);
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.setBrightness( BRIGHTNESS );

for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
// Turn our current led on to white, then show the leds
leds[whiteLed] = CRGB::White;
// Show the leds (only one of which is set to white, from above)
}
FastLED.show();

}

void loop() {
// put your main code here, to run repeatedly:

}

PaulStoffregen
10-07-2017, 08:45 PM
Thanks for confirming. I'm taking this one off my issues list. :)