Extended SCI communication system, method and device based on LIN bus and storage medium
By adopting an extended SCI communication system based on LIN bus in automotive networks, the problems of low communication efficiency and insufficient anti-interference capability in the prior art are solved, and efficient, flexible and economical communication solutions are achieved.
Patent Information
- Application Number
- CN202411878621.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to provide a standard automotive network bus with higher cost performance in automotive networks, which cannot meet the communication needs of high efficiency and high scalability, and at the same time, the anti-interference capability is insufficient.
The extended SCI communication system based on the LIN bus is adopted, and data is sent to the slave through the LIN bus, and data is received and feedbacked in the slave, the data domain size is expanded, the flexibility of the check bits is increased, and the SCI communication level is raised to 12V to improve the anti-interference ability.
It realizes the expansion of data frame length, improves communication efficiency, enhances anti-interference ability, meets the communication needs of efficient and high scalability, and reduces hardware costs.
Smart Images

Figure CN119988276A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, and in particular to an extended SCI communication system, method, device and storage medium based on a LIN bus. Background Art
[0002] At present, whether in the field of industrial automation, automobile or household appliances, each terminal market has put forward higher requirements for communication performance. They not only need communication methods that can achieve high efficiency and high scalability, but also put forward higher requirements on hardware cost and anti-interference ability.
[0003] With the increasing high-standard performance requirements, more and more high-performance control chips are emerging under the two opportunities of high market demand and high performance standards. At present, high / low-speed CAN and J1850 buses have become standard automotive network buses. These buses have extremely high speeds and have excellent performance such as high anti-electromagnetic interference and high transmission reliability, but the price is also high. A large number of applications in body and safety performance do not require high performance of automotive network buses. They only need a more cost-effective standard automotive network bus, and the LIN bus can meet this demand. Therefore, LIN bus technology is currently being used more and more widely in body electronics. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an extended SCI communication system, method, device and storage medium based on a LIN bus.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows: An extended SCI communication system based on LIN bus, comprising: LIN bus; A host computer connected to the LIN bus; A slave, connected in series with the host via the LIN bus; The host is used to send data to the slave through the LIN bus, the slave is used to receive data and feedback through the LIN bus, and the host is also used to receive feedback data from the slave through the LIN bus.
[0006] As a preferred solution of the LIN bus-based extended SCI communication system of the present invention, there are a plurality of slaves, and the plurality of slaves are connected in parallel.
[0007] As a preferred solution of the LIN bus-based extended SCI communication system of the present invention, the data sent by the host through the LIN bus includes pseudo-synchronization segment data, device ID segment data and data domain.
[0008] As a preferred solution of the LIN bus-based extended SCI communication system of the present invention, the data sent by the host through the LIN bus also includes check bit data.
[0009] The present invention also provides an extended SCI communication method based on LIN bus, comprising: The host is used to send data to the slave through the bus, and the data format sent is: pseudo synchronization segment + device ID + data field + check bit; The slave receives the pseudo-synchronization segment data; The slave receives the device ID segment data and determines whether the device ID segment data is its own receiving ID data or sending ID data. If not, it does not receive the data. If it is its own receiving ID data, the slave receives subsequent data and does not return data after receiving the data. If it is its own sending ID data, the slave receives data according to the protocol content defined with the host and returns data to the host in the same data format after receiving the data. The slave receives the data field and receives the complete packet data field according to the data length defined by the protocol; The slave receives the check bit data and verifies the received data according to a custom verification method to determine whether the received data is correct.
[0010] As a preferred solution of the LIN bus-based extended SCI communication method of the present invention, after the slave receives the pseudo synchronization segment data, it also includes: The received pseudo synchronization segment data is used as the start of a new frame of data.
[0011] As a preferred solution of the LIN bus-based extended SCI communication method of the present invention, after the slave receives the pseudo synchronization segment data, it also includes: The synchronization baud rate is calculated based on the high and low level interval time of the pseudo synchronization segment data.
[0012] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above-mentioned extended SCI communication methods based on the LIN bus is implemented.
[0013] The present invention also provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the method described in any of the above-mentioned extended SCI communication methods based on the LIN bus is implemented.
[0014] The beneficial effects of the present invention are: (1) The LIN bus is used for communication in the extended SCI format. Under standard LIN communication, only 8 bytes can be sent per frame of data. However, using the communication method of the present invention, one frame of data can be expanded to N bytes, greatly improving the communication efficiency.
[0015] (2) The level of the LIN bus is generally 12V, and the level under SCI / UART communication is generally 5V / 3.3V at the Io port. Therefore, the extended SCI communication system based on the LIN bus provided by the present invention can pull the SCI level to 12V, greatly improving its anti-interference ability and fully combining the advantages of the two communication methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 A schematic diagram of an extended SCI communication system based on a LIN bus provided by the present invention; Figure 2 This is a schematic diagram of the data format sent by the host in the extended SCI communication system based on the LIN bus; Figure 3 A schematic flow chart of an extended SCI communication method based on a LIN bus provided by the present invention; Figure 4 This is a schematic diagram of a dual brushless motor controlling a lift table; Figure 5 A schematic diagram of a computer device provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific implementation modes and in combination with the accompanying drawings.
[0019] Figure 1 A schematic diagram of an extended SCI communication system based on a LIN bus provided in the present application. The system includes: a LIN bus, a host, and a slave. Among them, a host is provided with one and is connected to the LIN bus. A plurality of slaves are provided, and the plurality of slaves are connected to the LIN bus, so as to be connected in series with the host through the LIN bus, and the plurality of slaves are connected in parallel with each other.
[0020] Specifically, the host has a LIN transceiver function and can send data to the slave through the LIN bus. The slave at least has a LIN receiving function and can receive and respond to the data transmitted by the host.
[0021] Figure 2 This is a schematic diagram of the data format sent by the host in the extended SCI communication system based on the LIN bus. The data format includes the following: The pseudo synchronization segment data can be used as a header frame of a data packet and can also be used to calculate the baud rate of communication. In this embodiment, the pseudo synchronization segment data is 0x55 or 0xAA.
[0022] Device ID segment data: When there are multiple slaves, the host can send data through the device ID segment data, and the slave housing can determine whether it needs to read this frame of data through the device ID segment data.
[0023] Compared with the standard format of LIN, the data field of this design is more flexible and can be extended to N bytes, thereby greatly improving communication efficiency.
[0024] Specifically, under standard Lin communication: the host sends a synchronization interval segment (generally 13 bits) + synchronization segment + device ID + 8-byte data field + one-byte check bit. The synchronization interval segment and the synchronization segment will rely on the Lin transceiver module to complete. In this way, the data field of Lin will be controlled at 8 bytes and cannot be increased, depending on the limitations of the standard protocol. In the extended SCI communication system based on the LIN bus provided in this application, the host directly sends a pseudo-synchronization segment (a byte number, generally 0x55 or 0xAA) + device ID + data field (N bytes + check bit. This format of communication method is not limited by the standard format of Lin. Each link can be directly completed with the SCI module, without relying on the Lin transceiver, but only with the help of the Lin bus for transmission. Therefore, the size of the data field depends entirely on the user and can be defined at will.
[0025] The check bit is the check data obtained by a certain check algorithm, which is used to detect whether the received data is correct. Using the extended communication system provided by this application, the check bit can be checked according to the user's own defined method, such as CRC16 and a series of methods, without being limited to the check method in the Lin standard format. Because when using the extended Lin communication, the synchronization frame, device ID, data field, and check bit are actually just an 8-bit binary number that can be sent directly through SCI, and each link can be defined by itself, increasing flexibility.
[0026] It is understandable that the level of LIN bus is generally 12V, while the level under SCI / UART communication is generally Io port level 5V / 3.3V. With the help of LIN bus SCI communication, the level of SCI can be pulled to 12V, which greatly improves its anti-interference ability and fully combines the advantages of the two communication methods.
[0027] See also Figure 3 The present application also provides an extended SCI communication method based on the LIN bus, the method specifically comprising the following steps: Step S101: the host is used to send data to the slave through the bus, and the format of the sent data is: pseudo synchronization segment + device ID + data field + check bit.
[0028] Step S102: The slave receives pseudo synchronization segment data.
[0029] Specifically, the slave will first receive the pseudo-synchronous segment data. The slave has two processing methods based on the user's choice. One is to directly use the received synchronization segment data (0x55 or 0xAA) as the beginning of communication, and to determine the number received from this moment as the beginning of a new frame of data. The second is to simulate the calculation of the synchronous baud rate function in the Lin standard format. The baud rate can be calculated by the high and low level intervals of 0x55 or 0xAA. This is why 0x55 or 0xAA is selected as the header frame (the high and low levels in a byte are evenly distributed with the same interval). Calculating the baud rate can effectively solve the clock deviation problem between the host and the slave, and switching the baud rate is more flexible.
[0030] Step S103: The slave receives the device ID segment data and determines whether the device ID segment data is its own receiving ID data or sending ID data. If not, the data is not received. If it is its own receiving ID data, the slave receives subsequent data and does not return data after receiving the data. If it is its own sending ID data, the slave receives the data according to the protocol content defined with the host and returns the data to the host in the same data format after receiving the data.
[0031] Specifically, the slave will receive the device ID segment data. Each slave has its own receiving ID or sending ID. After receiving the device ID segment data, the slave will have the following three situations: The first one: the received ID is its own receiving ID, then the slave is ready to receive the following data, and does not need to return any data after receiving; The second type: the received ID is its own sending ID, then the slave first prepares for receiving data according to the protocol content defined between it and the host (generally, customers can define it freely without special restrictions, and there are generally two types: with data receiving and without data receiving). After receiving data, the slave directly returns data in the same format. If there is no data receiving, the slave directly returns data in the same format. The third case is that if the received ID is not its own receiving ID and sending ID, the slave will not receive the data.
[0032] Step S104: The slave receives the data field and receives the complete packet data field according to the data length defined by the protocol.
[0033] Step S105: The slave receives the check bit data, and checks the received data according to a user-defined check method to determine whether the received data is correct.
[0034] The following is an explanation through specific embodiments.
[0035] Figure 4 This is a schematic diagram of a dual brushless motor controlled lifting table. In a dual brushless motor controlled lifting table, the lifting table legs act as two slaves and need to receive and return host data. In information exchange, especially in the brushless motor controlled by Foc, in order to ensure the balance between the two legs, a lot of data needs to be exchanged between the host and the slave, including speed, temperature, height and other parameters necessary for motor control and height control of the lifting table. In this case, the data volume of conventional Lin communication can no longer meet the communication requirements, and 2 frames or more frames are required to complete the data exchange. The lifting table has very high requirements for control accuracy, so the efficiency of communication directly affects the performance of the lifting table. In this case, the extended SCI format communication method based on the LIN bus is very suitable, which not only ensures communication efficiency, reduces interference, but also reduces costs.
[0036] See also Figure 5 This embodiment also provides a computer device, and the components of the computer device may include but are not limited to: one or more processors or processing units, a system memory, and a bus connecting different system components (including the system memory and the processing unit).
[0037] The term "bus" refers to one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0038] The computer system / server typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer system / server, including volatile and non-volatile media, removable and non-removable media.
[0039] The system memory may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The computer device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system may be used to read and write non-removable, non-volatile magnetic media. A disk drive for reading and writing removable non-volatile disks (such as "floppy disks") and an optical disk drive for reading and writing removable non-volatile optical disks (such as CD-ROMs, DVD-ROMs or other optical media) may be provided. In these cases, each drive may be connected to the bus via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0040] A program / utility having a set (at least one) of program modules may be stored, for example, in a memory, such program modules including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.
[0041] The computer device may also communicate with one or more external devices such as a keyboard, a pointing device, a display, etc. Such communication may be performed through an input / output (I / O) interface. Furthermore, the computer device may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter.
[0042] The processing unit executes the functions and / or methods described in the embodiments of the present invention by running the programs stored in the system memory.
[0043] The above-mentioned computer program can be set in a computer storage medium, that is, the computer storage medium is encoded with a computer program, and when the program is executed by one or more computers, it enables one or more computers to execute the method flow and / or device operation shown in the above-mentioned embodiments of the present invention.
[0044] With the development of time and technology, the meaning of medium is becoming more and more extensive, and the propagation path of computer programs is no longer limited to tangible media, but can also be downloaded directly from the network, etc. Any combination of one or more computer-readable media can be used. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by or in combination with instruction execution systems, devices or devices.
[0045] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0046] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0047] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0048] In addition to the above embodiments, the present invention may also have other implementation modes; any technical solutions formed by equivalent replacement or equivalent transformation shall fall within the protection scope required by the present invention.
Claims
1. An extended SCI communication system based on LIN bus, characterized in that: include: LIN bus; A host computer connected to the LIN bus; A slave, connected in series with the host via the LIN bus; The host is used to send data to the slave through the LIN bus, the slave is used to receive data and feedback through the LIN bus, and the host is also used to receive feedback data from the slave through the LIN bus.
2. The extended SCI communication system based on LIN bus according to claim 1, characterized in that: A plurality of slave machines are provided, and the plurality of slave machines are connected in parallel with each other.
3. The extended SCI communication system based on LIN bus according to claim 2, characterized in that: The data sent by the host through the LIN bus includes pseudo synchronization segment data, device ID segment data and data domain.
4. The extended SCI communication system based on LIN bus according to claim 3 is characterized in that: The data sent by the host through the LIN bus also includes check bit data.
5. An extended SCI communication method based on LIN bus, characterized in that: include: The host is used to send data to the slave through the bus, and the data format sent is: pseudo synchronization segment + device ID + data field + check bit; The slave receives the pseudo-synchronization segment data; The slave receives the device ID segment data and determines whether the device ID segment data is its own receiving ID data or sending ID data. If not, it does not receive the data. If it is its own receiving ID data, the slave receives subsequent data and does not return data after receiving the data. If it is its own sending ID data, the slave receives data according to the protocol content defined with the host and returns data to the host in the same data format after receiving the data. The slave receives the data field and receives the complete packet data field according to the data length defined by the protocol; The slave receives the check bit data and verifies the received data according to a custom verification method to determine whether the received data is correct.
6. The extended SCI communication method based on LIN bus according to claim 5, characterized in that: After the slave receives the pseudo synchronization segment data, the method further includes: The received pseudo synchronization segment data is used as the start of a new frame of data.
7. The extended SCI communication method based on LIN bus according to claim 5, characterized in that: After the slave receives the pseudo synchronization segment data, the method further includes: The synchronization baud rate is calculated based on the high and low level interval time of the pseudo synchronization segment data.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 5 to 7 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 5 to 7 is implemented.