2023-07-27 12:24 AM
So i am using STM32F401RE board where i have written the code to for a strip of RGB led working on the WS2812 protocol which is nothing but using 24 bit PWM waveform for 1 led in GRB format. Every time i enable the PWM channel using CCR1 register for Timer2, always i am getting 1 extra pulse always at the beginning, due to which instead of 24 pulses, 25 pulses are sent and the entire data gets corrupted, how can i control the timer channel in more efficient way. I have attached the code and the datasheet below.
Note the naming conventions might change as the header file is also made by us.
2023-07-27 12:54 AM
2023-07-27 06:18 AM
Hello @DJ1,
Could you provide a scope capture of this behavior? Could you confirm that it's not only the first set of data output that is incorrect but also if you send data again it's incorrect ?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.