Bi-directional dshot - testers wanted

@anbello are you able to try with this PR again on your setup? I found quite a few issues with the way we were cancelling and synchronizing pulses. Pretty sure its right now but would be good to know I haven’t broken anything.

EDIT: actually I think there may be a problem - I am investigating

Hi Andy,
Could you please give a look on mropixracer pro bdshot latest build. It seems it has a broken baro driver. I would like to test your latest changes, though couldn’t compile for this little board for some annoying reason (probably my fault).

Best,
Dimitris

Hi @Dimitris_Stefanakis my changes don’t affect the baro - I suspect something else is going on. I am unable to test a pixracer pro - hopefully I might get one.

Thanks Andy,
Hopefully a new build will eventually compiled and I would be able to test again and report back to this thread.

Best,
D

HI @andyp1per I tested your pr-matekh743-bdshot branch cloned this morning.

With LOOP_RATE = 800 and SERVO_DSHOT_RATE = 0, 1, 2
MOT_PWM_TYPE = 4, 6, 7 are OK but MOT_PWM_TYPE = 5 gives only 3 motors working

Tested also with LOOP_RATE = 1000 and SERVO_DSHOT_RATE = 0 with same results:
MOT_PWM_TYPE = 4, 6, 7 OK - MOT_PWM_TYPE = 5 only 3 motors

I have noted more repeatability respect to the previous PR versions tested.

Are you building with bdshot or regular? Can you post the parameters for the failing case?

Target MatekH743-bdshot

Here the params:
parameter-MatekH743-bd-KBAT136-13-03-2021-EK2.param (21.6 KB)

If I set SERVO_BLH_BDMASK = 0 no problems also for MOT_PWM_TYPE = 5.

Ok interesting. I did find one overflow issue with LEDs which I have now fixed. I’ll see if I can reproduce your issue.

EDIT: Very interesting - I have reproduced this, but the signal looks perfectly fine and the ESC is responding fine also - so I am not sure what is going on. It’s kind of bizarre as well because in this config the pulse goes out in pairs of channels, so you would expect two motors not working or none - 3 is very strange.

I did a little test flight with MOT_PWM_TYPE = 6 and it seems all OK.
But I would like to know if it is normal that FTN.NDn sometimes goes to 3, as shown here:

It means you lost ESC telemetry on one motor temporarily - its not a problem but you should check the error rate for all the ESCs

If you intend ESC.Err is always 0.

There’s something up with your config. My config (attached) + MOT_PWM_TYPE = 5 works fine. Can you figure out what it is?

MatekH743-test2.param (19.4 KB)

I found it, what make the difference is INS_HNTCH_MODE, in your file is 1 in my is 3.
If I set it to 1 also MOT_PWM_TYPE = 5 is OK but in this way I have not harmonic notch based on ESC telemetry.

That’s even stranger. Why would that make a difference I wonder? Note that your config does not work on master either …

So when we set ESC telemetry via bdshot (SERVO_BLH_AUTO=1 SERVO_BLH_BDMASK=15) AND use this for harmonic notch (INS_HNTCH_MODE=3) we have DShot300 not working (only 3 motors).

This is true both with and without your PR, but with your PR all the other DShot* works good and this is not true without the PR.

I am sorry but I haven’t enough knowledge to understand why.

I don’t think that’s it. Here is a config that works - hntch with ESC telemetry

MatekH743-test.param (22.0 KB)

In this file I don’t see SERVO_BLH_BDMASK parameter, are you sure that is from a bdshot target?

Sorry, it was but the board had some parameters that were only in FRAM. Try this one:

MatekH743-test3.param (21.8 KB)

OK the different and relevant parameter now is SERVO_DSHOT_RATE, 0 in my param file and 3 in your last.

If I set it to 3 (without other changing) I have also DShot300 (MOT_PWM_TYPE = 5) working.

Hmmn, pretty sure I verified this as well - I will check. Do other values of SERVO_DSHOT_RATE work for you?