[I attached your picture above. Maybe the issue is not file size but image size]
That looks ok. The values being written from C++ (obtained applying
diff --git a/cAPA102.c b/cAPA102.c
index a37043c..fe5a3ee 100644
--- a/cAPA102.c
+++ b/cAPA102.c
@@ -146,6 +146,9 @@ void cAPA102_Refresh(void){
for (i = cAPA012_BUF.number * 4 + 4; i < buf_len; i++)
*(tx + i) = 0x01;
+ for(unsigned int n = 0; n < buf_len; ++n){
+ printf("tx[%d]: 0x%x\n", n, tx[n]);
+ }
ret = ioctl(cAPA012_BUF.fd_spi, SPI_IOC_MESSAGE(1), &tr);
if (ret < 1)
fprintf(stdout, "[Error] can't send spi message\n");
)
are:
tx[0]: 0x0
tx[1]: 0x0
tx[2]: 0x0
tx[3]: 0x0
tx[4]: 0xff
tx[5]: 0x0
tx[6]: 0x0
tx[7]: 0x0
tx[8]: 0xff
tx[9]: 0x0
tx[10]: 0x0
tx[11]: 0x0
tx[12]: 0xff
tx[13]: 0x0
tx[14]: 0x0
tx[15]: 0x0
tx[16]: 0xff
tx[17]: 0x0
tx[18]: 0x0
tx[19]: 0x0
tx[20]: 0xff
tx[21]: 0x0
tx[22]: 0x0
tx[23]: 0x0
tx[24]: 0xff
tx[25]: 0x0
tx[26]: 0x0
tx[27]: 0xff
tx[28]: 0x1
tx[29]: 0x1
What you should expect is the MOSI line to be high when transmitting a 1 and low when transmitting a 0. Each burst of the clock (which is actually 8 periods of a squarewave at 24MHz) corresponds to one byte.
I get this on my scope:
which matches perfectly.
If you zoom out a bit on yours you'd probably get something similar. I'd say it's the LED strip that is faulty ... In case you suspect the Bela image, you can always try to flash a beagleboard.org image on a spare SD card and see if it works with that.