drivers icon indicating copy to clipboard operation
drivers copied to clipboard

WIP: ws2812: add support for 125MHz for RP2040

Open bgould opened this issue 2 years ago • 3 comments

This adds support for 125Mhz CPU frequency to WS2812

FYI I accidentally pushed and then reverted this change to dev; was sure of the best way to clean that up, hope I did it correctly.

accidental push: https://github.com/tinygo-org/drivers/commit/b4eb406a43ba15b53b0a466e76cfdaa7e29b4137 revert: https://github.com/tinygo-org/drivers/commit/0ced12683cc455aef1fc621fefde562cfbe2414b

bgould avatar Feb 14 '22 06:02 bgould

This looks good to me. Is this still a WIP pull request?

aykevl avatar Feb 14 '22 12:02 aykevl

@aykevl I'm getting this asm error when trying to compile using RP2040 (using this branch in TinyGo: https://github.com/tinygo-org/tinygo/tree/macropad-rp2040)

bcg@bcg-x12:~/src/drivers$ tinygo version
tinygo version 0.23.0-dev linux/amd64 (using go version go1.17.3 and LLVM version 13.0.1)
bcg@bcg-x12:~/src/drivers$ tinygo build -o test.hex -target=macropad-rp2040 ./examples/ws2812
error: <inline asm>:278:4: out of range pc-relative fixup value
          bne.n 1b                       @ [1/3] send_bit
          ^

(haven't added a smoke test for this to drivers yet, was going to do that after macropad-rp2040 is merged in TinyGo)

bgould avatar Feb 18 '22 04:02 bgould

Here is a fix: https://github.com/tinygo-org/drivers/pull/391

aykevl avatar Mar 01 '22 12:03 aykevl