Skip to content

Revert #3140 (DSHOT round robin) - #3421

Merged
CapnBry merged 1 commit into
ExpressLRS:masterfrom
CapnBry:revert-3140
Dec 4, 2025
Merged

CapnBry merged 1 commit into
ExpressLRS:masterfrom
CapnBry:revert-3140

Conversation

@CapnBry

@CapnBry CapnBry commented Dec 1, 2025

Copy link
Copy Markdown
Member

Reverting this PR due to it sending too many bits in the DSHOT packet and the timing is way too temperamental.

  • We can't just delay for 500us between each DSHOT output, as this will limit the number of channels we can output with 2ms update rate to just 4 outputs, virtually eliminating all benefits of the PR.
  • Bidirectional DSHOT needs to switch the RMT to receive mode immediately after the last bit, with only a 26us window to perform the transition. The polling nature of the PR makes meeting this goal questionable, even without the fixed 500us delay. That means we'll have to rejigger the internals of More DShot channels for ESP32-C3 #3140 anyway, so why are we bashing our heads against the wall trying to get it to work knowing it will be replaced immediately anyway.

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good on SuperP. No errors, no missing frames, no missing bits, no bad CRCs. DShot3D 0 at 1500us:
2: ch5 - DShot
3: ch6 - DShot3D

Image

@pitts-mo

pitts-mo commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

So far no problems testing on an actual ESC. Seeing more consistent timing of packets in pulseview is re-assuring :-). But regardless of my serial RX/TX pins defined or not pulseview is seeing occasional odd packet lengths of 18, 32, 33, and 34bits.

Along with a few oversize packets in this sample you will also see the first bit of first dshot3d packet was long resulting in CRC error detected. This was the only CRC error detected while testing.

3357447-CRC-error at start and 32 plus bit packets.sr.zip

RP4TD PWM pins 1,3,18,5 150hz,Std,Wide

@CapnBry

CapnBry commented Dec 3, 2025

Copy link
Copy Markdown
Member Author

I can also confirm there is bad data being generated by the old DSHOT system. The first set of pulses on a new boot almost always has a long start bit as the hardware is initialized and there are also some glitches with extra pulses in them
image

This is the same regardless of what version of ExpressLRS I run (the above is 3.6.2), so we're not going to mess with it any more before 4.0.

The "consistent timing of packets" means nothing and will not be a requirement of any refactor done to this code in future versions. As long as they are sent within a deadline we decide on (I think around 2ms) and not within 21 clock cycles of the last packet, that meets the requirements.

@CapnBry
CapnBry merged commit ac862ac into ExpressLRS:master Dec 4, 2025
@pitts-mo

pitts-mo commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

No problems found testing Dshot / Dshot3D ESC with Master ac862ac.
Thank you, -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants