Design of a High- and Low-Speed CAN Bus Automotive Control System Based on DSP
2026-04-06 08:09:58··#1
With the continuous improvement of modern automotive performance, new control functions are constantly being added, such as central locking, lighting control, power windows, rearview mirror adjustment, sunroof control, seat adjustment, and ignition delay control. Traditional control systems often use relays and independent mode control, resulting in excessive and complex wiring harnesses within the vehicle, causing serious electromagnetic interference and reducing system reliability. Currently, many cars use CAN bus to connect and manage the entire vehicle control system, enabling data sharing and collaborative operation. This makes wiring harnesses in the vehicle more convenient and reliable, improving the overall safety and cost-effectiveness of the vehicle and enhancing its competitiveness. However, different control units have different requirements for system response time. For example, anti-lock braking systems (ABS), anti-slip systems (ASR), electronic stability programs (ESP), and safety airbags (SRS) have high real-time requirements; while lighting control and air conditioning control have relatively lower response time requirements. With the increasing number of computer control units, the load on a single-network CAN bus is becoming increasingly heavy. By using a DSP as the system's main controller and also acting as a gateway (intelligently processing the data to be transmitted between CAN buses to ensure that only specific types of information can be transmitted between networks), high-speed CAN network transmission is used for control units with high real-time requirements, while low-speed CAN network transmission is used for control units with relatively low real-time requirements. This not only improves the system's immunity to electromagnetic interference but also simplifies the transmission harness and improves transmission reliability. 1. DSP-based Automotive Computer Control System 1.1 TMS320LF2407A Functional Introduction The 16-bit fixed-point DSP TMS320LF2407A from TI is selected as the main controller and also acts as a gateway. This DSP system boasts a clock speed of up to 40MHz and a processing speed of 40MIPS. It features 32K words of FLASH program memory, 1.5K words of data/program RAM, 2K words of SARAM, and 544 words of DARAM. It also includes an embedded 16-channel 10-bit A/D converter, SPI/SCI/CAN2.0B modules, and a watchdog timer module. With abundant resources and convenient interfaces, it is particularly suitable for applications with high real-time and reliability requirements and severe electromagnetic interference, such as automotive computer control. 1.2 System Implementation Automotive computer control systems are widely involved in many aspects, including power, safety, environmental protection, energy saving, and comfort. The electronic control units (ECUs) of various control systems are closely interconnected, requiring real-time communication of large amounts of data. Furthermore, to meet the real-time requirements of each subsystem, it is necessary to share common automotive data. Therefore, in constructing a CAN bus control system, a high baud rate and reliability of the CAN communication control network are always desirable. However, if all nodes in the entire vehicle are connected to a single CAN network, and numerous nodes communicate data through a single CAN bus, the bus load can easily become too large, leading to a decrease in the system's real-time response rate. Therefore, after analyzing the real-time performance of each node in the vehicle, a high-speed and low-speed CAN communication network based on TMS320LF2407A was designed. Nodes with higher real-time requirements were grouped into a high-speed CAN communication network, while nodes with relatively lower real-time requirements were grouped into a low-speed CAN communication network. A gateway was then set up to connect these two CAN communication networks with different speeds, enabling data sharing among all nodes. The communication network topology of the entire vehicle is shown in Figure 1. Engine control, transmission control, ABS/ASR/ESP control, and SRS control in Figure 1 are core components of modern vehicle operation, with strict time response requirements. Therefore, a high-speed CAN communication network with a transmission rate of 500Kbps is used in this design. Air conditioning management, instrument management, lighting management, and attitude management (such as window lifting, rearview mirror adjustment, sunroof control, seat adjustment, and wiper management) have relatively lower real-time requirements and use a low-speed CAN communication network with a rate of 125Kbps. The main controller bridges the high-speed and low-speed buses, exchanges data with each node, and also acts as a gateway. 1.3 Design of the Electronic Control Unit and CAN Bus Interface of the Control System According to the system design requirements, the TMS320LF2407A is used as the main controller. The connection method between the electronic control unit (ECU) of the automotive computer control system and the CAN bus is shown in Figure 2. The physical layer and data link layer functions can be easily implemented through the CAN controller embedded in the TMS320LF2407A. CANH and CANL are two differential receive/transmit multiplexed lines of the CAN bus, each with a 120Ω bus matching resistor at its endpoint. When a node occupies the CAN bus, the transmitting end (level 3.5V) of that node is connected to CANH, and the receiving end (level 1.5V) is connected to CANL; when no node occupies the CAN bus, the levels on both CANH and CANL are 2.5V. A high-speed opto-isolator 6N137 is used between the TMS320LF2407A and the bus transceiver PCA82C250 to effectively prevent interference signals from entering the main controller through the PCA82C250. The entire system is also metal-shielded, and shielded twisted-pair cables are used for transmission lines to reduce electromagnetic interference. 2. Hardware Interface Circuit Design The CAN communication network interface consists of the TMS320LF2407A's CAN controller, the CAN bus transceiver PCA82C250, and the opto-isolator 6N137. The hardware design circuit of the CAN node communication interface is shown in Figure 3. For ease of debugging and demonstration, each node module includes a CAN interface, an RS232 interface, and an LCD display. During debugging, the LCD display is used to visually display local data and data received via the CAN bus, and the RS232 interface can be used to establish communication with a PC when needed. Bus data signals are isolated via a high-speed opto-isolator 6N137. The PCA82C250 serves as the interface between the CAN controller and the physical layer, providing differential reception and transmission capabilities for bus data. It also possesses the ability to resist transient interference and protect the bus in an automotive environment. 3. Software Design The system software consists of the main program and high- and low-speed CAN network unit software. The software flow is shown in Figures 4 and 5. The high-speed CAN communication network is responsible for acquiring, processing, and transmitting the actions of control units with high real-time requirements. Once the system detects an action signal, it will enable interrupts, call the corresponding interrupt subroutine, process it through the DSP, and transmit it to the corresponding control unit's ECU via the high-speed CAN network. The control unit ECU then controls the controlled object. If the high-speed CAN network is not detected as busy, the low-speed CAN network is detected. If there is no high-speed CAN network interrupt, the corresponding subroutine is called to respond to the corresponding action. The low-speed CAN network unit software flow is similar to that of the low-speed CAN network unit, the main difference being that the low-speed CAN network unit uses a polling method, and data broadcasting is used to achieve data sharing within the control system. 4. Conclusion The CAN bus, as a reliable automotive computer network bus, has been applied in many advanced vehicles. It enables various automotive computer control units to share all information and resources via the CAN bus, achieving the goals of simplified wiring, reduced sensor count, avoidance of redundant control functions, improved system reliability, reduced costs, and better matching and coordination of various control systems. This design uses the TMS320LF2407A digital signal processor as the main controller and gateway, enabling efficient data transmission between different nodes, improving the system's real-time performance and reliability. The use of high- and low-speed CAN bus network communication control significantly improves bus utilization and system response speed, basically achieving the expected goals. References : [1] Gong Jianghai, Tang Houjun, Kong Jun. Research on the application of CAN bus in electric vehicles [J]. Industrial Control Computer, 2003, 17(3): 23-24 [2] Texas Instruments Incorporation. TMS320LF2407A DSP Controller [M]. 2002, 7 [3] Huang Tao, Zhou Deheng. Research on automotive internal network system based on CAN bus [J]. Microcontroller & Embedded System Application, 2005, 9: 19-21