
This chapter is part two of automotive foundation classes, focusing on CAN network design. It introduces CAN's history, developed by BOSCH in the 1980s and standardized later. Wide adoption in multiple industries is emphasized, along with strengths and weaknesses in performance, cost, security, and speed. It discusses core principles and the importance of careful implementation at higher system and application layers.
This chapter gives an overview of CAN in the automotive industry, comparing it to other protocols. It covers cost, bandwidth, speed, and real-time capabilities, and highlights its compatibility with existing devices.
This chapter gives an overview of BOSCH CAN spec 2.0. It has two parts: A and B. The differences between Part A and Part B are briefly touched on.
This chapter, "Return of the Tin Can Ladies," explores CAN through the analogy of tin can ladies. It focuses on properties like resource sharing, extensibility, real-time qualities, and error-state control. Commercial benefits and challenges in priority-based system design are discussed.
This chapter explores CAN's media access strategy, specifically arbitration at the MAC layer. It highlights the importance of media access in CAN and its implementation on a shared medium. The chapter covers message transfer, frame formats, prioritization, and the arbitration process. CSMA/CD with non-destructive bit arbitration is explained. The importance of priority-based message arbitration and challenges in assigning priorities in complex systems are also discussed.
This chapter discusses bit encoding in data transmission. It covers methods like NRZ, RZ, and Manchester encoding, explaining their pros and cons. Handling of bit encoding in the BOSCH CAN spec and challenges of clock recovery and bit cell stabilization in CAN networks are explored. The chapter concludes by summarizing key points and their implications for CAN bit encoding.
This chapter discusses CAN bit transmission synchronization. It highlights challenges in reading correct bit values and the need for synchronization to prevent errors. Hard-synchronization and re-synchronization concepts are explored, maintaining alignment among participants. Bit stuffing, inducing bit pattern transitions to prevent long identical bit sequences, is explained. The chapter emphasizes synchronization's significance for reliable communication in CAN networks.
This chapter explores CAN bit timing. It emphasizes the need for a common understanding among participants in reading and setting a bit. It covers bus arbitration, message acknowledgement, and error signaling relying on bit status changes. Clock synchronization, impact of drift and noise, and compensation strategies are discussed. Arbitration synchronization and signal propagation delay's significance in accurate data transmission are addressed. Specific segments and time quanta in CAN bit timing are also explored.
This chapter covers the physical layer of communication networks. It explores simplifying programming through bit timing configuration, propagation, and phase segments in CAN controllers. The impact of sampling point programming on node sensitivity and clock frequency fluctuations is emphasized. Wire length, network bandwidth, voltage drops, cable termination, and proper grounding in vehicle networks are discussed.
This chapter discusses unofficial practices in the BOSCH CAN spec that were later standardized. It emphasizes the importance of transceivers in CAN networks, which amplify voltage, drive lines, provide isolation, and protect controllers. The adoption of differential voltage transfer for high-speed CAN networks is explored, highlighting its robustness and resistance to interference. Signal reflections, twisted wires, and common connector types in CAN networks are briefly mentioned.
This chapter focuses on data frame types in the datalink layer. It explores frame types like data, remote, error, and flow control frames defined in the BOSCH CAN spec. The extended frame format, offering an expanded range of identifiers, is introduced. The structure of a data frame, including fields like start of frame marker, arbitration bits, identifiers, control bits, data fields, and checksum, is discussed. The trade-off between message efficiency and extended frame format usage is highlighted.
This chapter introduces remote, error, and overload frames in network communication. Remote frames request data transmission, error frames indicate network errors, and overload frames control flow and request time delays. The format and characteristics of each frame type are explained, emphasizing their purpose and significance. Interframe spacing and differences between error and overload frames are also discussed.
This chapter covers CAN error handling and fault confinement in the CAN protocol. It explains error handling mechanisms and preventing error propagation. Real-time challenges in implementing error handling in systems like cars or airplanes are highlighted. The state machine and error counting rules for detecting and classifying faulty nodes in the network are discussed.
This chapter provides an overview of CAN message validation. It addresses five error types: CRC, format, bit stuffing, acknowledgment, and individual bit errors. The cycle redundancy check is explained as an error detection mechanism. Other mechanisms like acknowledge field checks, form error detection, bit monitoring, and bit stuffing are covered.
This chapter discusses CAN reference controller designs, divided into packaging and depth of CAN implementation in hardware. It explores their implications on pricing and behavior. Basic and full CAN controller designs are compared, highlighting features and advantages. The challenge of priority inversion in the controller host interface and its impact on network and system design are examined, with an example provided.
This troubleshooting chapter addresses common issues in CAN networks. It covers problems with wiring termination, mixed baud rates, initialization delays, oscilloscope measurements, wire length differences, connector pinouts, transceiver issues, node limits, frame formats, arbitration, message overload, and network design. It provides guidance and encourages sharing experiences and solutions.
This chapter builds a simple 'Hello World' CAN example. It provides an overview and covers the required hardware components: Arduino board (e.g., UNO), MCP2515 CAN board, USB cables, jumper cables, optional oscilloscope, mini breadboards, and tape for securing. The example involves two nodes exchanging CAN messages. The chapter concludes with a bill of materials for the setup.
This chapter is a guide for downloading and installing the CAN library. It introduces the MCP_CAN_lib drivers compatible with MCP2515 or MCP25625 CAN controllers. Users are directed to the GitHub repository or the provided .zip file for download. The process of locating and installing the library in the Arduino IDE's sketchbook folder is explained. The chapter concludes by confirming the system's readiness for compiling CAN code on Arduino.
This chapter guides the building of CAN nodes. It explains connecting ATmega board and CAN controller via SPI. It details required pins and cables for clock, data transmission, and chip select. Power supply connections and board securing tips are provided. Setting up a network using a mini breadboard and connecting an oscilloscope are mentioned.
This chapter presents the "Hello World" CAN example code for the sender node. It explains the role of the sender node in periodically sending a CAN frame with specific ID and payload. The code snippet for CAN sending is provided, with step-by-step explanations in the following slides. The chapter covers initialization, defining the data to send, and adding logging functions for progress monitoring. Instructions for compiling and uploading the code are included.
This chapter presents the source code for a universal receiver node in a CAN bus system. It explains initializing the CAN object driver and setting it to normal mode for message reception. It covers parameters and storage for reading and storing received messages. Instructions on formatting, compiling, and uploading the code are provided.
This chapter covers the final project steps. It confirms the readiness of hardware, flashed software, and CAN bus connection. Monitoring communication between CAN nodes using Terra Term or Arduino terminal is instructed. Connecting an oscilloscope to visualize electrical signals is optional.
This chapter explores the ISO 11898-1 specification, which updates the BOSCH CAN specification and introduces a formal notation for describing CAN controller processing layers. It focuses on services for TTCAN, time-triggered CAN, and CAN FD, providing terms, definitions, symbols, and abbreviations.
This chapter gives an overview of ISO 11898-2, which focuses on the requirements for an ISO compliant transceiver. It highlights the importance of the specification for building CAN compliant devices.
This chapter explores derivatives and extensions to the core CAN specification as ISO 11898 versions three and four, which introduce a fault-tolerant physical layer and time-triggered communication (TTCAN) respectively. Also higher layer protocols like CANopen, DeviceNet, and J1939, as well as technical enhancements such as CAN FD and CAN XL.
This chapter introduces real-time systems and their importance, emphasizing time's role in result correctness. It discusses issues arising from early or late value arrivals. Different types of real-time systems (hard, soft, firm) are explored, with examples and characteristics provided. The chapter outlines design challenges, including reactive behavior, response time guarantees, determinism, and concurrency.
This chapter discusses building real-time systems with CAN. It explores the benefits of using CAN, such as its low-cost and well-defined physical layer, but also highlights limitations like variable latencies and limited bandwidth. The chapter emphasizes the importance of considering timing, implementing constraint checks, and utilizing strong tooling support for optimized designs. It aims to ensure system functionality and effective communication between designers and implementers to meet design requirements in the time and value domains.
This chapter gives an overview of CAN timing analysis for real-time systems. It presents a simple model to understand network behavior under worst-case timing. The chapter covers message scheduling, design evaluation, and adjustments. It explores message execution order. It concludes with message duration calculation and the use of a low-fidelity model for worst-case analysis.
This chapter explores timing analysis in a 125 kbps CAN network. It uses the SAE benchmark data as an example and calculates message length for extended and standard formats. The duration of a bit based on baud rate and message size is discussed, along with differences between standard and extended formats. The chapter also covers a naive mapping approach for signal IDs to message identifiers and calculates worst-case response times for messages with different periods.
This chapter focuses on CAN timing analysis for a 125 kbps network. It starts with busload estimation and response time analysis. The chapter highlights that low busload doesn't guarantee a valid design if response times are insufficient. It explores frame packing to optimize payload usage by grouping signals with the same period and sender. Rearranging signals and analyzing new timing, considering different message payloads, is discussed. The chapter concludes with a decision to switch to standard message format due to a small dataset and one message missing the deadline in a slight overload situation.
This chapter focuses on designing complex vehicle networks using Siemens Capital Networks. It addresses the growing complexity in automotive integration due to autonomy, connectivity, electrification, and shared services. The chapter highlights the need for expertise and tools to handle this challenge, including multi-network support, advanced signal definition, project management, standards compatibility, and architectural exploration. A small example network is created using Siemens Capital Networks, following a layered approach for logical, communication, and configuration design. Desired outputs include AUTOSAR ECU extracts, signal matrix, busload analysis, and supplier reports.
This chapter introduces the industry-standard .dbc file format for describing CAN networks. The .dbc file includes decoding rules, topology information, and signal encoding. Vector Informatik's CANdb++ is a popular viewer for .dbc files, enabling users to load, view, and analyze networks, messages, and signals. The chapter mentions the availability of reverse-engineered .dbc files shared by enthusiasts but warns against potential risks to the vehicle when using such information.
This chapter explores CAN security in the automotive industry, emphasizing the challenges and consequences of cyber-attacks. Securing cars is particularly challenging due to real-time sensitivity, a large number of vehicles, and limited control after sale.
This chapter explores CAN vulnerabilities and hacking techniques, including frame and protocol attacks. Frame attacks exploit the network using an untampered CAN controller, while protocol attacks manipulate the CAN protocol behavior without hardware engine involvement. Examples of attacks like frame spoofing, bus flooding, and Janus attack are covered. The chapter suggests external resources and tools for further exploration of CAN hacks.
Please find the corresponding decks here available for download as a point of reference
This is the next follow up course on Automotive Networks.
This course covers the Controller Area Network (CAN) and the application of CAN within the domain of distributed real-time systems.
After an introduction, we walk together through the BOSCH protocol specification details.
We will deep dive into the Controller Area Network and help you understand all angles of the latest design approaches to develop good large distributed CAN networks.
You will understand the benefits as well as the challenges of CAN.
We will build an Arduino example.
Discuss the requirements that real-time systems such as cars, trains, medical or aircraft impose.
Show you some tools used in the industry as well as how to check your CAN designs against real-time requirements.
Besides design pitfalls, we also address security.
In the end, you will have touched upon all market-relevant topics on the Controller Area Network and will be ready to have deep discussions with experts from the industry.
After attending this course you will be able to understand and talk about:
Basics of CAN
The BOSCH specification
Extensions to CAN
Requirements for Real-Time systems
CAN benefits and pitfalls
Timing Analysis of CAN networks
CAN industry standards and tools
CAN security challenges
Have the foundation to move on to other automotive network communication protocols
Note:
The course tries to be as easy to digest as possible on the topics presented. While it is considered a network protocol 'beginners' course to work in the industry, it is not to be confused with an 'absolute' beginners course on electronics or computer science. Understanding source code, basic boolean algebra and familiarity working with specifications will help. Comparable courses are part of a Masters's Degree curriculum. A Bachelor's level understanding of Computer Science, Mathematics or Electrical Engineering is recommended.