Bi-directional dshot - testers wanted

Use the apj file not the hex file

Thanks!
didn’t see the tree in the forrest :pleading_face:

in the meantime I tried 4.1.0 for Pixracer. Flashing worked well :wink:
but I can’t arm the thing: PreArm: Throttle (RC1) is not neutral
but it’s exactly 1500 and I’m in Loiter
What’s up?

@andyp1per I tested master from yesterday target MatekH743-bdshot with a 3 inch Copter and I had a crash from 50 meters, no damage because of soft ground with green grass.

Before crash it was going really well, at time of crash I see PM.MaxT over 66000 on the log.

I attach a link to the log and a plot.

https://drive.google.com/file/d/1cn20dpJXp8bQsparOMpWFEKKIsfXbASb/view?usp=sharing

If you have bi-dir dshot then no tuning necessary - can use the notch right out of the box

1 Like

Oh dear. It does look like something got stuck - two of your motors flat line on the rpms the other two keep going, that indicates to me some kind of DMA failure, but difficult to tell without a debugger.

I did find a deadlock in the rcout code which https://github.com/ArduPilot/ardupilot/pull/16765 fixes, but does not affect bi-dir dshot code so difficult to tell what went wrong. Can you send me your params to see if I can reproduce in some way?

My DMA change has now been merged so the likely culprit here

No problem when we test master we know it can happen.

Here params file:
parameter-omnibusv6-KBAT136-28-02-2021-H743-EK2-GPS_MAG.param (21.9 KB)

In the meantime I tested your PR #16765, it works also on DShot150 but rebooting several times one motor sometime spin sometime not.

Was dshot 150 not working for you before?

Your parameters are for an omnibus v6?

1 Like

No, was not working.

Sorry, wrong name, param file is for MatekH743.

Anyway this
mavparms.txt (28.7 KB)
come from:
mavparms.py 21-02-28_16-44-04.bin > mavparms.txt
where 21-02-28_16-44-04.bin is the log relative to the crash

Sorry you will have to build. There should already be one for CubeOrange

https://firmware.ardupilot.org/Copter/latest/CubeOrange-bdshot/ here you go :slight_smile:

1 Like

Thanks, tridge and I have diagnosed another problem with the DMA locking - still not sure that’s what you are seeing though since you are using the bdshot target which ironically should be safer.

EDIT: so definitely the problem we have found won’t be affecting you, but its possible my original fix does

1 Like

Which original fix? PR #16765?

Yes that one. I still don’t quite understand why it helps dshot 150 on the bi-dir config

I will do more test with and without to be sure of the difference.

@andyp1per I did more test and I see strange things.

Both with and without your last PR I have the same behavior:
with MOT_PWM_TYPE = 4, 5, 6 (DShot150, DShot300, DShot600) I have only 3 motors spinning;
with MOT_PWM_TYPE = 7 (DShot1200) I have all motors spinning.

With MOT_PWM_TYPE = 7 I can fly but I don’t have ESC telemetry message on logs even if it is well configured as you can see on the param file posted above.

Yesterday, on the flight with the crash I had MOT_PWM_TYPE = 6 and it worked (apart for the crash :)) and I have ESC telemetry message on the logs.

To be sure that I have no problems with my FC and ESC I flashed betaflight and tested motors with DShot150, DShot300, DShot600 and bidir telemetry, all OK.

[EDIT]
If I set SERVO_BLH_BDMASK = 0 I have no problems with all DShot (yesterday master + your PR target MatekH743-bdshot).

Ok strange, when we have the other issue fixed I’ll get you to retest but I’ll make sure that bdshot is working on my setup

Ok let me know if I can do other useful test.

The fix plus the DMA conflict is merged - can you try again? I’m hoping this is actually the problem you were seeing - its all this board that is the problem.