# Where to find great example of using UAVCAN in embedded system?

**URL:** <https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397>\
**Category:** Libcanard\
**Created:** [March 18, 2019, 8:34pm UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397 "2019-03-18T20:34:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arrowcircle](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/arrowcircle/32/173_2.png) [@arrowcircle](https://forum.opencyphal.org/u/arrowcircle)\
**Post date:** [March 18, 2019, 8:34pm UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/1 "2019-03-18T20:34:27Z")

</div>

Hi! I just read uavcan specification and my head is little overwhelmed.  
I started googling and found simple example of using uavcan with stm32f103 and FreeRTOS.  
But this is very simple example of the application without any good design principles.

Is there are any information about making solid code on simple MCUs like STM32f103 with FreeRTOS?

---

<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:** [March 19, 2019, 8:10am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/2 "2019-03-19T08:10:54Z")

</div>

While having high-quality examples would certainly be helpful, questions of general software engineering practices are way outside of the scope of this project. ¯\_(ツ)\_/¯

Libcanard in particular is simple enough to allow one to design an application around it in an arbitrary way, so it should not be overly constraining. It is certainly not a framework, it does not seem to require an extensive documentation of best development practices.

---

<div class="post-metadata">

**Author:** ![arrowcircle](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/arrowcircle/32/173_2.png) [@arrowcircle](https://forum.opencyphal.org/u/arrowcircle)\
**Post date:** [March 19, 2019, 8:37am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/3 "2019-03-19T08:37:41Z")

</div>

Having a solid skeleton for embedded application will make using UAVCAN easier.  
In my undestanding, if someone choose to use UAVCAN, application will be developed with UAVCAN in center.  
And if UAVCAN is the main part, than it will be very useful to have some example application at least.

Idea of usage is something like this:

1. Clone skeleton application
2. Define ids, values and so on
3. Delete not needed code
4. Add implementation for needed functionality (sensor reading or something else).

I am talking about simple “sensor” nodes.

Any ideas?

---

<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:** [March 19, 2019, 8:45am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/4 "2019-03-19T08:45:30Z")

</div>

What you are saying makes sense. If you could draft up a sensible example application, we would gladly instruct neophytes to use that as a starting point. If you need hardware for that work, please PM me (I speak Russian).

---

<div class="post-metadata">

**Author:** ![arrowcircle](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/arrowcircle/32/173_2.png) [@arrowcircle](https://forum.opencyphal.org/u/arrowcircle)\
**Post date:** [March 19, 2019, 9:17am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/5 "2019-03-19T09:17:49Z")

</div>

Thanks for the answer, but I am kinda new to embedded development.  
I can make this skeleton, but I don’t know great how great embedded program should look like.  
Should it use RTOS? What platform is preferred?

---

<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:** [March 19, 2019, 9:40am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/6 "2019-03-19T09:40:32Z")

</div>

> [@arrowcircle](#):
>
> Should it use RTOS? What platform is preferred?

Requirements vary from application to application. Seeing as Libcanard is intended for simple nodes, my guess is that most applications are unlikely to use any RTOS. As for the platform – ideally, the demo should be portable; otherwise, I would consider using NXP S32K: [S32K Auto General-Purpose MCUs | NXP Semiconductors](https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/32-bit-automotive-general-purpose-microcontrollers:S32K). Unlike STM32, S32K is designed with safety-critical applications in mind, their MCUs are ASIL-B qualified, and they support CAN FD.

---

<div class="post-metadata">

**Author:** ![Niranjan1](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/n/6f9a4e/32.png) [@Niranjan1](https://forum.opencyphal.org/u/Niranjan1)\
**Post date:** [March 22, 2019, 3:53pm UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/7 "2019-03-22T15:53:16Z")

</div>

Hi,  
You have mentioned you found a simple example of UAVCAN between STM32 with FREERTOS? Can you please share the link of that? I am working on a similar task but partly successful. Maybe this example could help in completing it.  
Regards  
Niranjan

---

<div class="post-metadata">

**Author:** ![arrowcircle](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/arrowcircle/32/173_2.png) [@arrowcircle](https://forum.opencyphal.org/u/arrowcircle)\
**Post date:** [March 22, 2019, 5:40pm UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/8 "2019-03-22T17:40:13Z")

</div>

> [@LIbcanard on freeRTOS SUCCESSFULl!](https://forum.opencyphal.org/t/libcanard-on-freertos-successfull/238/4):
>
> Hello Skyyuzhang, Thanks again for sharing your working project on GitHub. I built it up and tested on inexpensive STM32F103s with known good SN65HVD230 adapters and had immediate success. Compiled with gcc 7.3.0 on Windows. I’ve documented it here [https://www.rcgroups.com/forums/showpost.php?p=40932635&postcount=16](https://www.rcgroups.com/forums/showpost.php?p=40932635&postcount=16) Thanks so much, George [desktop]

---

<div class="post-metadata">

**Author:** ![Niranjan1](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/n/6f9a4e/32.png) [@Niranjan1](https://forum.opencyphal.org/u/Niranjan1)\
**Post date:** [March 23, 2019, 1:49am UTC](https://forum.opencyphal.org/t/where-to-find-great-example-of-using-uavcan-in-embedded-system/397/9 "2019-03-23T01:49:52Z")

</div>

Thank you. If I am successful in my approach , I will keep you posted.  
Happy coding.  
Regards  
Niranjan
