I am trying to write a simple driver for the WS2812B. Like a lot of other implementations mine tries to use the SPI. I push 3 SPI bits for every color bit. Either 110 (HIGH) or 100 (LOW). In the 8 bit RGB color space this makes 72 bits, hence 9 bytes to be sent over MOSI. (The 10th byte is there to get the bus HIGH again avoiding a RESET.) Unfortunately, already at a clock speed of 100 kHz I experience clock stretching between bytes, since there is no DMA. So, I am afraid the chip won’t eat it. Is there a way to implement this differently?
10 kHz clock speed, 60 MHz CPU speed, bits come out nicely
100 kHz clock speed, 320 MHz CPU speed, clock stretching
Actually, you would need a clock speed around 2.5 MHz to satisfy the requirements in the datasheet.