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/).
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.
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.
Also, important for those of us that source low cost development electronics from global supply chains:
Both my FTDI USB to serial adapter and my SN65HVD230 based can transceiver development boards were sourced from eBay. Everything was attractively low cost, but I should warn people that I had counterfeit issues on both of these boards.
The low cost FTDI FT232RL based adapters can often have counterfeit FTDI chips on them. They work fine at 115200 baud most people use but do not work at the higher 1M baud we really need for UAVCAN work. The SN65HVD230 based adapters I bought just plain out did not function.
In each case replacing the suspect chip with Mouser sourced known good parts fixed the issue.
Great stuff. I hope you don’t mind but I moved one of the images to the top of the blog. This makes it appear on ardupilot.org which is a bit prettier. Thanks!
@MGeo it’s always great to see more people getting interested on UAVCAN stuff. If you ever need those ready made UC4H boards for your tests. jDrones have them in stock and more is coming.
Yep, it works , I had to build from my UBUNTU based Arduino as the STM32 Lib was troublesome on my WIN 10. Put my name on the node and speeded up the display (main.c interval to 300 msec).
Intellectual Property. The KDECAN Protocol Software, documentation, images, content, interfaces, fonts and any other data accompanying this License whether pre-installed on the KDE UVC Series ESC hardware, on disk, in read only memory, on any other media or in any other form (“KDECAN Protocol Software”) are licensed, not sold, to you by KDE Direct for use only under the terms of this License. KDE Direct retains ownership of the KDECAN Protocol Software itself and reserve all rights not expressly granted to you.
Is there a community consensus on the use of closed restricted rights protocols within the Ardupilot project?
Closed protocols dedicated to one particular type of component peripheral such as an ESC would seem at odds with the fundamental benefits that a bidirectional general purpose bus transport might bring to the project
Ok will do, best taken somewhere else (hopefully). Please do realize that incentives for all to put collective effort into DIY solutions will be heavily influenced by community direction.
Blue board on the left is the STM32F103 based SLCAN serial to CAN adapter, with white board to the right being the NUCLEO-F303RE board. Functionally the same as F103 demo, but now we have an FPU and some better peripherals than F103.