As modern warfare requires weapon systems to be more reliable and maintainable under battlefield conditions, the rapid guarantee of traditional separate control systems is difficult to meet the requirements. The integrated vehicle-mounted PLC controller is used in air defense weapon fire control due to its high reliability and modular characteristics. In order to expand it to weapon systems with TTCAN (Time Trigger CAN) networks, the data synchronization problem between PLC and TTCAN networks needs to be solved. Here, a dual CAN port synchronous communication board design based on TMS320LF2407A is proposed, which solves the problem of linking the vehicle-mounted PLC with the TTCAN network of air defense weapons.
2 Overall design of dual CAN port synchronous communication board
Since the system TTCAN network is a time-triggered real-time communication, the communication interface of the integrated vehicle PLC is a standard CAN, which does not have the ability to receive synchronization signals and send data in a specified time sequence, so it cannot be directly connected to the TTCAN network. The data sent by the PLC must be synchronized before being sent to the TTCAN network, and the data from the TTCAN network must be buffered and sent to the PLC. Figure 1 is the schematic diagram of the dual CAN port synchronous communication board.
Considering the cyclic working mode of PLC, the randomness of data transmission time and the non-real-time nature of data transmission, the MPC2515 CAN independent controller is used as the internal communication interface between PLC and synchronous communication board. In view of the characteristics of the system TTCAN network that must complete data reception, transmission, exchange and processing in real time within the specified time slot, only the internal CAN controller of TMS320LF2407 can meet the requirements of TTCAN network with the internal high-speed bus, high-speed RAM and powerful computing power of DSP. Therefore, the internal CAN controller of TMS320LF2407 is selected as the communication interface of TTCAN network.
3 Dual CAN port synchronous communication board interface hardware design
3.1 Synchronous signal interface
Since the synchronization signal provides a time reference for the entire TTCAN network, its failure will cause the entire network to fail, so the system synchronization signal is transmitted using RS485 differential mode. In order to further improve the anti-interference ability of the synchronization signal, magnetic beads are used at the input ends of the two differential transmission lines to eliminate the common-mode interference superimposed on the synchronization signal, and high-speed optical couplers are used to isolate the interference to other devices on the communication board, which can ensure the reliability of the synchronization signal interface. The circuit design is shown in Figure 2.
3.2 Synchronous communication board and PLC CAN interface
The interface circuit uses CAN2.0B protocol to realize data communication with PLC. TMS320LF2407 configures the parameters of MPC2515 through 10 MHz SPI interface. Data receiving/transmitting control uses hardware to connect the signal to the external interrupt sources INT2 and INT3 of TMS320LF2407. When RX0BF and RX1BF are low, it indicates that MCP2515 has received data and TMS320LF2407 can read MCP2515; when RX0BF and RX1BF are high, it indicates that MCP2515 has not received valid data. The sending request control uses the IO interface of TMS320LF2407 to send hardware request commands TX0RST, TX1RST, TX3RST to MCP2515 to realize fast sending request. The interface circuit uses optocoupler isolation and common mode choke coil method to improve the anti-interference performance of the interface circuit. Its circuit design is shown in Figure 3.
4 Dual CAN port synchronous communication board software design
The dual CAN port synchronous communication board software is divided into 3 modules:
(1) The CAN random communication module is responsible for random CAN communication with the PLC, receiving burst data from the PLC, and sending data from the TTCAN network;
(2) The TTCAN communication module is responsible for communicating with the TTCAN network, sending data to the TTCAN network according to the timing requirements under the control of the synchronization signal and receiving random CAN data from the PLC:
(3) The data buffer module is responsible for the synchronization of PLC and TTCAN network data and completes the necessary communication processing tasks. Figure 4 shows the collaborative workflow between the modules.
4.1 CAN random communication module software
First, initialize the SPI interface of TMS320LF2407, and then set the communication parameters of MCP2515 CAN to complete the initialization of the module. Function SPI_WRITE_COMMAND (unsigned int ADDRESS, unsigned intDATA) updates the content in the specified register of MCP2515; function SPI_READ_COMMAND (unsigned int ADDRESS) reads the specified register of MCP2515; function RTS_123 (unsigned int NUM) extracts data from the data buffer and sends it to PLC according to the specified channel data; function RANDOM_RCV() stores the data from PLC in the data buffer after query and reception. The above functions realize the data transmission and reception function of synchronous communication board and PLC CAN port.
4.2 TTCAN communication module software
This module uses CAN_INIT() to initialize the internal CAN controller of TMS320LF2407 and set the communication parameters; the function dsp_can_send(unsigned int IDH, unsigned int IDL, unsigned int*data1) extracts data from the data buffer and sends it to the TTCAN network; the receiving interrupt service function CAN_RCV_ISR() receives data from the TFCAN network and stores it in the data buffer; and the synchronization signal receiving function sytem_syn() realizes synchronization with the TTCAN network and controls the sending time slot.
4.3 Data buffer module software design
This module is the core of the dual CAN port synchronous communication board. Its purpose is to ensure that the random data from the PLC can be transmitted to the TTCAN network after passing through the module. The data sent from the TTCAN network is sent according to the specified time slot under the control of the synchronization signal. The data from the TTCAN network is forwarded to the PLC after necessary analysis by the module. For this purpose, two circular queue buffers mcp2515_rcv_buffer and dsp_rcv_buffer are designed to synchronize the PLC data with the TTCAN network. The implementation method is as follows:
(1) After the communication board receives the PLC data, it stores the data in the mcp2515_rcv_buffer buffer, and then the MCP2515 indicates that the index mep2515_rcv_index is increased by 1; when the DSP CAN synchronous data is sent, the transmission data is extracted from the corresponding position of the mcp2515_rcv_buffer buffer according to the value of the index dsp_send_index, and then the index value is increased by 1. When (mcp2515_rcv_index+1)%FIFOMAX==dsp_send_index, it indicates that the MCP2515 receive buffer queue is full (the maximum length of the FIFOMAX buffer is defined); dsp_send_index==mcp2510_rcv_index, it indicates that the MCP2515 buffer is full.
(2) The data received by the synchronous CAN port is stored in the dsp_rcv_buffer buffer, and then the index dsp_rcv_index is indicated to be increased by 1; the MCP2515 data transmission uses the index mcp2510_send_index to extract the corresponding data in the circular buffer dsp_rcv_buffer and send it to the PLC CAN. When mcp2510_send_index==dsp_rcv_index, it indicates that the DSP receive buffer is empty; (dsp_rcv_index+1)% FIFOMAX==mcp2510_send_index indicates that the DSP buffer queue is full.
5 Conclusion
The dual CAN port synchronous communication board performed well in the test of 600 hours of continuous and different data flow without any abnormality. It has been successfully applied to a certain type of air defense weapon fire control subsystem. Practice shows that this design can well expand the application of PLC on the TTCAN network of the air defense weapon system, greatly improve the reliability and maintainability of the fire control system under battlefield conditions, and meet the general requirements of modular design. At the same time, the dual CAN port synchronous communication board can also be widely used in the access application of event-triggered data and TTCAN network.
Previous article:Research on DSP in online UPS uninterruptible power supply control system
Next article:Research on Ship Collision Avoidance System Based on AIS
Recommended ReadingLatest update time:2024-11-17 01:50
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- EEWORLD University Hall----Live Replay: Microchip Trust&GO for any cloud service
- PCB Layout /PCB design part-time OEM
- Use of EEPROM inside STC microcontroller - Recording power-on times
- Please teach me an op amp circuit - RMS to DC circuit
- 【Silicon Labs Development Kit Review】+ PWM Example Test
- Porter-3: Will this topology work?
- Problem with the abs function
- Xunwei i.MX6ULL development board-Transplant OpenCv2.4.9-QT program compilation
- [Me and Arteli] DIY an AT32 board, full of favorability
- Microcontroller selection