# Libuavcan compatibility for ATSAMC21 family microcontroller

**URL:** <https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824>\
**Category:** LibCyphal\
**Created:** [May 5, 2020, 8:35pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824 "2020-05-05T20:35:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle-pawlowski](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/kyle-pawlowski/32/543_2.png) [@kyle-pawlowski](https://forum.opencyphal.org/u/kyle-pawlowski)\
**Post date:** [May 5, 2020, 8:35pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/1 "2020-05-05T20:35:26Z")

</div>

Can libuavcan be used for ATSAMC21 Cortex M0 microcontrollers? If so, how can it be compiled and implemented? Does it handle all of the low-level CAN processes automatically?

---

<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:** [May 5, 2020, 10:27pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/2 "2020-05-05T22:27:10Z")

</div>

Libuavcan v1 is still under active development so I recommend using [**Libcanard**](https://github.com/UAVCAN/libcanard) instead, for now. You will find the integration instructions in the README. Currently, there are no low-level CAN drivers for your platform, but we would appreciate it if you could contribute them to the [platform-specific component library](https://github.com/UAVCAN/platform_specific_components).

---

<div class="post-metadata">

**Author:** ![scottdixon](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/scottdixon/32/39_2.png) [@scottdixon](https://forum.opencyphal.org/u/scottdixon)\
**Post date:** [May 8, 2020, 4:16pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/3 "2020-05-08T16:16:29Z")

</div>

I do like the C21. Hopefully I’ll be able to add support for it in libUavcan in the future.

---

<div class="post-metadata">

**Author:** ![kyle-pawlowski](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/kyle-pawlowski/32/543_2.png) [@kyle-pawlowski](https://forum.opencyphal.org/u/kyle-pawlowski)\
**Post date:** [May 11, 2020, 3:14pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/4 "2020-05-11T15:14:21Z")

</div>

We’re working on a project to use UAVCAN for the C21. How do you think we can work with you to contribute to the drivers for this? Is there a standard format for this sort of thing?

---

<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:** [May 11, 2020, 3:20pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/5 "2020-05-11T15:20:16Z")

</div>

> [@kyle-pawlowski](#):
>
> Is there a standard format for this sort of thing?

Not really. There are just guidelines:

- Make sure the driver matches the usage model of the implementation it is created for. Read the implementation documentation for details.

- Follow the [coding conventions](https://kb.zubax.com/x/84Ah).

- Provide explicit instructions describing how to test the driver. It’s best to set up a HITL CI test but this may get convoluted considering that we still don’t have any infrastructure for that. That’s another area we could use help with btw.

---

<div class="post-metadata">

**Author:** ![echogee](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/e/65b543/32.png) [@echogee](https://forum.opencyphal.org/u/echogee)\
**Post date:** [May 12, 2020, 11:10pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/6 "2020-05-12T23:10:33Z")

</div>

@scottdixon @pavel.kirienko  
I am trying to build add uavcan interface on samc21 uC. Is there some guidance/pointers on how to go about this ?

Alternatively, if you are building an interface for this, is there someway I can help to speed up the process?

---

<div class="post-metadata">

**Author:** ![echogee](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/e/65b543/32.png) [@echogee](https://forum.opencyphal.org/u/echogee)\
**Post date:** [May 24, 2020, 1:32am UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/7 "2020-05-24T01:32:13Z")

</div>

Any help with this ?

---

<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:** [May 24, 2020, 11:33am UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/8 "2020-05-24T11:33:15Z")

</div>

Hi @echogee, please see my earlier post here concerning the guidelines. At the moment we do not have the resources to begin the development of the driver so it seems like you will be spearheading it, which is awesome. Please keep us in the loop and don’t hesitate to raise specific questions if you have any. I don’t think it’s going to be a major effort given the simplicity of the transport; most of the complexity will be related to the peculiarities of your hardware rather than the protocol itself. This post may be relevant regardless of the fact that it is originally written for a different platform: [Libcanard v1 STM32 driver design guidelines](https://forum.opencyphal.org/t/libcanard-v1-stm32-driver-design-guidelines/798).

---

<div class="post-metadata">

**Author:** ![echogee](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/e/65b543/32.png) [@echogee](https://forum.opencyphal.org/u/echogee)\
**Post date:** [May 24, 2020, 3:38pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/9 "2020-05-24T15:38:29Z")

</div>

Will do.

Do you have a reference for the comparison between libcanard and libuavcan ? Is one going to be phased out slowly or so?

---

<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:** [May 24, 2020, 3:54pm UTC](https://forum.opencyphal.org/t/libuavcan-compatibility-for-atsamc21-family-microcontroller/824/10 "2020-05-24T15:54:52Z")

</div>

There are no plans to deprecate either of them. Libuavcan is a complex library intended for not so memory-constrained devices; currently it is a work in progress and it is not ready for use. Libcanard is a simple and compact library that supports only UAVCAN/CAN intended for resource-constrained systems.
