{"id":26965574,"url":"https://github.com/zubax/canface_cf1","last_synced_at":"2025-08-24T03:42:18.743Z","repository":{"id":45330102,"uuid":"48427460","full_name":"Zubax/canface_cf1","owner":"Zubax","description":"High performance CAN-USB/CAN-UART adapter + UAVCAN devboard","archived":false,"fork":false,"pushed_at":"2022-11-14T14:52:04.000Z","size":15954,"stargazers_count":35,"open_issues_count":4,"forks_count":32,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-15T11:36:28.626Z","etag":null,"topics":["can","can-adapter","can-bus","dronecode","oem","slcan-protocol","uavcan","usb-can","usbcan","zubax"],"latest_commit_sha":null,"homepage":"https://zubax.com/products/babel","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zubax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-22T11:06:09.000Z","updated_at":"2024-10-27T12:14:57.000Z","dependencies_parsed_at":"2023-01-22T04:05:12.219Z","dependency_job_id":null,"html_url":"https://github.com/Zubax/canface_cf1","commit_stats":null,"previous_names":["zubax/canface_cf1"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zubax%2Fcanface_cf1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zubax%2Fcanface_cf1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zubax%2Fcanface_cf1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zubax%2Fcanface_cf1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zubax","download_url":"https://codeload.github.com/Zubax/canface_cf1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246955823,"owners_count":20860365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["can","can-adapter","can-bus","dronecode","oem","slcan-protocol","uavcan","usb-can","usbcan","zubax"],"created_at":"2025-04-03T07:30:05.353Z","updated_at":"2025-04-03T07:30:05.871Z","avatar_url":"https://github.com/Zubax.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Zubax Babel](https://zubax.com/products/babel)\n\n[![Forum](https://img.shields.io/discourse/https/forum.zubax.com/users.svg?color=e00000)](https://forum.zubax.com)\n[![Forum](https://img.shields.io/discourse/https/forum.uavcan.org/users.svg?color=1700b3)](https://forum.uavcan.org)\n\nZubax Babel is a high performance USB-CAN and UART-CAN adapter that can be used as a\nstandalone device or as an embeddable module for original equipment manufacturers (OEM).\n\nBabel implements the quasi-standard SLCAN protocol (aka LAWICEL protocol) that is understood by\nmajority of CAN software products, including the Linux SocketCAN framework.\nIf Babel is used with [UAVCAN](http://uavcan.org) networks,\nwe recommend to use the [Yakut CLI tool](https://github.com/UAVCAN/yakut).\n\n[**ZUBAX BABEL HOMEPAGE**](https://zubax.com/products/babel).\n\n## Features\n\n* Standard SLCAN (aka LAWICEL) protocol.\n* CAN 2.0 A/B 10 kbps to 1 Mbps\n([Dronecode/UAVCAN standard CAN connectors](http://uavcan.org/Specification/8._Hardware_design_recommendations)).\n* USB 2.0 full speed (CDC ACM) (Micro USB type B).\n* TTL UART (5V tolerant) 2400 to 3000000 baud\n([DroneCode standard connector](https://wiki.dronecode.org/workgroup/connectors/start#dcd-mini)).\n* Can be used as an OEM module or as a development board.\n* Embedded bootloader supporting the standard XMODEM/YMODEM protocols over USB and UART.\n* Embedded 120\u0026#8486; CAN termination resistor that can be enabled and disabled by a command.\n* Optional 5 V / 400 mA bus power supply that can be enabled and disabled by a command.\n* CAN bus voltage measurement.\n* Can be powered from USB, UART, CAN, or via the SMD pads.\n\n## Relevant Information\n\nAn article that describes a passive data link delay compensation algorithm -\nrelevant for the CAN frame timestamp recovery problem on the host side:\n[A Passive Solution to the Sensor Synchronization Problem, by Edwin Olson](https://april.eecs.umich.edu/pdfs/olson2010.pdf).\nThis algoritm is employed in the SLCAN backend in [PyUAVCAN library](http://uavcan.org/Implementations/Pyuavcan).\n\n## Firmware\n\n### Change Log\n\n### V1.4\n\n* Fix a hardware compatibility problem for Babel: disable the built-in pull-up resistor on the CAN power disable line.\n\n#### v1.3\n\n* Fix a hardware compatibility problem for Babel-Babel:\n  enable the built-in pull-up resistor on the CAN power disable line.\n\n#### v1.2\n\n* Added a new CLI command: `gpio`. This command allows one to control the SMD GPIO pads via USB/UART.\n* [Fixed handling of zero-length USB transactions](http://www.chibios.com/forum/viewtopic.php?f=25\u0026t=4568\u0026p=32429).\n* Fixed naming of software version fields in the bootloader: `fw_` --\u003e `sw_`.\n\n#### v1.1\n\n* CAN terminator is turned ON by default.\n* CAN power is turned ON by default.\n* Configuration parameters are saved automatically immediately after modification.\nIt is no longer necessary to save configuration manually.\n\n#### v1.0\n\nInitial release.\n\n### Building\n\nInstall ARM GCC toolchain of the correct version (consult with `main.cpp`).\nClone this repository, init all submodules (`git submodule update --init --recursive`),\nthen execute the following from the repository root:\n\n```bash\ncd firmware\nmake -j8 RELEASE=1   # Omit RELEASE=1 to build the debug version\n```\n\nInvoking the make tool from the firmware directory will also build the bootloader.\nThe option `RELEASE` defaults to 0 (off); when set to a non-zero value,\nit will build the firmware in the release configuration rather than the debug configuration.\nThe debug configuration adds a bunch of runtime checks, which make things slower,\nso it should be used only for development purposes.\n\nWhen the firmware is built, the `build` directory will contain the following files:\n\n* `com.zubax.*.application.bin` - the application binary suitable for loading via the bootloader,\nwith correct firmware descriptor and CRC.\n* `com.zubax.*.compound.bin` - the above image combined with the bootloader; can be flashed on an empty MCU.\n* `compound.elf` - ELF file with embedded bootloader and the correct image CRC; can be used for symbol-level debugging.\nSince this ELF includes the bootloader and has a correct firmware descriptor,\nit can be flashed and executed directly with an SWD debugger, no extra steps required.\n\n### Loading\n\n#### Via the Debug Port\n\nUse the [Zubax Dronecode Probe](https://kb.zubax.com/x/iIAh) or any other JTAG/SWD debugger.\nThis helper script should do everything automatically (execute from the firmware directory):\n\n```bash\n./zubax_chibios/tools/blackmagic_flash.sh\n```\n\n#### Via the USB/UART Bootloader\n\nThe bootloader selects between USB and UART (DroneCode debug port) automatically:\nif USB is connected, it will be used, and the UART port will be ignored;\nif USB is not connected, UART will be used instead.\nThe UART port in the bootloader operates at 115200-8N1.\n\n1. Connect to the device's CLI via the USB virtual serial port or via UART (if USB is not connected),\nand execute the command `bootloader` to enter the bootloader. The device will restart.\n2. Immediately after rebooting the device will enter the bootloader and stay there.\nNote that if the bootloader can't find a correct firmware image in the memory,\nit will never boot the firmware, so in this case the first step should be skipped.\nYou can always detect if the device is in the bootloader or in the application by executing `zubax_id`:\nif it's running the bootloader, there will be a field `mode` set to the value `bootloader`.\nAlso the status LED will be glowing solid rather than blinking or being turned off.\n3. In the bootloader's CLI execute `download`. This will start the X/YMODEM receiver.\nTransmit the firmware image into the serial port using either YMODEM, XMODEM, or XMODEM-1K.\nFor example:\n\n```bash\nsz -vv --ymodem --1k $file \u003e $port \u003c $port\n```\n\nThe steps above can be automated with the script `firmware/zubax_chibios/tools/flash_via_serial_bootloader.sh`.\n\n### Hardware Timer Usage\n\n* TIM2 (32-bit) - System tick timer (ChibiOS default, see `STM32_ST_TIM`)\n* TIM5 (32-bit) - CAN timestamping\n\n## License\n\nThe firmware is licensed under the terms of GNU GPL v3.\n\n\u003e Copyright (C) 2015 Zubax Robotics info@zubax.com\n\u003e\n\u003e This program is free software: you can redistribute it and/or modify it under the terms of the\n\u003e GNU General Public License as published by the Free Software Foundation, either version 3 of the License,\n\u003e or (at your option) any later version.\n\u003e\n\u003e This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;\n\u003e without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\u003e See the GNU General Public License for more details.\n\u003e\n\u003e You should have received a copy of the GNU General Public License along with this program.\n\u003e If not, see http://www.gnu.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzubax%2Fcanface_cf1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzubax%2Fcanface_cf1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzubax%2Fcanface_cf1/lists"}