marcmerlin
Well-known member
This one makes no sense:
1) my code only works if I upload other code before that also talks to my neomatrix, let's say
https://github.com/marcmerlin/Adafr...ster/examples/MatrixGFXDemo/MatrixGFXDemo.ino
this one talks to adafruit's neopixel code.
I upload, that code works.
Then, I upload my new code that uses FastLED instead (just wrote it):
https://github.com/marcmerlin/FastLED_NeoMatrix/blob/master/examples/MatrixGFXDemo/MatrixGFXDemo.ino
and it works, well kinda. It will sometimes be very slow and take 1 sec for each fastled::show() to run . Other times it runs at full speed and I haven't pinned down why or how yet.
2) if I power cycle the teensy 3.1 or 3.2, the code hangs on
Matrix Size: 16 16
Num Pixels: 256
malloc size: 768
If the code crashes here, decrease the brightness or turn off the all white display below
Basically it hangs just before the very first show() command.
Although more testing showed that maybe it doesn't hang, but just takes a very very long time, like maybe 1mn or more for each show() command to work.
To get out of that state, I upload another neopixel sketch and then upload my code again, and it works full speed until the next power cycle.
3) if I upload other basic test fastled code, it seems to work ok.
4) I tried to change the speed from 96Mhz to others, but it doesn't fix the show() hang. I also tried optimize fast/faster/fastest and it didn't seem to help either.
I'm just stumped.
Any idea how I can debug further?
Thanks
"/var/local/arduino-1.8.5-teensyduino-1.41/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O1 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=141 -DARDUINO=10805 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/var/local/arduino-1.8.5-teensyduino-1.41/hardware/teensy/avr/cores/teensy3" "-I/home/merlin/Arduino/libraries/Adafruit-GFX-Library" "-I/home/merlin/Arduino/libraries/FastLED_NeoMatrix" "-I/home/merlin/Arduino/libraries/FastLED" "/tmp/arduino_build_896572/sketch/MatrixGFXDemo.ino.cpp" -o "/tmp/arduino_build_896572/sketch/MatrixGFXDemo.ino.cpp.o"
In file included from /home/merlin/Arduino/libraries/FastLED_NeoMatrix/FastLED_NeoMatrix.h:31:0,
from /home/merlin/Arduino/libraries/FastLED_NeoMatrix/examples/MatrixGFXDemo/MatrixGFXDemo.ino:6:
/home/merlin/Arduino/libraries/FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.007
# pragma message "FastLED version 3.001.007"
1) my code only works if I upload other code before that also talks to my neomatrix, let's say
https://github.com/marcmerlin/Adafr...ster/examples/MatrixGFXDemo/MatrixGFXDemo.ino
this one talks to adafruit's neopixel code.
I upload, that code works.
Then, I upload my new code that uses FastLED instead (just wrote it):
https://github.com/marcmerlin/FastLED_NeoMatrix/blob/master/examples/MatrixGFXDemo/MatrixGFXDemo.ino
and it works, well kinda. It will sometimes be very slow and take 1 sec for each fastled::show() to run . Other times it runs at full speed and I haven't pinned down why or how yet.
2) if I power cycle the teensy 3.1 or 3.2, the code hangs on
Matrix Size: 16 16
Num Pixels: 256
malloc size: 768
If the code crashes here, decrease the brightness or turn off the all white display below
Basically it hangs just before the very first show() command.
Although more testing showed that maybe it doesn't hang, but just takes a very very long time, like maybe 1mn or more for each show() command to work.
To get out of that state, I upload another neopixel sketch and then upload my code again, and it works full speed until the next power cycle.
3) if I upload other basic test fastled code, it seems to work ok.
4) I tried to change the speed from 96Mhz to others, but it doesn't fix the show() hang. I also tried optimize fast/faster/fastest and it didn't seem to help either.
I'm just stumped.
Any idea how I can debug further?
Thanks
"/var/local/arduino-1.8.5-teensyduino-1.41/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O1 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=141 -DARDUINO=10805 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/var/local/arduino-1.8.5-teensyduino-1.41/hardware/teensy/avr/cores/teensy3" "-I/home/merlin/Arduino/libraries/Adafruit-GFX-Library" "-I/home/merlin/Arduino/libraries/FastLED_NeoMatrix" "-I/home/merlin/Arduino/libraries/FastLED" "/tmp/arduino_build_896572/sketch/MatrixGFXDemo.ino.cpp" -o "/tmp/arduino_build_896572/sketch/MatrixGFXDemo.ino.cpp.o"
In file included from /home/merlin/Arduino/libraries/FastLED_NeoMatrix/FastLED_NeoMatrix.h:31:0,
from /home/merlin/Arduino/libraries/FastLED_NeoMatrix/examples/MatrixGFXDemo/MatrixGFXDemo.ino:6:
/home/merlin/Arduino/libraries/FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.007
# pragma message "FastLED version 3.001.007"