# NuttX CAN drivers on STM32H7x3

**URL:** <https://discuss.px4.io/t/nuttx-can-drivers-on-stm32h7x3/29828>\
**Category:** PX4 Autopilot\
**Created:** [November 20, 2022, 12:05pm UTC](https://discuss.px4.io/t/nuttx-can-drivers-on-stm32h7x3/29828 "2022-11-20T12:05:50Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [May 5, 2023, 10:41pm UTC](https://discuss.px4.io/t/nuttx-can-drivers-on-stm32h7x3/29828/12 "2023-05-05T22:41:51Z")

</div>

Let me try to summarize the steps I did to get a driver working on CAN2:

Add this to `boards/px4/fmu-v6x/init/rc.board_defaults`:

```auto
ifup can1

```

Update NuttX submodule to this hack:

> <https://github.com/julianoes/PX4-NuttX/commit/b39310baea123ee27333e1743a80bbc7bd5c74e7>

Add to `boards/px4/fmu-v6x/default.px4board`:

```auto
CONFIG_BOARD_UAVCAN_INTERFACES=1

```

Add to `boards/px4/fmu-v6x/nuttx-config/nsh/defconfig`:

```auto
CONFIG_NETDEV_CAN_BITRATE_IOCTL=y
CONFIG_NETDEV_IFINDEX=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

```

And then basically try out `cansend` and `candump` and adapt those to what I needed.

And I think I still have to set `ENABLE_UAVCAN` to `0` to actually get it to work, even though that shouldn’t be required.

---

_[View the full topic](https://discuss.px4.io/t/nuttx-can-drivers-on-stm32h7x3/29828)._
