Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmt peripheral / driving on-board rgb led #52

Closed
fkohlgrueber opened this issue Apr 23, 2022 · 1 comment
Closed

rmt peripheral / driving on-board rgb led #52

fkohlgrueber opened this issue Apr 23, 2022 · 1 comment

Comments

@fkohlgrueber
Copy link

I've been playing around with my esp32-c3 dev board, trying to drive the on-board rgb led (WS2812) with the rmt peripheral. Some time ago, I managed to do this using esp-idf functionality (see here), but I wanted to also achieve it "bare-metal" using only esp-hal and the pac crate. After some trial and error, I now have an implementation that correctly configures the rmt peripheral to drive the on-board led. The code is here (see branch 'rmt'):

https://github.com/fkohlgrueber/esp32c3-hello-world/tree/rmt

I'd be interested to contribute a driver for the rmt peripheral and probably also the led driver to esp-hal. I'd like to use this issue to discuss the details of how this could work. Some questions off the top of my head:

  • How to make the peripheral work with different clock sources? I think it'd be good to have an abstraction for clocks within the hal that could then be passed to the rmt peripheral. Looks like that's also the idea of We need a way to configure clock rates #44.
  • How about interrupts? I haven't looked into them yet, but they'd be required for things like sending more data than what fits into the rmt's ram.
  • What functionality should be available for a first shot at a rmt driver? I haven't looked into carrier modulation, advanced transmission modes or receiving data yet.
  • Should the implementation be common to all esp32 chips? I've only used esp32c3 and don't know whether other chips have the same peripheral.

I'm sorry for that slightly unstructured brain dump above. The main point is that I wanted to show what I did and that - if time permits - I'd be interested to work towards integrating an rmt driver into esp-hal.

Let me know what you think!

@jessebraham
Copy link
Member

Sorry, I intended to reply to this and I guess it just sort of slipped my mind 😅 Right around the time this was opened we also received a PR adding RMT support, which has now been merged (#53).

Thank you for writing up this issue and offering to contribute, and sorry again that it got neglected!

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

No branches or pull requests

2 participants