I don’t have a pixel matrix, so I can’t try out solutions, but I’ve had trouble before with power usage of the WiFi. It might help if the WiFi has time to connect.
Hm… okay, it could be something with the signal voltage too. The BW16 is definitely not powering the pixel matrix, so are they both connected to the same ground (GND)?
Yes, the matrix is separately powered. And it works pretty fine without WiFi enabled.
I think I found out the reason: The WS2812B library is so badly programmed, I already fixed a lot of other bugs. Every pixel is separately sent to the SPI driver, so any WiFi (or other) interrupt can interfere and break the SPI data stream. I will write my own WS2812B library that sends all pixel data in 1 block, that may fix the problem. Ameba’s libraries are definitely not well maintained!
Great effort! BW16 does not have fast GPIO toggle to support original lib, therefore the work around is to use SPI pins to support WS2812B. You are right, the lib has not update for long time.
If you would like to commit your lib into official GitHub Repo, it will be wonderful and great help to other developers. We will give you credits and honor your opensource spirit.
SPI is perfect for this job, but not perfectly implemented. For a first & quick solution I replaced all spi_slave_write commands with one spi_master_write_stream. The ideal solution would be using DMA, but I didn’t succeed doing this so far, the board crashes when using spi_master_write_stream_dma. Is there any example available how to implement a DMA transfer?