# Libuavcan driver for STM32H7?

**URL:** <https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360>\
**Category:** LibCyphal\
**Created:** [February 15, 2019, 10:21pm UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360 "2019-02-15T22:21:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tridge](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/tridge/32/119_2.png) [@tridge](https://forum.opencyphal.org/u/tridge)\
**Post date:** [February 15, 2019, 10:21pm UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/1 "2019-02-15T22:21:41Z")

</div>

Has anyone written a libuavcan driver for STM32H7xx? It uses a new FDCAN peripheral, so it looks like some quite significant changes from the F4/F7 driver.  
If nobody else has done one then I will try to do one. I’m developing for a STM32H743.  
Cheers, Tridge

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [February 17, 2019, 3:08pm UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/2 "2019-02-17T15:08:45Z")

</div>

Hi Tridge,

I don’t think a driver for that hardware has ever been published by anyone. You should be aware that the legacy UAVCAN v0 does not support CAN FD; if you are switching to a CAN-FD-capable hardware, you should consider migrating to UAVCAN v1.0 (the first stable release of the specification). The spec draft is currently available at [https://new.uavcan.org/specification](https://new.uavcan.org/specification) (section 3-DSDL is incomplete).

---

<div class="post-metadata">

**Author:** ![tridge](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/tridge/32/119_2.png) [@tridge](https://forum.opencyphal.org/u/tridge)\
**Post date:** [February 24, 2019, 8:10pm UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/3 "2019-02-24T20:10:38Z")

</div>

Hi Pavel,  
My initial aim is for compatibility with existing CAN (what ST calls “classic” CAN) on F4 and F7, not CAN FD. We don’t plan on switching to CAN FD for a while yet.  
Cheers, Tridge

---

<div class="post-metadata">

**Author:** ![FZe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@FZe](https://forum.opencyphal.org/u/FZe)\
**Post date:** [October 2, 2019, 7:37am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/4 "2019-10-02T07:37:30Z")

</div>

Hi  
I’m also looking for drivers for the STM32H7 using classic can mode  
Does any one have an example to share?  
Cheers  
Filip

---

<div class="post-metadata">

**Author:** ![FZe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@FZe](https://forum.opencyphal.org/u/FZe)\
**Post date:** [October 3, 2019, 7:19am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/5 "2019-10-03T07:19:42Z")

</div>

@pavel.kirienko is there any documentation on how to implement support for a new MCU in the driver package?  
@tridge did you manage to make a port for the H7?  
Any help appreciated  
Cheers!

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [October 3, 2019, 8:01am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/6 "2019-10-03T08:01:26Z")

</div>

> [@FZe](#):
>
> is there any documentation on how to implement support for a new MCU in the driver package?

Of course there is: [Open technology for real-time intravehicular distributed computing and communication based on modern networking standards](https://uavcan.org/Implementations/Libuavcan/Platforms/#adding-support-for-a-new-platform)

tl;dr implement the following interfaces:

- `uavcan::ICanDriver`
- `uavcan::ICanIface`
- `uavcan::ISystemClock`

---

<div class="post-metadata">

**Author:** ![FZe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@FZe](https://forum.opencyphal.org/u/FZe)\
**Post date:** [October 3, 2019, 10:38am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/7 "2019-10-03T10:38:28Z")

</div>

Thanks Pavel, I have seen these but was wondering if there are some more info about the implemented STM32 driver lib, I guess I have to make some changes since its a different MCU and CAN driver.  
/Filip

---

<div class="post-metadata">

**Author:** ![tridge](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/tridge/32/119_2.png) [@tridge](https://forum.opencyphal.org/u/tridge)\
**Post date:** [October 4, 2019, 1:55am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/8 "2019-10-04T01:55:39Z")

</div>

> [@FZe](#):
>
> @tridge did you manage to make a port for the H7?

yes, we support CAN on H7 in ArduPilot. Sid did the work on it.  
Core code is here:

> <https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_ChibiOS/CANFDIface.cpp>

---

<div class="post-metadata">

**Author:** ![FZe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@FZe](https://forum.opencyphal.org/u/FZe)\
**Post date:** [October 4, 2019, 6:18am UTC](https://forum.opencyphal.org/t/libuavcan-driver-for-stm32h7/360/9 "2019-10-04T06:18:59Z")

</div>

Thank you @tridge!  
I will check it out 🙂
