3 ms·
This uses hardware SPI module running at 3MHz. Those modules are buffered, and as long as there are no underruns, there will no glitches at all. And the users
by theamk 7y ago
This uses hardware SPI module running at 3MHz.
Those modules are buffered, and as long as there are no underruns, there will no glitches at all.
And the userspace sends entire buffer in one syscall, so those underruns will have to be caused by kernel stall, which usually only happens when buggy device drivers are present.
- amelius 7y agoThat seems like the right way to do it, but this piece in the article is a bit unclear: > Now taking a look at the duties of the PWM signal we need to send, we can approximate the highs and lows to some multiple of 1/3. This means that if we run a MOSI SPI signal at triple the frequency the lights expect, then we can send a single WS2812b "panel bit" using a combination of 3 SPI bits.