Bi-directional dshot - testers wanted

I saw the commits and I am building just now.
Thanks.

1 Like

I am sorry, same situation, all motors spins only with MOT_PWM_TYPE = 7, with 4, 5, and 6 only 3 motors spins.

Ok, I have that board - please can you post your parameters and I will investigate. Thx

Here the parameters file:
parameter-MatekH743-bd-KBAT136-02-03-2021-EK2-GPS_MAG.param (21.5 KB)

Thanks, currently on my setup I am only seeing telemetry back from one ESC - I’ll have to investigate some more. Maybe timing related.

Are you using BLHeli_S? I am seeing BLHeli32 work and BLHeli_S not working

I am using this BLHeli32 4in1 ESC, cheap and without serial telemetry

Configured in this way

[EDIT]
As I said it works without problems (DShot150, 300, 600) with betaflight and with ardupilot without bdshot.

I’ve order some more ESCs to dig into this further. The signal looks correct to me so I wonder whether ts down to the timing.

I did something completely nonsense, I commented out this line:

What I obtained is something that seems to work, it arms at various DShot speed and I see ESC telemetry but I also see frequently:

[MAV 001:1] PreArm: Internal errors 0x4000020 l:237 panic,mem_
[MAV 001:1] guard
[MAV 001:1] PreArm: Internal errors 0x4000020 l:237 panic,mem_
[MAV 001:1] guard
[MAV 001:1] PreArm: Internal errors 0x4000020 l:237 panic,mem_
[MAV 001:1] guard

What happens if you change it to

DMA_NOSHARE TIM3* TIM2*

What you have currently is not safe to fly.
I just wonder if the DMA contention is preventing such rapid pulses and that is what causes the difference

In this way is the same as w/o mods

DMA_NOSHARE SPI1* SPI4*

is also on MatekH743/hwdef.dat that is included by MatekH743-bdshot/hwdef.dat, anyway I tested to confirm.

Don’t worry I test it with the copter blocked on bench, I arm it and I give throttle to see motors spin and to see something on the logs.

Do you have a logic analyzer? i would be really interested to see the trace for working versus not working
I will also try with your parameters

No, not here, I have one in local hackerspace (which I contributed to create) but in this period it is closed.
If I find the way to go which signal I have to see? RCOUT from FC without ESC connected?

The 4 RCOUT pins with the ESC connected and powered

But I will try and reproduce here with my board

1 Like

Actually I have had a great idea - I am going to flash BetaFlight and look at the pulse timing

1 Like

I did another test (don’t know if it is useful):

MOT_PWM_TYPE = 5
SERVO_BLH_AUTO = 0
SERVO_BLH_BDMASK = 0

motors spin (after arming), OK we already know.

Then i set

MOT_PWM_TYPE = 5
SERVO_BLH_AUTO = 1
SERVO_BLH_BDMASK = 15

and I “Preflight Reboot” from GCS the motors spin (after arming), I can even fly and I see ESC RPM on log, but if I power off / power on, instead of “Preflight Reboot”, the motors doesn’t spin anymore.

Betaflight timings are in https://github.com/ArduPilot/ardupilot/issues/16786 interestingly BLHeli_S does not work for all

Interestingly Betaflight will happily go down to 500Hz and ESCs are fine, so I think the assertion in the code that you have to be above 1Khz is incorrect. I think maybe we should have an option that either follows the loop rate or follows the RCOut thread but not both

1 Like

@anbello can you try https://github.com/ArduPilot/ardupilot/pull/16787 and see if it helps you?

It’s not the final solution, but if it works gives me a path to work along.

Now I can’t, tomorrow morning I will do and I will let you know.

Thanks - I have updated the PR so it now gives you control

SERVO_DSHOT_RATE

Set to 0 and you will get regular dshot output at 1Khz, other values give that multiple of the loop rate - so 2 would give you 1600Hz in your instance (your loop rate is 800Hz). This works for me with your settings and both ESCs.