Servers by jDrones

Bi-directional dshot - testers wanted

My bi-directional dshot PR is up and working well for me: https://github.com/ArduPilot/ardupilot/pull/15636

Support for bi-directional dshot requires some careful DMA and timer rearrangement which currently I have only done for KakuteF7Mini and OmnibusF4Pro. I’m keen to expand this support to more boards and work through issues as I find them so am looking for some brave souls to alpha test for me.

The changes are at the very heart of motor control so not suitable for using on anything of any value and really not suitable to be used on anything of any size - best used on small crashable quads. If you fall into that category and would like to help please post here with what board you need a build for and I will see what I can do. Please note you need to already have configured your quad for dshot with telemetry, have BLHeli 32.7 installed on your ESCs and have configured and tuned the dynamic harmonic notch. If you don’t have these pre-requisites then there is little point in testing.

Bi-directional dshot can be enabled on flight controllers without IOMCU by setting

SERVO_BLH_BDMASK=15

For flight controllers with an IOMCU set:

SERVO_BLH_BDMASK=3840

Builds for various boards can be found here

To initially see if it’s working set

SERVO_BLH_DEBUG=2

And look for debug messages using mavproxy. The rpm should not be 65535 and the error rate should be close to zero. You will not get rpm values above zero unless you have motors connected and they are turning.

UPDATE: I have now done a decent set of test flights on a KakuteF7Mini 3" Quad with good results. Control was good. No problems observed. Safe enough for further testing now.

Boards verified in flight

  • KakuteF7Mini
  • OmnibusNanoV6
  • Pixracer

Boards verified on bench

  • OmnibusF4Pro
  • Pixhawk1-1M (loses external SPI)
  • MatekF405

Boards ported but not tested

  • Pixhawk4 (loses dshot on Aux5/Aux6)
  • OmnibusF7V2
  • fmuv3 (loses external SPI)
  • fmuv5 (loses dshot on Aux5/Aux6)
5 Likes

Hi, I’m excited to get a chance to test it. Have a Matek 405 ctr fc.
Installed on a wooden frame where I easily can replace stuff :slight_smile:
Update: I just realized I didn’t read all through, have BlheliS on this but can change and first setup with blheli 32.

Best regards
Patrik

Ok Matek 405 is quite easy. You will lose RX DMA on USART1, but looks like there a bunch of UARTS on this board without DMA. Do you need me to build for you? I have committed the required changes.

@ThePara Pixhawk4 (fmuv5) is quite hard because the IOMCU requires DMA. I have made the changes but it means you can only have dshot (incl bi-dir dshot) on PWM 1-4. There may be more optimal arrangements with further playing, but that would require some detailed investigation. Do you need a build?

It would definitely help if you could help me build, have not yet set up a development environment

Thanks

Ok builds posted in the OP

Thanks!
Excuse my missing knowledge, but where is “in the OP”?

Link in the “Original Post” (OP)

Thanks, found it. Will give it a test.

I have updated the firmware to include better debug and a temporary fix for the logging failure that I see.

@andyp1per Both Orange an P4 have the legacy IOMCU. I’m using AUX1-4 on both for DShot ESCs.

Ok. I have a Pixhawk1-1M here, the pin assignments are not identical to PH4 but close enough to be almost the same exercise to enable. It’s not currently working for me - the trace on a Saleae is wrong - so I would expect the PH4 also not to work. I’m also not quite sure what values the mask should take for a board with an IOMCU so will need to investigate further.

For the Matek do I need to change motor output ports?
Have not yet got the Blheli32, testing with a Blheli_s with bidirectional dshot, verified in Betaflight

No rush mate. The weather is awful for flying, anyway.

No, matek should just be regular PWM1-4 outputs. You just need to set SERVO_BLH_BDMASK=15

Does it have to be the BLheli32 version of bidirectional dshot? Had a first test yesterday with the blheli-s version but didn’t work. Will continue testing tonight checking the signals.

It has to be BLHeli32

Ok, waiting for delivery of the blheli32

Also bear in mind that I just got two new ESCs and both of them had 32.6 installed - which is not enough, it needs to be 32.7

Ok, I will make sure that it has that before testing

Servers by jDrones