CrossChasm C5 Interfaces¶
CrossChasm C5 family of OBD interfaces include versions with different communication radios
such as the Bluetooth Classic, Bluetooth Low Energy and Cellular(GPRS). Most things are common
between the different devices and are described on this page. This page covers the
Bluetooth Classic version or
PLATFORM=CROSSCHASM_C5_BT. See the particular BLE and Cellular pages
for specific differences.
CrossChasm’s C5 OBD interface is compatible with the OpenXC VI
firmware. To build for one of the C5s, compile with one of the flags:
CROSSCHASM_C5 Platform has been renamed to
the fabric shortcut
c5 has been updated to
c5bt. Both old variables are
aliased to the new BT forms.
All C5s come pre-loaded with the correct bootloader, so you don’t need any additional hardware to load the OpenXC firmware. You do have flash an appropriate firmware for your application.
The C5 connects to the CAN1 bus pins on the OBD-II connector.
CROSSCHASM_C5_BLE are mapped to pin 3 and pin 11 of the OBD-II
Flashing a Pre-compiled Firmware¶
Assuming your C5 has the bootloader already flashed, follow
The C5 can be flashed with the same PIC32 avrdude bootloader, as the chipKIT.
The OpenXC fork of the bootloader (the previous link) defines a CROSSCHASM_C5 configuration that exposes a CDC/ACM serial port function over USB. Once the bootloader is flashed, there is a 5 second window when the unit powers on when it will accept bootloader commands.
In Linux and OS X it will show up as something like /dev/ACM0, and you can treat this just as if it were a serial device.
In Windows, you will need to install the stk500v2.inf driver before the CDC/ACM modem will show up - download that file, right click and choose Install. The C5 should now show up as a COM port for for 5 seconds on bootup.
If you need to reflash the bootloader yourself, a ready-to-go .hex file is available in the GitHub repository and you can flash it with MPLAB IDE/IPE and an ICSP programmer like the Microchip PICkit 3. You can also build it from source in MPLAB by using the CrossChasm C5 configuration.
The instructions for compiling from source are identical to the chipKIT
Max32 except that
PLATFORM=CROSSCHASM_C5_CELLULAR instead of
If you will not be using the avrdude bootloader and will be flashing directly
via ICSP, make sure to also compile with
BOOTLOADER=0 to enable the program
to run on bare metal.
The micro-USB port on the board is used to send and receive OpenXC messages.
On the CROSSCHASM_C5_BT,
UART1A is used for OpenXC output at the 230000 baud rate.
Hardware flow control (RTS/CTS) is enabled, so CTS must be pulled low by the
receiving device before data will be sent.
UART data is sent only if pin 0.58 (or PORTB BIT 4, RB4) is pulled high (to 5v). If you are using a Bluetooth module like the BlueSMiRF from SparkFun, you need to hard-wire 5v into this pin to actually enabling UART. To disable UART, pull this pin low or leave it floating.
Mass Storage Device¶
CROSSCHASM_C5_CELLULAR are equipped with an SD card
reader. If enabled, device messages (except debug messages) are logged to the SD card. See
MSD for more info.
Real Time Clock¶
The C5 family of devices have a low power RTC chip that is connected to the PIC32 over the I2C bus. The RTC enables timestamping of vehicle messages at the time of generation. Timestamps are generated with millisecond resolution. See RTC for more info.
In most cases the logging provided via USB is sufficient, but if you are doing
low-level development and need the simpler UART interface, you can enable it
DEFAULT_LOGGING_OUTPUT="UART" build option.
On the C5, logging is on UART3A at 115200 baud (if the firmware was compiled
MSD_ENABLE=1 debug logging is not available as these pins are shared with
the RTC for time stamping.
The C5 has 2 user controllable LEDs. When CAN activity is detected, the green LED will be enabled. When USB or Bluetooth is connected, the blue LED will be enabled.