Stuck usb mavlink

not usb mavlink, can you help me:(((

Can you elaborate a bit more on the issue you are facing?

Title: PX4 v1.14 on custom FMUv4-style STM32F427 board: USB works in bootloader, but no /dev/ttyACM0 and no USB MAVLink in app firmware

Hi everyone,

I am bringing up a custom STM32F427 board based on the PX4 FMUv4 architecture on PX4 v1.14.

I currently have a USB issue that I cannot fully isolate:

What works

  • The board boots and PX4 app firmware runs

  • I can connect through telemetry UART

  • mavlink status shows one active MAVLink instance on:

    • /dev/ttyS1 @ 57600
  • Bootloader flashing over USB works

What does not work

  • QGroundControl does not connect over USB

  • In NSH, ls /dev does not show /dev/ttyACM0

  • So it looks like USB CDC ACM is not being created in the app firmware

Current observations

From NSH:

param show MAV_0_CONFIG
# MAV_0_CONFIG = 101

param show MAV_1_CONFIG
# MAV_1_CONFIG = 0

param show MAV_2_CONFIG
# MAV_2_CONFIG = 0

mavlink status
# instance #0 on /dev/ttyS1 @57600

ls /dev shows only:

/dev:
 console
 led0
 mmcsd0
 null
 ttyS0
 ttyS1
 ttyS2
 ttyS3
 ttyS4
 ttyS5
 ttyS6

So there is no /dev/ttyACM0.

Important board detail

My custom board does not have USB VBUS detect connected to PA9 like the original FMUv4.

Because of that, I modified board_config.h to force USB as connected/valid:

#define BOARD_ADC_USB_CONNECTED      (1)
#define BOARD_ADC_USB_VALID          (1)

NuttX / defconfig side

My defconfig already has USB-related options enabled, including:

CONFIG_CDCACM=y
CONFIG_SYSTEM_CDCACM=y
CONFIG_STM32_OTGFS=y
CONFIG_STM32_OTGFSDEV=y
CONFIG_USBDEV=y

Board init side

In my custom board init.c, I call:

stm32_usbinitialize();

However, my board usb.c currently has a very minimal implementation:

__EXPORT void stm32_usbinitialize(void)
{
    /* The OTG FS has an internal soft pull-up */
    /* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
}

So basically the function is empty.

My question

For PX4 v1.14 on a custom FMUv4-style board without PA9 VBUS detect:

  1. Is forcing

    #define BOARD_ADC_USB_CONNECTED (1)
    #define BOARD_ADC_USB_VALID     (1)
    
    

    the correct approach?

  2. Should stm32_usbinitialize() remain empty in this case, or does it still need some board-specific USB FS setup even without a VBUS detect pin?

  3. If bootloader USB works but app firmware never creates /dev/ttyACM0, what would be the next file/path to inspect in v1.14:

    • board usb.c

    • NuttX board USB init

    • startup scripts

    • something else?

Any guidance from someone who has ported PX4 v1.14 to a custom STM32F4/FMUV4-like board would be really appreciated.

Thanks.