Bi-directional dshot - testers wanted

Hi @andyp1per is it OK to use bidir Dshot with Dshot600?

As I said above With MatekH743-bdshot and and my Blheli32 ESC (HAKRC-35A-BLheli-32) if I set DShot150 or DShot300 motors doesn’t spin an arming (almost never).

I found a scheme, I don’t know if could be of help, anyway:
if I boot with DShot300 doesn’t work, if I boot with Dshot600 then arm / disarm, set DShot300 and reboot it works.

I do all my testing with dshot600 so should be fine. I’ll have another go with the Matek with Dshot150 to see if I can spot anything.

In the interests of transparency I should point out that I am doing my testing with https://github.com/ArduPilot/ardupilot/pull/15984 as without it I get an immediate watchdog on this board if I try and calibrate accels. Might be worth trying as with that patch you get much more predictable dshot output.

OK Thanks, I will try that PR. Is it better to apply the PR to actual master or use your small-copter-4.1 branch (i see now that it include that PR)?

They are almost identical, so doesn’t really matter

1200 now but I started at 300 and worked up as I had no previous application beyond 300. I did take the opportunity to update the ESC firmware to 32.7.4 and enabled variable PWM. Nothing noticeable of course but it flies.

Ok I reflashed BLHeli32 to get the very latest and changed to DShot150 - all still works, however I think maybe I have reproduced the lack of telemetry with dshot150. Interestingly with dshot150 my BLHeli_S ESC no longer works.

Also my BLHeli_S ESC after flashing with 16.73 for bidir stopped to work with DShot150.

@andyp1per some problems with small-copter-4.1 of today target MatekH743-bdshot:

[MAV 001:1] ArduPilot Ready
[MAV 001:1] AHRS: DCM active
[MAV 001:1] AHRS: EKF2 active
[MAV 001:1] EKF2 IMU0 tilt alignment complete
[MAV 001:1] EKF2 IMU0 forced reset
[MAV 001:1] EKF2 IMU0 tilt alignment complete
[MAV 001:1] INS: alloc 6144 bytes for ISB (free=854552)
[MAV 001:1] ArduPilot Ready
[MAV 001:1] AHRS: DCM active
[MAV 001:1] AHRS: EKF2 active
[MAV 001:1] EKF2 IMU0 tilt alignment complete
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] PreArm: Internal errors 0x800000 l:176 stack_ovrfl
[MAV 001:1] w
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] EKF2 IMU0 forced reset
[MAV 001:1] EKF2 IMU0 tilt alignment complete
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] PreArm: Internal errors 0x800000 l:176 stack_ovrfl
[MAV 001:1] w
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw
[MAV 001:1] PreArm: Internal errors 0x800000 l:60 stack_ovrflw

[Edit]
I can fly it if I reboot but only with DShot1200, with DShot600 only two motors run.

In chconf.h can you change PORT_INT_REQUIRED_STACK to 256 say and then check the stacks by using ftp @SYS/threads.txt - note that you will see stack overflow if you build with debug (I assume you aren’t?)

No I didn’t build with debug.
For now I can’t do other test, will do in the next days.

Ok, just tried on mine with no issues so my guess is that something you have connected is triggering the overflow - be great to narrow this down before I start making changes.

Sorry only now I remember that I was testing with INS_GYRO_RATE=2 (4KHz), I will test with 1 and let you know

Should not make any difference

Something hardware?
I have only an IBUS receiver on RX6 and a 3DR radio telemetry on UART7.

Its probably mavlink - be great to know what the stack usage is for UART7

Sorry I don’t know how to do this, something with ftp @SYS? from mavproxy?

start up mavproxy and run
ftp get @SYS/threads.txt -
It will print out the threads and stack usage

ThreadsV2
ISR           PRI=255 sp=0x20000000 STACK=1308/1536
ArduCopter    PRI=182 sp=0x20000600 STACK=5480/7168
idle          PRI=  1 sp=0x20017108 STACK=72/280
UART_RX       PRI= 60 sp=0x2001A340 STACK=944/1288
OTG1          PRI= 60 sp=0x2001BAA8 STACK=112/520
monitor       PRI=183 sp=0x20012C30 STACK=656/1032
timer         PRI=181 sp=0x20014270 STACK=1392/1800
rcout         PRI=181 sp=0x200135D0 STACK=936/1288
rcin          PRI=177 sp=0x20013080 STACK=816/1288
io            PRI= 58 sp=0x200122E0 STACK=1368/2312
storage       PRI= 59 sp=0x20013B20 STACK=1320/1800
UART7         PRI= 60 sp=0x2001C5E8 STACK=128/520
UART1         PRI= 60 sp=0x2001CC68 STACK=128/520
UART2         PRI= 60 sp=0x2001D4F0 STACK=248/520
UART3         PRI= 60 sp=0x2001DD78 STACK=248/520
OTG2          PRI= 60 sp=0x2001F1E0 STACK=248/520
UART6         PRI= 60 sp=0x30000678 STACK=248/520
I2C0          PRI=176 sp=0x30000938 STACK=760/1288
OSD           PRI= 59 sp=0x30001998 STACK=600/1288
log_io        PRI= 59 sp=0x30012060 STACK=936/1288
SPI4          PRI=181 sp=0x300151E0 STACK=496/1288
FTP           PRI= 58 sp=0x300203B0 STACK=1344/2824

Looks fine - are you still seeing stack overflow?

Not in this moment, but I changed nothing.