Skip to content

Bugfix/ws2812 initialisation (data-transfer rate)#6

Open
minimism wants to merge 2 commits intobastl-instruments:mainfrom
wonkystuff:bugfix/ws2812_initialisation
Open

Bugfix/ws2812 initialisation (data-transfer rate)#6
minimism wants to merge 2 commits intobastl-instruments:mainfrom
wonkystuff:bugfix/ws2812_initialisation

Conversation

@minimism
Copy link

@minimism minimism commented Mar 5, 2026

Note: this fixes an issue I have seen when building the Wavebard firmware (1.6) on a new hardware platform (wonkystuff K2) with slightly different, 'WS2812-compatible' RGB LEDs.

In my experiments I found that the Neopixels were being driven at a data rate of 1.1MHz, rather than the specified maximum of 800kHz.

I discovered that this was because the global initialisation of the LEDs occurs before the clock-rate change (176MHz/125MHz == 1.4; 800kHz * 1.4 == 1.1MHz).

I've added a simple default initialiser to the WS2812 class for the global declaration, and then call the 'real' initialiser (which calls the important ws2812_program_init) during Hardware::Init()

minimism added 2 commits March 5, 2026 10:37
…n set to 176MHz (otherwise bit timing is incorrect for LEDs - running at 1.1MHz not 800kHz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant