Crash with 4.2.0-beta and 4.3.0-daily (bdshot)

My 5’’ quad twice spontaneously crashed after activating harmonic notch in mode 3 (ESC telemetry via bidirectional dshot.)
Loaded arducopter 4.2bdshot build from Feb.22-2022 into Omnibus F4 Pro. Before activating notch was copter flying fine and reliably, after activation was having light fast oscillations (like too high D-term) but was safely flyable. I started autotune to tune PIDs, but after 2 minutes of autotunning copter alone did fast roll and crashed (video and log). On the OSD it seems that FC rebooted. I just cycled the power and attempted another flight, but after almost 4 minutes flying around it crashed the same way (video and log). After “landing” OSD message said Internal errors 800. Both logs end up at once before the crashing.
Then I only disabled INS_HNTCH_ENABLE 0, replaced battery and spent whole battery (over 8 minutes) flying around without any problem and then successfully landed video and log.
Anyone can understand what happened?
Fortunately no harm - this copter is very crash resistant - but who wants to have such unreliable machine?
Thanks for any ideas!

Your notch isn’t doing anything because INS_HNTCH_REF is 0. The logging just stops so this is definitely a software crash, but my first guess is that the above parameter is responsible (maybe divide by 0 somewhere). Are you able to try with the notch enabled and this set to 1?

1 Like

Also would be good to know if a watchdog was triggered - if it was this should show up in your GCS when the flight controller has rebooted.

In two crashed flights was INS_HNTCH enabled, then I disabled it before third safe flight.

I looked at your first log - notch is enabled but ref is 0

sorry, I’m not that comfortable with the notch settings - I thought that in mode 3 it’s not necessary. T thought it should use actual RPM from motors as a reference.

In mode 3 ref should be 1. If it’s zero it should disable the notch, but I am suspicious that something else is going on.

what would you recommend to do before next testing the notch? What settings namely? Change to some specific version (this one is quite obsolete). I anyway want to load 4.2beta2 to make buzzer work.

1st I would suggest removing “bug” from the post title.

Definitely load 4.2beta2. Then I think your notch settings are correct apart from the setting of REF. I am using equivalent settings all the time without issue on all kinds of boards, so I struggle to believe its an issue with bdshot. More likely the setting of REF to 0, or perhaps a bug that is not in the beta. The only other thing I can think of is a RAM issue. Be worth checking @SYS/threads.txt to see that we are not running out of memory anywhere.

Sorry, I don’t know good enough local habits to know, that the word “bug” is so bad word here, that we can’t even thought about it… :grinning:

Most times people scream bug and it turns out to be “user error”, so we do try to avoid the word bug until it is a confirmed software bug.

This makes things clearer and avoids confusion. We have a process that we follow here, but it only works if we all enforce it :slight_smile:

Loaded 4.2beta2 and result is that ESCs don’t get initialized at all - they don’t emit last beep and don’t turn motors when armed. Also 3pin buzzer don’t beep on the PWM7 - havent’ tested yet on another because not turning propellers is a bigger problem atm. Can you see any explanation in my log?

edit: Tested latest daily build from Mar 23rd 2022 (today) and the same - no motors, no beeping. Log here.

Reverted back old Feb 22nd build with original settings and at least motors work again.
I’m really lost - probably keep flying version which at least fly, but not working buzzer can be missing when searching crashed copter :frowning_face: .

This sounds like a timer problem. What ESCs do you have? Are you able to post the output of @SYS/timers.txt using mavproxy?

One thing that might help is to increase SERVO_DSHOT_RATE - this has worked for others with arming problems. Try setting it to 3. If that doesn’t help try 4 and 5. 5 is probably too high for an F405 though

Thanks for the answer!
I have bluejay firmware flashed blheli ESCs.
@SYS/timers.txt using mavproxy - sorry, I don’t know what do you speak about. :frowning_face:
Don’t understand why build from Feb 22nd works while most of others not… Will try SERVO_DSHOT_RATE tomorrow - it’s already midnight here.

1 Like

There were some changes made to the timer prescaler code - that would be my bet on what has caused this

I loaded again 4.2beta2-bdshot and tested SERVO_DSHOT_RATE 0,1,2,3 & 4, but motors aren’t arming with any of these values.
Maybe some incompatibility with bluejay esc firmware? Reminding that with 4.2 daily build from Feb 22nd bdshot works normally including reading RPM telemetry so something between caused it…
Don’t know if I’m the only one having problems, but I think this part yet worth testing.
If there are any news in this, I’ll be glad to test.

Ok I can confirm that BlueJay (0.14 - that was the only version I could get loaded) does not work with this board. JazzMaverick 16.73 does however and so does BLHeli32. I’m afraid I don’t have time to look into this right now.

Thanks for the effort, I understand it.
I’ll check whether Jazz Maverick could be a solution for me and hope that later, when 4.2 is done, problem will be discovered and code made maximally compatible. Both betaflight and iNAV work fine with bluejay ESCs so I hope at the end ardupilot will do so.

I actually did this PR a couple of weeks ago to try and resolve these kinds of issues. It does appear to work with this firmware: