I’m excited to get this “Hello World” example working. I’ve documented the work here to remember what I did and so that others can follow if so desired. I’m a big fan of Pavel Kirienko’s open UAVCAN work (https://uavcan.org/) and OlliW’s awesome work to make it more accessible to hobbyists (http://www.olliw.eu/2017/uavcan-for-hobbyists/).
What was missing for me was a means to bring the UAVCAN based software implementations down to my amateur software developer level. My goal was to develop my own UAVCAN compliant custom sensor and actuator nodes based on whatever I can dream up. I found the learning curve for the combination of STM32 and UAVCAN to be pretty steep. I finally discovered this post (https://forum.uavcan.org/t/libcanard-on-freertos-successfull/238) with this GitHub project (https://github.com/skyyuzhang/UAVCAN_NODE_FreeRTOS) and things started moving forward. With help from several very helpful folks I was eventually able to get a first “Hello World” demo working. I’ve documented a bunch of that journey over here (https://www.rcgroups.com/forums/showthread.php?3090897-DIY-UAVCAN-STM32F1-step-by-step).
I eventually was able to get my demo working in Arduino IDE (v1.8.5 on Win10 in my case) running on eBay sourced low cost STM32F1 hardware, and thought I would share it here. UAVCAN for STM32 Arduino is a simple UAVCAN libcanard (https://github.com/UAVCAN/libcanard) example for the Arduino IDE (https://www.arduino.cc/) running on STM32 development boards.
The example is compiled for and running on a low cost bluepill mini development board (https://wiki.stm32duino.com/index.php?title=Blue_Pill) on Arduino IDE.
This example requires the use of Arduino STM32 core package (https://github.com/stm32duino/Arduino_Core_STM32).
It has been tested on STM32F103C8 development board, using Arduino IDE v1.8.5 with Arduino Core STM32 v1.4.0. CAN bus commands were generated using UAVCAN GUI (https://uavcan.org/GUI_Tool/Overview/) v0.9.0 running on 64 bit Win 10.
I’m using OlliW’s great low cost SLCAN adapter (http://www.olliw.eu/2017/uavcan-for-hobbyists/#chapterslcanadapter) as a bridge to the PC based GUI.
Mike Kelly’s blog post here (https://discuss.ardupilot.org/t/uavcan-canbus-for-the-rest-of-us/22743) was super helpful for understanding how to configure test setups and use the GUI.
My GitHub repo for this project can be found here: https://github.com/geosmall/UAVCAN-for-STM32-Arduino
Test setup pictorial schematic and pics attached below.