Skip to content

ws2812: support high-MHz ARMv6M chips like the RP2040#391

Merged
deadprogram merged 1 commit intodevfrom
ws2812-longjump
Mar 10, 2022
Merged

ws2812: support high-MHz ARMv6M chips like the RP2040#391
deadprogram merged 1 commit intodevfrom
ws2812-longjump

Conversation

@aykevl
Copy link
Copy Markdown
Member

@aykevl aykevl commented Mar 1, 2022

The possible branch distance is a lot shorter on ARMv6M (Cortex-M and Cortex-M0+) for conditional branches. Therefore, convert this long conditional branch into an unconditional branch.

This probably makes the code a little bit slower but because it is in the low period of the WS2812 signal it shouldn't matter for the protocol. And it avoids difficult workarounds specifically for the RP2040.

The possible branch distance is a lot shorter on ARMv6M (Cortex-M and
Cortex-M0+) for conditional branches. Therefore, convert this long
conditional branch into an unconditional branch.

This probably makes the code a little bit slower but because it is in
the low period of the WS2812 signal it shouldn't matter for the
protocol. And it avoids difficult workarounds specifically for the
RP2040.
@deadprogram deadprogram merged commit 2d32995 into dev Mar 10, 2022
@deadprogram deadprogram deleted the ws2812-longjump branch March 10, 2022 09:50
@deadprogram
Copy link
Copy Markdown
Member

Thanks @aykevl

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.

2 participants