|
Post by feathersmcgraw on Sept 27, 2018 10:20:14 GMT
So I'm trying to run some APA102 LEDs through FastLED on a TC275_Dx. I've downloaded the 3.1.3 version of the FastLED library for the TC275
I'm using SPI channel zero, so I add LEDs like this:
FastLED.addLeds<APA102, 63, 62, COLOR_ORDER>(leds, NUM_LEDS);
However, when I compile, I get these particular warnings (amongst others): _____
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/platforms/aurix/fastpin_aurix.h:7:2: warning: #warning "Software pin support forced, pin access will be slightly slower." [-Wcpp]
#warning "Software pin support forced, pin access will be slightly slower."
_____
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/FastLED.h:562:2: warning: #warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info." [-Wcpp]
#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info."
_____
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/fastspi.h:125:23: note: #pragma message: Forcing software SPI - no hardware SPI for you!
# pragma message "Forcing software SPI - no hardware SPI for you!"
_____
The sketch compiles and it works, but as expected, the refresh rate of the LEDs is much slower than it should be because the board is using-bit bashed SPI, which is limited to 8Mhz. I tried diving into the library and defining the pins, but this didn't help
I got this board specifically for its ability to do 40MHz SPI and drive many LED strips. How can I fix this problem?
|
|
|
Post by Admin on Sept 27, 2018 11:00:42 GMT
Try using pin 11 for data and 13 for the clock. Then in FastLED.h, comment out:
#define FASTLED_FORCE_SOFTWARE_SPI #define FASTLED_FORCE_SOFTWARE_PINS
|
|
|
Post by feathersmcgraw on Sept 27, 2018 15:15:41 GMT
If I make those changes and no others, I get no output on my LEDs. (I can see from debug output that the code running the LEDs is still working, but the data is not being output correctly.)
I now also get different warnings: _____
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/FastLED.h:562:2: warning: #warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info." [-Wcpp]
#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info." _____
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/fastspi.h: At global scope:
C:\Users\artav\Documents\Arduino\libraries\FastLED-3.1.3_TC275/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output" _____
The warning about pin/port mappings is repeated many times for includes in many different files. (As before, there are also lots of other warnings about casts and macro redefinitions)
|
|
|
Post by Admin on Sept 27, 2018 15:33:12 GMT
OK, we will check this!
|
|
|
Post by feathersmcgraw on Oct 1, 2018 19:00:14 GMT
Hi, any progress on this one?
|
|
|
Post by Admin on Oct 2, 2018 7:09:28 GMT
We are still working on this! We are implementing a proper SPI driver for the FastLED dotstar. BTW: The Adafruit dotstar driver included with the ShieldBuddy does use the hardware SPI. The Adafruit Neopixel driver also the GTM hardware.
|
|
|
Post by crypticspoon on Oct 2, 2018 15:21:17 GMT
Hello feathersmcgraw, How fast do you want to refresh these LEDs at? The limit these LEDs can be pushed at is around 24MHz and this number decreases when the the number of LEDs in the strip increases. Is it possible you could give me an idea of what you are trying to do? I do have a library which uses the hardware SPI but it has not been integrated with the fast LED library yet. You could also use the Arduino style library for the APA102 with the shieldbuddy.
|
|
|
Post by feathersmcgraw on Oct 3, 2018 11:09:15 GMT
Hello,
First, thanks to Admin for looking into the SPI driver. I really appreciate it.
crypticspoon, looking at it, I can probably just use my Teensy 3.6 for 24MHz for now, but having FastLED be fully functional on the Shieldbuddy would be useful for future, for running other process on the side. I'm developing POV applications, so I'm basically wanting to drive the LEDs as fast as possible. I'll look into the APA102 library as well, thank you.
|
|
|
Post by crypticspoon on Oct 3, 2018 12:04:21 GMT
Hi feathersmcgraw, I understand that you want to run the LED's as fast as possible but as I said before the more LED's in the strip/matrix the slower the LEDs can be driven. I have done some testing with a strip of 50 APA102 LED's and the maximum refresh rate of the LED's were about 16.667MHz. I did this test with a dotstar library which can run the SPI at 25MHz but when the SPI was ran at 25MHz or even 20MHz the LED's did not work correctly So this is something to keep in mind. Do you need any particular functions from the fastLED library or are you using it to get the fastest SPI data rate for the LED's?
|
|