
CAN Bus
The CAN interface is based on the Microchip MCP2515 stand-alone Controller Area
Network (CAN) controller that implements the CAN specification version 2.0B. It is capable
of transmitting and receiving both standard and extended data and remote frames.
The MCP2515 has two acceptance masks and six acceptance filters that are used to filter
out unwanted messages, thereby reducing the host MCU’s overhead.
The MCP2515 interfaces with the Raspberry Pi via its Serial Peripheral Interface (SPI).
You should enable SPI and configure kernel support for the MCP2515.
To enable SPI, run the “raspi-config” configuration utility:
$
sudo raspi-config
Go to “Advanced Options”, “SPI” and select “yes” to enable the SPI interface, then edit
/boot/config.txt and add this line at the end of the file:
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835-overlay
Save the file and reboot your Raspberry Pi.
Disabling Bluetooth, WiFi and the serial console
On Raspberry Pi 3, the main UART is used for Bluetooth, and the TX/RX pins on the GPIO
connector are controlled by a limited function Mini UART.
To route the main UART to the RX/TX pins that are connected to the Strato Pi serial port
you should disable Bluetooth. Edit /boot/config.txt and add these lines at the end of the file:
# Disable Bluetooth
dtoverlay=pi3-disable-bt
You may also run the following command to disable the Bluetooth HCI UART driver:
sudo systemctl disable hciuart
If you need to disable the WiFi, one convenient solution on Raspbian distributions is to
blacklist the WiFi driver. Edit /etc/modprobe.d/raspi-blacklist.conf and add these lines at
the end of the file:
# Disable WiFi
blacklist brcmfmac
blacklist brcmutil
Note that Bluetooth must be disabled to ensure proper operation of Strato Pi’s serial port.
If you are using Strato Pi’s serial port for your applications, you also need to disable the
Linux serial console, otherwise it will send console data to the serial port.
17
Strato Pi CAN User Guide