1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

rpi3/ws2812b/spi - ws2812x-spi... not working

Discussion in 'Software Support' started by tangophi, 17 July 2018.

  1. tangophi

    tangophi New Member

    Messages:
    5
    Hardware:
    RPi3
    I had a rpi2 based OSMC setup with ws2812b LEDs before. The LEDs were connected to GPIO18 and everything was working fine.

    Recently, I upgraded to a rpi3 and now with a similar setup as before, I cannot get hyperion to work.

    https://hyperion-project.org/wiki/3-Wire-PWM
    https://www.recalbox.com/blog/en/post/blog-2017-11-10-hyperion/

    i also tried the above configurations - one is using GPIO18, the other GPIO10. I used the latest hypercon utility to configure. I selected ws2812x-spi as the LED type. And when the LEDs are connected to GPIO10, i see the LEDs light up when hyperion is started. But all the LEDs are white and the colors dont change at all even when i try to set the color manually through the hypercon utility. I restarted rpi3 several times, but no luck. I also made sure dtparam=spi=on was set correctly in /boot/config.txt.

    Here is the thing. INitially i though there could be some junk coming out of GPIO10 and it was setting all the LEDs to white. But when i change the number of LEDs, then only those number of LEDs are lit up. Hence, i believe some data is coming out of GPIO10 properly, but i am at a loss to find out why the colors are not changing. Btw, i checked the LEDs are okay by connecting them to an Arduino.

    Thanks in advance for any help. I have already searched all possible links on the net and in the hyperion forums, but havent found anything useful.

    I had also tried using a level shifter to see if helps, but it hasnt.
     
  2. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Have you forced the core clock to be stable ?

    I use force_turbo in config.txt to do it
     
  3. tangophi

    tangophi New Member

    Messages:
    5
    Hardware:
    RPi3
    I tried it, but it doesnt help.

    Did you also have a similar issue like what i am facing?
     
  4. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Are you sure it took effect ?

    It sounds really similar to the issues I had.

    Run this repeatedly to check that it is stable:
    vcgencmd measure_clock core
     
  5. tangophi

    tangophi New Member

    Messages:
    5
    Hardware:
    RPi3
    This is my config.txt

    [email protected]:~$ cat /boot/config.txt
    gpu_mem_1024=256
    hdmi_ignore_cec_init=1
    disable_overscan=1
    start_x=1
    disable_splash=1
    dtparam=spi=on
    dtparam=audio=off
    force_turbo=1

    After reboot, the values are not stable:
    [email protected]:~$ while true; do vcgencmd measure_clock core; sleep 1; done
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=249999000
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=250000000
    frequency(1)=250000000

    Not sure why it is not.
     
  6. tangophi

    tangophi New Member

    Messages:
    5
    Hardware:
    RPi3
    okay.. i installed OSMC on a rpi2, connected the LEDs to GPIO10, installed hyperion through hypercon and it works beautifully.

    Then I took the SD card out of the rpi2, put it in a rpi3, connected LEDs to GPIO10 on the rpi3 and powered the rpi up. NOw the LEDs are showing white.

    Everything else being the same, the only difference is rpi3 vs rpi2. it works in rpi2, but not in rpi3.
     
  7. tangophi

    tangophi New Member

    Messages:
    5
    Hardware:
    RPi3
    I found the following suggestion in https://github.com/jgarff/rpi_ws281x/

    On a RPi 3 you have to change the GPU core frequency to 250 MHz, otherwise the SPI clock has the wrong frequency. Do this by adding the following line to /boot/config.txt and reboot.

    core_freq=250



    This finally worked for me. Thanks for your help !