PX4 on betafpv 75X whoop

Hey all,

I’m trying to get PX4 running on my new betafpv 75X whoop drone. I am following the instructions found here https://docs.px4.io/v1.9.0/en/complete_vehicles/betafpv_beta75x.html but QGroundControl is unable to detect my drone. I’ve flashed the bootloader onto the drone following the omnibus_f4_sd instructions. I’ve done it both through betaflight software, as well as from source. I’m fairly confident the boadloader is on the drone. However, when I plug the drone into my laptop and open QGroundControl, nothing happens. I’ve tried the newest version of QGC, as well as the newest daily builds version. Same outcome. I’ve also tried flashing the PX4’s firmware directly using make omnibus_f4sd_default upload and it just hangs and says it is waiting for the bootloader. Any ideas?

Hi

Are you on Linux? After attaching the whoop via USB, what is the output of dmesg?
Did you try with a different USB cable?

I am running Ubuntu 18.04. I’ve tried multiple USB cables. When I connect the drone dmesg doesn’t show anything new. However, if I hold down the boot button on the drone while plugging it in, (like I did when I flashed the bootloader) I get the following output. Should I be getting something even without pressing the boot button when I plug it in?

[136259.587553] usb 1-1: new full-speed USB device number 26 using xhci_hcd [136259.736535] usb 1-1: New USB device found, idVendor=0483, idProduct=df11 [136259.736536] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [136259.736537] usb 1-1: Product: STM32 BOOTLOADER [136259.736538] usb 1-1: Manufacturer: STMicroelectronics [136259.736538] usb 1-1: SerialNumber: 347638753437

Yes once the bootloader is flashed, and replugged, it should show up as PX4 device.
Not sure what’s wrong then. I assume you don’t have the battery connected?

I’ve tried both with and without the battery connected and dmesg still doesn’t show anything. So it sounds like the bootloader isn’t flashed correctly. Here are the steps I took to flash the bootloader.

git clone --recursive  https://github.com/PX4/Bootloader.git
cd Bootloader
make omnibusf4sd_bl

and then I flashed it with:

dfu-util -a 0 --dfuse-address 0x08000000 -D  build/omnibusf4sd_bl/omnibusf4sd_bl.bin

Which gives me the following output:

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.                                                                                                                                                 
Copyright 2010-2016 Tormod Volden and Stefan Schmidt                                                                                                                                                               
This program is Free Software and has ABSOLUTELY NO WARRANTY                                                                                                                                                       
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/                                                                                                                                                   
                                                                                                                                                                                                                   
dfu-util: Invalid DFU suffix signature                                                                                                                                                                             
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!                                                                                                                                      
Opening DFU capable USB device...                                                                                                                                                                                  
ID 0483:df11                                                                                                                                                                                                       
Run-time device DFU version 011a                                                                                                                                                                                   
Claiming USB DFU Interface...                                                                                                                                                                                      
Setting Alternate Setting #0 ...                                                                                                                                                                                   
Determining device status: state = dfuERROR, status = 10                                                                                                                                                           
dfuERROR, clearing status                                                                                                                                                                                          
Determining device status: state = dfuIDLE, status = 0                                                                                                                                                             
dfuIDLE, continuing                                                                                                                                                                                                
DFU mode device DFU version 011a                                                                                                                                                                                   
Device returned transfer size 2048                                                                                                                                                                                 
DfuSe interface name: "Internal Flash  "                                                                                                                                                                           
Downloading to address = 0x08000000, size = 9740                                                                                                                                                                   
Download        [=========================] 100%         9740 bytes                                                                                                                                                
Download done.                                                                                                                                                                                                     
File downloaded successfully 

Which makes me think it worked successfully. However, when I unplug and replug the drone back in, dmesg still doesn’t recognize anything. Any other thoughts?

Looking at it closer, I think I bought the Beta75X 3S from here https://betafpv.com/products/beta75x-whoop-quadcopter-3s. On their product page it says:

“FC board is upgraded to F4 2-4S AIO 12A Brushless FC. Definitely gives your 3S whoop drone much more POWER.”

The part where they say it’s an upgraded FC makes me think that they changed something and that PX4 is only compatible with the Beta75X 2S version and not the Beta75X 3S. Could that be why the bootloader isn’t working properly? Is there anyone who can confirm this? If that is the case, is there any way to modify the drone or change the bootloader so that it would be compatible with the Beta75X 3S?

Thanks in advance.

Indeed, it’s a different board. It’s using the Betaflight MATEKF411 target. You find pinout information here if you want to add support for it.

Great. I’ll look into it. I appreciate your help. As a comparison,
in that repo you linked to, does the beta75X 2S use the OMNIBUS, OMNIBUSF4, or OMNIBUSF4FW target?

Cool, let me know if you have questions.
It’s OMNIBUSF4SD.

I haven’t had much time lately but I’ve started a little on porting the 3S to work with the PX4 bootloader. This is all new territory to me but I think I’ve added the MatekF411 target into the Makefile correctly, I’m just not sure how to edit the “hw_config.h” file in the bootloader repository. I’ve mainly just copied the Omnibus section. I’ve tried referencing https://github.com/betaflight/betaflight/blob/master/src/main/target/MATEKF411/target.h for the pinout information but I just don’t have enough experience here to know what needs to be changed/added. This is what I have so far.

/****************************************************************************
 * TARGET_HW_MATEKF411
 ****************************************************************************/

#elif  defined(TARGET_HW_MATEKF411)

# define APP_LOAD_ADDRESS               0x08008000
# define BOOTLOADER_DELAY               5000
# define INTERFACE_USB                  1
# define INTERFACE_USART                0
# define USBDEVICESTRING                "PX4 MatekF411"
# define USBPRODUCTID                   0x0016

# define BOARD_TYPE                     42
# define BOARD_FLASH_SECTORS            11
# define BOARD_FLASH_SIZE               (1024 * 1024)
# define BOARD_FIRST_FLASH_SECTOR_TO_ERASE    1
# define APP_RESERVATION_SIZE           (1 * 16 * 1024) /* 1 16 Kib Sectors */

# define OSC_FREQ                       8

# define BOARD_PIN_LED_ACTIVITY         GPIO5
# define BOARD_PIN_LED_BOOTLOADER       GPIO4
# define BOARD_PORT_LEDS                GPIOB
# define BOARD_CLOCK_LEDS               RCC_AHB1ENR_IOPBEN
# define BOARD_LED_ON                   gpio_clear
# define BOARD_LED_OFF                  gpio_set

# define BOARD_USB_VBUS_SENSE_DISABLED

# define USBMFGSTRING                   "Vertile"

Like I said, I really haven’t changed anything from the omnibus section in this file. I believe this is the last thing I need to update to make it work. Any pointers on how to correctly define each of these settings for the beta75X 3S?

You can try with these changes:

# define BOARD_PIN_LED_ACTIVITY         GPIO14
# define BOARD_PIN_LED_BOOTLOADER       GPIO13
# define BOARD_PORT_LEDS                GPIOC
# define BOARD_CLOCK_LEDS               RCC_AHB1ENR_IOPCEN

The rest should be the same as on the Omnibus.

Now when I flash the bootloader the LEDs come on (Thanks!), But dmesg still doesn’t show anything when I plug the drone in. I must be missing some other crucial things here. The only files I’ve changed are “board_types.txt”, “hw_config.h”, “Jenkinsfile”, and the Makefile. (I can send you my changes if that would help). I don’t feel like I changed anything board specific except for the LED pins that you just recommended. Are there a lot of steps I am missing?

I really appreciate your help.

Hmm, then something with the USB is not working. You can try a few things:
Add:

# define USB_FORCE_DISCONNECT           1

Or remove:

# define BOARD_USB_VBUS_SENSE_DISABLED

I tried both and still no luck. I’ve tested the same USB cable with a pixhawk4 mini and dmesg shows that it’s connected, so I know my USB cable isn’t the issue. Here is my updated “hw_config.h” file

/****************************************************************************
 * TARGET_HW_MATEKF411
 ****************************************************************************/

#elif  defined(TARGET_HW_MATEKF411)

# define APP_LOAD_ADDRESS               0x08008000
# define BOOTLOADER_DELAY               5000
# define INTERFACE_USB                  1
# define INTERFACE_USART                0
# define USBDEVICESTRING                "PX4 MatekF411"
# define USBPRODUCTID                   0x0016

# define BOARD_TYPE                     42
# define BOARD_FLASH_SECTORS            11
# define BOARD_FLASH_SIZE               (1024 * 1024)
# define BOARD_FIRST_FLASH_SECTOR_TO_ERASE    1
# define APP_RESERVATION_SIZE           (1 * 16 * 1024) /* 1 16 Kib Sectors */

# define OSC_FREQ                       8

# define BOARD_PIN_LED_ACTIVITY         GPIO14
# define BOARD_PIN_LED_BOOTLOADER       GPIO13
# define BOARD_PORT_LEDS                GPIOC
# define BOARD_CLOCK_LEDS               RCC_AHB1ENR_IOPCEN
# define BOARD_LED_ON                   gpio_clear
# define BOARD_LED_OFF                  gpio_set

# define USB_FORCE_DISCONNECT           1

# define USBMFGSTRING                   "Vertile"

Do I need to change the APP_LOAD_ADDRESS? USBPRODUCTID? BOARD_TYPE? Im just not sure.

This is the command I am using to flash the drone and it completes “File downloaded successfully”.

dfu-util -a 0 --dfuse-address 0x08000000 -D  build/matekf411_bl/matekf411_bl.bin

I was also reading through the datasheet for the STM32F411CEU6 https://www.st.com/resource/en/datasheet/stm32f411ce.pdf and I think the “OSC_FREQ” param should be set to 16? Can you confirm that? I tried changing it to 16 and it still doesn’t work, but now the blue LED is flashing instead of solid. Not sure if that’s a good thing or not.

Other thoughts?

No, nothing else that you need to change.
OSC_FREQ should be 8 from what I have seen (there is typically an external oscillator), but a blinking LED is expected and correct.

At this point you should consider using jtag to see what’s going on.

Currently no Whoop quad is available that uses F405 which is needed (at least 1Mb flash space). Most Whoops use F411 with .5Mb flash so PX4 doesn´t fit into at all …
If you leave out a lot of modules with PX4, it will just fit into the constrained flash of 1Mb.
Therefore no F411 works and F405 is the lowest possible denominator.
As soon as a STM32F405RGT6 is on the board, the bootloader and the FW upload process will also work.
I´m still searching for a long time for a controller or a whole small brushless ducted fan vehicle that is able to run PX4

Mamba F405Mini seems currently to be the best alternative fc that runs perfect as PX4 OB F4 target it fits into the most 75 … 85 Whoops as a direct replacement of the in the meantime mostly used Matek F411 that´s not compatible to PX4 at all. Scorpion 80 is a vehicle that can be upgrated with this fc

Hi!

I’m currently also looking for a tiny drone that can run PX4.
You mentioned you were looking for a board that could run PX4 and fit into a small drone. As you mentioned, a sort of requisite is that the board uses, at least, an F405 processor.
I know it has been some time since your post, but I guess this board should do the trick, since it is an OMNIBUSF4SD target on a 20x20 mounting: https://geprc.com/product/gep-stable-v2-f4-35a/.

could work with the standard Omnibus F4 target cause flash based parameters are used, so a sd slot isn´t needed anymore to store settings. There are now many 20x20 mm fc that would run PX4, but most lack the right breakout pins to connect all peripherals.

1 Like