You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all. I want to preface this by saying that I have no experience with hal programming, and have only recently started to study the workings of this crate. I would however like to learn, and possibly help with any implementation.
I have a project where I need to generate a DShot command-signal, where a digital 16-bit frame is encoded using PWM, such that the pulse width determines whether it is a 0 or 1. I am however stuck trying to implement this, since there does not seem to be an implementation of dma::WriteTarget for PWM, which I believe is what I need. Alternatively, I have seen discussions about people trying to implement this protocol using PIO, but I think doing so via PWM would be the more direct approach.
Is this something being worked on? If it isn't, do you think I would bite off more than I can chew if I gave it a go? 😄
The text was updated successfully, but these errors were encountered:
You are right, DMA support for the PWM peripheral is still missing from the HAL. I didn't look at it closely, so I might be wrong, but my first impression is that it wouldn't be difficult to implement. You can probably copy the WriteTarget implementation for some other peripheral without huge changes.
In case you want to try the PIO route, the DShot wire protocol does look quite similar to the ws2812 protocol, so https://github.com/rp-rs/ws2812-pio-rs/ might be a good starting point. However it only implements the transmitting side, not the receiving one.
Hey all. I want to preface this by saying that I have no experience with hal programming, and have only recently started to study the workings of this crate. I would however like to learn, and possibly help with any implementation.
I have a project where I need to generate a DShot command-signal, where a digital 16-bit frame is encoded using PWM, such that the pulse width determines whether it is a 0 or 1. I am however stuck trying to implement this, since there does not seem to be an implementation of
dma::WriteTarget
for PWM, which I believe is what I need. Alternatively, I have seen discussions about people trying to implement this protocol using PIO, but I think doing so via PWM would be the more direct approach.Is this something being worked on? If it isn't, do you think I would bite off more than I can chew if I gave it a go? 😄
The text was updated successfully, but these errors were encountered: