Open search
Advertisement

CAN and Linux

At the 13th iCC (international CAN Conference), Linux software support for CAN networking was discussed in several presentations. In particular, the prioritization when executing multiple CAN applications was a topic. Dedicated CAN hardware could be helpful to improve Linux software for multiple CAN networks.

DR. OLIVER HARTKOPP (VOLKSWAGEN) PROVIDED in his presentation an overview of the implemented technologies and challenges to integrate CAN data into a non-real-time multiuser/multitasking operating system. He stated, that due to the standardized network driver model for CAN hardware a wide range of different CAN controllers and System-on-Chip CAN IP-cores are supported by Linux out-of-the-box. “In opposite to usual embedded CAN ECUs the Linux networking system is designed to handle multiple CAN applications using multiple CAN networks at the same time,” he said.
“The integration of the CAN infrastructure into the networking stack allows implementing the CAN-specific transport protocols like ISO 15765-2 or high-performance CAN frame gateways inside the operating system context.”
Sakari Junnila from Wapice (Finland) reported about the Wapice Custom CAN Driver (WCCD). It is targeted for embedded Linux and optimized for ARM-based platforms. In his presentation, he discussed the measured performance and compared the effects of optimizations. Especially, he evaluated how CAN message buffering algorithms affect the bus performance, and showed how Linux kernel version affects the interrupt latencies. He compared his solution against SocketCAN and LinCAN implementations in respect to CPU load and network throughput: “We have also tested the driver’s performance with extremely high bus-loads and have been able to receive over 20000 CAN messages per second. To achieve this, we had to make significant amount of optimizations also to the platform and low-level driver code outside of the CAN driver framework.” Marc Kleine-Budde from Pengutronix (Germany) presented SocketCAN, so-to-say the official CAN application programming interface (API) for Linux operating systems.
He presented a good overview of this approach and mentioned also the upcoming improvements regarding higher-layer protocols. For example, there is CAN_BCM (broadcast manager), which will be used in the automotive domain for periodical transmission of messages. The upcoming Kernel version v3.2 will support CAN_GW a kernel-based gateway/router that routes CAN messages between CAN networks and optionally modifies them. He also briefly reported about CAN_ISOTP, which implements the ISO 15765-2 CAN transport protocol. It allows a reliable point-to-point communication over a CAN infrastructure. Development for automotive protocol SAE J1939 has just been started.
In his presentation, Reinhard Arlt (esd) described a CAN IP core that overcomes the long access times of stand-alone CAN controllers by implementing a 32-bit register interface and streaming the data from the CAN network into the memory of the host CPU by a bus-master DMA. Deep FIFO sizes for reading and writing, precise timestamps and the ability to abort a CAN frame accurately, even if it is in the transmit FIFO and a register model optimized for the needs of CAN, are additional features.  Depending on the selected features, up to twelve CAN modules fit into one Xilinx Spartan XC3S1600E FPGA. After his speech, someone in the audience made the statement. “Your IP core provides all functionality we need to develop sophisticated driver software for Linux.”



Publish date
2012-03-12
Company

Pengutronix
Wapice
Esd

Breadcrumb
Advertisement
Kvaser