Home

Awesome

Zubax Babel

Forum Forum

Zubax Babel is a high performance USB-CAN and UART-CAN adapter that can be used as a standalone device or as an embeddable module for original equipment manufacturers (OEM).

Babel implements the quasi-standard SLCAN protocol (aka LAWICEL protocol) that is understood by majority of CAN software products, including the Linux SocketCAN framework. If Babel is used with UAVCAN networks, we recommend to use the Yakut CLI tool.

ZUBAX BABEL HOMEPAGE.

Features

Relevant Information

An article that describes a passive data link delay compensation algorithm - relevant for the CAN frame timestamp recovery problem on the host side: A Passive Solution to the Sensor Synchronization Problem, by Edwin Olson. This algoritm is employed in the SLCAN backend in PyUAVCAN library.

Firmware

Change Log

V1.4

v1.3

v1.2

v1.1

v1.0

Initial release.

Building

Install ARM GCC toolchain of the correct version (consult with main.cpp). Clone this repository, init all submodules (git submodule update --init --recursive), then execute the following from the repository root:

cd firmware
make -j8 RELEASE=1   # Omit RELEASE=1 to build the debug version

Invoking the make tool from the firmware directory will also build the bootloader. The option RELEASE defaults to 0 (off); when set to a non-zero value, it will build the firmware in the release configuration rather than the debug configuration. The debug configuration adds a bunch of runtime checks, which make things slower, so it should be used only for development purposes.

When the firmware is built, the build directory will contain the following files:

Loading

Via the Debug Port

Use the Zubax Dronecode Probe or any other JTAG/SWD debugger. This helper script should do everything automatically (execute from the firmware directory):

./zubax_chibios/tools/blackmagic_flash.sh

Via the USB/UART Bootloader

The bootloader selects between USB and UART (DroneCode debug port) automatically: if USB is connected, it will be used, and the UART port will be ignored; if USB is not connected, UART will be used instead. The UART port in the bootloader operates at 115200-8N1.

  1. Connect to the device's CLI via the USB virtual serial port or via UART (if USB is not connected), and execute the command bootloader to enter the bootloader. The device will restart.
  2. Immediately after rebooting the device will enter the bootloader and stay there. Note that if the bootloader can't find a correct firmware image in the memory, it will never boot the firmware, so in this case the first step should be skipped. You can always detect if the device is in the bootloader or in the application by executing zubax_id: if it's running the bootloader, there will be a field mode set to the value bootloader. Also the status LED will be glowing solid rather than blinking or being turned off.
  3. In the bootloader's CLI execute download. This will start the X/YMODEM receiver. Transmit the firmware image into the serial port using either YMODEM, XMODEM, or XMODEM-1K. For example:
sz -vv --ymodem --1k $file > $port < $port

The steps above can be automated with the script firmware/zubax_chibios/tools/flash_via_serial_bootloader.sh.

Hardware Timer Usage

License

The firmware is licensed under the terms of GNU GPL v3.

Copyright (C) 2015 Zubax Robotics info@zubax.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.