I’ve just released the first stable release of AP_Periph, version 1.0.0. AP_Periph is a framework for creating UAVCAN peripheral firmwares. I started it as a project as I wanted to make the use of UAVCAN in ArduPilot much more widespread, and the difficulty of creating a high quality UAVCAN firmware for a new device was holding back vendors from creating new devices.
The key idea of AP_Periph is that it leverages the existing technology in ArduPilot. Specifically, it uses the existing ArduPilot sensor libraries which immediately brings a rich set of well tested sensor drivers to the project. It also uses the ArduPilot HAL (Hardware Abstraction Layer), allowing for new peripheral designs to be specified using the hwdef.dat system that has been so successful for ArduPilot over the last couple of years.
You can read more about AP_Periph here:
The key information for the 1.0.0 release is:
- supports GPS (including RTK), baro, magnetometer, rangefinder, airspeed, ADSB, LEDs, safety switch and buzzers
- supports 4 different MCUs, with more added easily via hwdef.dat
- dynamic or static CAN node allocation
- firmware upload
- automatically generated bootloader
- parameter storage in flash
- easy bootloader update
- high resiliance features using watchdog, CRC and board checks
- firmware update via MissionPlanner or uavcan-gui-tool
AP_Periph is targeted both at vendors who are looking to create a UAVCAN peripheral, and at end users who want to buy one of the convenient CAN nodes from mRo or jDrones and use those nodes to convert their existing I2C or serial periphals into UAVCAN peripherals.
The mRo nodes and jDrones gen.nodes already ship with the AP_Periph bootloader, so loading one of the prebuilt firmwares off firmware.ardupilot.org is easy. There are prebuilt firmwares for GPS, ADSB, RangeFinder and Airspeed.
I hope that AP_Periph will help to bring UAVCAN to a lot more users.
Finally, I’d like to thank @olliw42 for his great work on UC4H which led to the creation of the generic CAN nodes. While AP_Periph doesn’t share any code with UC4H, the concept of a generic CAN node that can be converted into many types of UAVCAN peripherals is brilliant and was really the inspiration for this project.