Matek F405 -Wing/SE bdshot firmware variant

Wanted to confirm that based on the firmware folders I’m seeing and the lack of any lines like this PC6 TIM8_CH1 TIM8 PWM(1) GPIO(50) BIDIR (from the hwdef for the Matek F405 non-Wing/SE ardupilot/hwdef.dat at master · ArduPilot/ardupilot · GitHub) in the hwdef for the Matek F405 -Wing, there is currently not bdshot capability for the Matek F405-Wing/SE board. It appears to be only for the original Matek F405, and some other variants. Is this the case? If so, does anyone happen to know if this is a limitation of the -Wing/SE board, or simply that no one has created the firmware for a -Wing/SE bdshot variant? I have never done anything like this before, but I would be interested in helping this - Wing/SE bdshot variant become a reality if it is only a matter of time/effort and learning on my part. Thanks.
image

It’s just that no-one has created the variant.

Thanks for the response, Andy! Could you point me towards any resources that could help me learn the process of creating the variant? I would love to work on it.

EDIT just found this Porting to a new flight controller board — Dev documentation

Looks like a good place to start. :slight_smile:

Try this Bdshot version of MatekF405-Wing by andyp1per · Pull Request #21498 · ArduPilot/ardupilot · GitHub

Hi Andy,
I’d love to test this out, but so far am pretty lost on installing WSL to use waf to build this firmware. Am I even heading in the right direction?

Here’s a build:

arducopter.apj (814.2 KB)

Thank you! I tested on a “bench FC” (it does not function with battery voltage, but fine with USB), and got the following result after flashing BlueJay 0.16 to the BLHeli_S ESC. I only have one connected to the flight controller right now, but I was able to configure things to read the motor rpm from that one ESC, as you can see in the short log. I just use this FC as a “passthrough” for ESCs, so most of the arming checks, etc. are disabled. It seems that it is working well, unless you see anything to be concerned about, my next step is to try it on a previously flying quad with 4 ESCs, and from there a test flight(s).

Bdshot w_Bluejay.bin (432 KB)

I have a F405-SE in my plane. @andyp1per could you make a build for plane as well?

Doesn’t the regular bdshot build work for this?

Sorry, looked at at 4.2.3 and couldn’t find it. Found it in latest now :slight_smile:

So I had a strange issue today - flew the copter on this -Wing build, and all seemed to be working well, but when I went to download the dataflash log to verify things, the log download in Mission Planner would start, get to around 5%, and then the flight controller would apparently disconnect itself from the PC and the log download would fail. This happened repeatedly over USB, so I tried downloading over a telemetry radio connection, and this was working, but was of course very slow, and I did not wait for it to finish. So I flashed the Arduplane 4.2.3 to the flight controller just to start fresh, and was able to download one of the copter logs from before via USB no problem. Any ideas what this would be? Would logging while disarmed help diagnose this?
Attached is the log from the flight itself. I’m using BlueJay 0.16 firmware on the ESCs. I was also searching for the parameter to enable ESC rpm to be shown in Mission Planner while connected via telemetry - is this possible? Thanks.
https://usu-my.sharepoint.com/:u:/g/personal/a01416515_aggies_usu_edu/EWB6x-b5Dp1EqNNPy_W_7vQBwjjgeLmFUN2Aa-IeqOupig?e=mXPi2y

It’s probably just a CPU load issue - log download completely pegs the CPU and on an F4 there are probably no cycles to do anything else. If you can get at logs by removing the SD card that would be better. I’m not sure what else we can do - maybe we should disarm the motors while downloading. ESC updates require mavlink 2 on your telemetry connection to be seen - just change the serial type

Thanks Andy. That’s too bad, but I understand it’s pushing the limits of the F4. When you say “disarm the motors” - do you mean to cut off communication from them completely during that time - since they’re already “disarmed” in regards to flight when I’m downloading the logs, of course.

Thanks for the mavlink2 tip as well!

Yes because they are still sending 0 throttle dshot signals and trying to read the response

Ah, I see. And they would still be doing that if the only the FC was powered up, without power to the ESCs? I think I tried both ways yesterday.

Yes, we send the signal regardless

Gotcha. Thanks for the help and explanations, @andyp1per

Another question regarding log download. I know it is recommended to download dataflash logs through the main interface on the “Data” page of Mission Planner, but I thought it was also possible to download logs through the MAVftp section in Mission Planner. I tried this, and was able to download a log without the FC disconnecting like it was before, but then I get an error when I try to “review” this type of log through Mission Planner. What does this mean? The log also shows its file size as “0 bytes”.
image