VIM3 SPI for controlling APA102 LEDs on

hello, I have activated SPI in Coreelec Matrix Settings on my VIM3.
I have running as addon and detecting platform video stream is okay.
but the APA102 LEDs are still off.

do I have to assign the Pins for MOSI (DATA) and SCLK (Clock) myself?

here I found information about activating GPIO Ports on Android, but I dont understand it

with the command

KodiWZ:~ # cat /sys/kernel/debug/pinctrl/pinctrl@ff800014/pins
this it was I receive: but what to do further?

registered pins: 16
pin 0 (GPIOAO_0) pinctrl@ff800014
pin 1 (GPIOAO_1) pinctrl@ff800014
pin 2 (GPIOAO_2) pinctrl@ff800014
pin 3 (GPIOAO_3) pinctrl@ff800014
pin 4 (GPIOAO_4) pinctrl@ff800014
pin 5 (GPIOAO_5) pinctrl@ff800014
pin 6 (GPIOAO_6) pinctrl@ff800014
pin 7 (GPIOAO_7) pinctrl@ff800014
pin 8 (GPIOAO_8) pinctrl@ff800014
pin 9 (GPIOAO_9) pinctrl@ff800014
pin 10 (GPIOAO_10) pinctrl@ff800014
pin 11 (GPIOAO_11) pinctrl@ff800014
pin 12 (GPIOE_0) pinctrl@ff800014
pin 13 (GPIOE_1) pinctrl@ff800014
pin 14 (GPIOE_2) pinctrl@ff800014
pin 15 (GPIO_TEST_N) pinctrl@ff800014

this is output of ls /dev after activating SPI Interface in Coreelec setings and rebooting vim3 …
so, there is no spidev0.0 or spidev0.1

this is ouput of dmesg | grep -i Video

[ 0.000000@0] vdin_get_video_reverse: bootargs is 0.
[ 0.336232@1] set_rdma_handle video rdma handle = 1.
[ 0.667510@3] amvideom vsync irq: 41
[ 0.667536@3] create_ge2d_work_queue video task ok
[ 0.667976@2] amvideocap_probe,amvideocap
[ 3.150471@2] videodev: Linux video capture interface: v2.00
[ 3.151987@2] amlvid:info: amlvideo_init called
[ 3.151991@2] amlvid:info: amlvideo_create_instance called
[ 3.151993@2] amlvid:info:
[ 3.152116@2] amlvideo-000: V4L2 device registered as video10
[ 3.152116@2] amlvid:info: amlvideo_create_instance called
[ 3.152118@2] amlvid:info:
[ 3.152269@2] amlvideo-001: V4L2 device registered as video23
[ 3.155355@3] Try to load video/h264_enc.bin …
[ 3.155379@3] load firmware size : 76288, Name : video/h264_enc.bin.
[ 3.155786@3] Try to load video/video_ucode.bin …
[ 3.156264@3] load firmware size : 1459200, Name : video/video_ucode.bin.

The correct check is:
ls /dev/spi*

This should give you a result if spi is enabled. If the result is empty the spi interface is not enabled.

I tried it once with the hardware SPI interface and it wasn’t working well. It worked, but it was loosing frames and the LED stayed black all few seconds.

I use a €2 Arduino UNO and it works without any issues for years already.

1 Like

Or try a esp8266 or esp32. Then you can run wled from aircookie. This allows you to have a wireless connection.

I have a vim1 and use this for my TV.

sad. I thought Khadas Vim3 is fully supported.
whats the problem, that spi interface is not working good enough?

It’s just to slow or something else blocks the bit output on the header.
It’s not VIM3 only, it’s all devices with SPI interface. So also the Odroid N2 is affected.
Maybe it check the output for errors and retry the output. A external Arduino just push out the bits, doesn’t matter if correct or not. So on a “normal” SPI slave this will be invisible but the LEDs will show this error :wink:

And as this is only a “nice to have” feature it will never be solved completely.
Also when you upgrade next time your device you maybe do not have a SPI header anymore and the process how to connect the LED hardware start again…

So easiest solution (and long therm) is to use another piece of hardware to make a connection from Hyperion.NG to the LEDs.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.