(Arduino_Core_STM32) Libcanard based UAVCAN node
Posted: Mon Jan 13, 2020 10:19 am
Here is a "Hello World" example working for libcanard based UAVCAN on Arduino_Core_STM32. 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/) for my needs, mostly UAVs and drones at present. Also, OlliW has done some 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 CAN learning curve to be pretty steep. With help from several very helpful folks I was eventually able to get my first "Hello World" demo working. I've documented a bunch of that journey over in another forum (https://www.rcgroups.com/forums/showthr ... ep-by-step).
I eventually was able to get my demo working in Arduino IDE 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.
The example has been tested on STM32F103C8 based bluepill 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've also tested compile on Ubuntu 16.04 LTS.
I'm using OlliW's low cost DIY SLCAN adapter (http://www.olliw.eu/2017/uavcan-for-hob ... canadapter) as a bridge to the PC based UAVCAN GUI. I also have some low end commercial CAN adapters I will test out over time.
Mike Kelly's blog post here (https://discuss.ardupilot.org/t/uavcan- ... f-us/22743) was super helpful for understanding how to configure test setups and use the somewhat cryptic UAVCAN GUI app.
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. Higher res pics are in the repo in the images folder.
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 CAN learning curve to be pretty steep. With help from several very helpful folks I was eventually able to get my first "Hello World" demo working. I've documented a bunch of that journey over in another forum (https://www.rcgroups.com/forums/showthr ... ep-by-step).
I eventually was able to get my demo working in Arduino IDE 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.
The example has been tested on STM32F103C8 based bluepill 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've also tested compile on Ubuntu 16.04 LTS.
I'm using OlliW's low cost DIY SLCAN adapter (http://www.olliw.eu/2017/uavcan-for-hob ... canadapter) as a bridge to the PC based UAVCAN GUI. I also have some low end commercial CAN adapters I will test out over time.
Mike Kelly's blog post here (https://discuss.ardupilot.org/t/uavcan- ... f-us/22743) was super helpful for understanding how to configure test setups and use the somewhat cryptic UAVCAN GUI app.
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. Higher res pics are in the repo in the images folder.