Nuttx FDCAN configuration at pixhawk 6x

Hi everyone!!! I have a requirement to use ETH and FDCAN in Pixhawk 6x at the same time.But I can only use one of them at the same time.If I configure FDCAN, ETH cannot be used.There is my configuration:

CONFIG_NETDEV_LATEINIT=y
CONFIG_NETDEV_IFINDEX=y
CONFIG_NETDEV_CAN_BITRATE_IOCTL=y
CONFIG_NET_CAN=y
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
CONFIG_NET_CAN_SOCK_OPTS=y
CONFIG_NET_CAN_NOTIFIER=y
CONFIG_NET_TIMESTAMP=y
CONFIG_STM32H7_FDCAN1=y
CONFIG_STM32H7_FDCAN2=y
CONFIG_CANUTILS_CANDUMP=y
CONFIG_CANUTILS_CANSEND=y

I found that as long as CONFIG_NETDEV_LATEINIT=y is set, the system will crash and constantly restart.
Anybody can give me some advice?Thank!!!

my px4 version is v1.14.3

I already solve this problem. The reason is that ETH was not initialized during FDCAN initialization.There is my configuration:

PX4 Version v1.14.3

1、PX4-Autopilot/boards/px4/fmu-v6x/nuttx-config/nsh/defconfig

Add these configuration:

CONFIG_NETDEV_LATEINIT=y
CONFIG_NETDEV_IFINDEX=y
CONFIG_NETDEV_CAN_BITRATE_IOCTL=y
CONFIG_NET_CAN=y
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
CONFIG_NET_CAN_SOCK_OPTS=y
CONFIG_NET_CAN_NOTIFIER=y
CONFIG_NET_TIMESTAMP=y
CONFIG_STM32H7_FDCAN1=y
CONFIG_STM32H7_FDCAN2=y
CONFIG_CANUTILS_CANDUMP=y
CONFIG_CANUTILS_CANSEND=y
CONFIG_FDCAN1_ARBI_BITRATE=500000
CONFIG_FDCAN1_DATA_BITRATE=2000000
CONFIG_FDCAN2_ARBI_BITRATE=500000
CONFIG_FDCAN2_DATA_BITRATE=2000000

2、PX4-Autopilot/boards/px4/fmu-v6x/src/init.c

#include "stm32_fdcan_sock.h"
#include "stm32_ethernet.h"

Add the following code at the end of the __EXPORT int board_app_initialize(uintptr_t arg) function.

#if STM32H7_NETHERNET > 0 && defined(CONFIG_STM32H7_ETHMAC)
  stm32_ethinitialize(0);
#endif

#ifdef CONFIG_STM32H7_FDCAN1
  stm32_fdcansockinitialize(0);
#endif

#ifdef CONFIG_STM32H7_FDCAN2
  stm32_fdcansockinitialize(1);
#endif

1719993589080