Unable to send data to WS2812B using Periodic Interrupt Timer(PIT) on K64F

Hello everyone,

I’m unable to send the correct data to the WS2812B led strip. I cannot use the SPI interface because of my project, I cannot use the ticker API because it only goes to microseconds, I cannot use the wait_ns feature because I had more luck sending any data with asm(“nop”), I even tried setting up all 4 Periodic Interrupt Timers using registers but I think I got stuck on the clocks because I have no Idea how fast is the Bus Clock(which the PIT uses), I have searched some forums where I found That if the system clock speed is 120Mhz then that means that the Bus Clocks speed is 60Mhz so I’m believing that the clock is 60MhZ but still when I try to send data to the strip to shine red it either: doesn’t light up anything;does light up but mostly green;it just lights up white(the most common).I’m kind of at a low point where I’m not sure what I’m doing wrong. If there is a kind soul that knows what the problem is or had the same problem and found a solution, please PLEASE I beg you to share it with me!

have you checked this:

I think this can work, you have to bypass the OS features, but this is neccessary with tight timings.

The K64F has also 3 SPI interfaces: