Lin bus automatic addressing method, system, storage medium, program and vehicle

By serializing slave nodes and sequentially transmitting address allocation frames, the problem of needing to reset the master node program when adding or removing slave nodes in existing LIN bus systems is solved. This simplifies configuration, improves bus data stability, and reduces hardware design complexity and cost.

CN122093369APending Publication Date: 2026-05-26BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BYD CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The existing LIN bus system requires reprogramming the master node when adding or removing slave nodes, resulting in complex wiring and poor adaptability.

Method used

By connecting all slave nodes in series, the master node sends an address allocation frame to the first slave node, and subsequent address allocation frames are passed sequentially by the slave nodes connected in series. Any two adjacent slave nodes are initially disconnected. After the master node receives the acknowledgment message, it connects the link, simplifying the system configuration process.

Benefits of technology

When replacing or adding/removing slave nodes, there is no need to reset the master node program, which simplifies system configuration, improves bus data stability, reduces software design complexity, simplifies hardware structure, and reduces cost and implementation difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093369A_ABST
    Figure CN122093369A_ABST
Patent Text Reader

Abstract

This application provides a LIN bus automatic addressing method, comprising: cascading all slave nodes in series; and sequentially sending address allocation frames to each slave node starting from the first slave node, until all slave nodes are configured. Through this method, all slave nodes are cascaded, and the master node only needs to send an address allocation frame to the first slave node; subsequent address allocation frames are passed sequentially from the previously cascaded slave nodes. This makes it more convenient to replace or add / remove slave nodes, eliminating the need to reprogram the master node and simplifying the system configuration process. This application also provides a LIN bus automatic addressing system, a computer-readable storage medium, a computer program product, and a vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicles, and more particularly to a LIN bus automatic addressing method, a LIN bus automatic addressing system, a computer-readable storage medium, a computer program product, and a vehicle. Background Technology

[0002] LIN (Local Interconnect Network) is a widely used communication protocol for intelligent automotive electronic control. It is popular in applications requiring low power consumption, low cost, and relatively low communication speeds. The LIN bus can connect multiple electronic control units (ECUs) to achieve richer and more efficient vehicle control functions, thus providing passengers with a more comfortable, convenient, and intelligent riding environment. The vehicle's master control unit (MCU) connects to multiple ECUs through the LIN system to transmit information and coordinate the overall vehicle performance. To enable the master control unit to accurately manage each slave node, a different address needs to be assigned to each slave node during the design phase. In related technologies, a daisy-chain configuration is used, where the master node assigns an address to each slave node individually. Each addition or removal of a slave node requires reprogramming the master node, resulting in complex wiring and poor adaptability. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a LIN bus automatic addressing method, a LIN bus automatic addressing system, a computer-readable storage medium, a computer program product, and a vehicle that overcome or at least partially solve the above problems.

[0004] To achieve the above objectives, according to a first aspect of this application, a LIN bus automatic addressing method is provided, comprising: Connect all slave nodes in series; The master node sends address allocation frames sequentially to each slave node, starting with the first slave node, until all slave nodes have completed configuration.

[0005] In this way, all slave nodes are connected in series. The master node only needs to send an address allocation frame to the first slave node. Subsequent address allocation frames are passed sequentially by the slave nodes connected in series. This makes it more convenient to replace or add or remove slave nodes without having to reprogram the master node, thus simplifying the system configuration process.

[0006] Furthermore, after receiving an address allocation frame, any slave node configures its own address locally based on the received address allocation frame.

[0007] Furthermore, after the host node sends an address allocation frame to the i-th slave node, the host node then sends a response request frame to the i-th slave node, and the i-th slave node sends a response message to the host node after receiving the response request frame; where i is a non-zero natural number, and i+1 is not greater than the total number of slave nodes.

[0008] Furthermore, after receiving the response message sent by the i-th slave node, the host node sends an address allocation frame to the (i+1)-th slave node.

[0009] Furthermore, the link between any two adjacent slave nodes is initially disconnected. When the master node receives the response message sent by the i-th slave node, the link between the i-th slave node and the (i+1)-th slave node is established.

[0010] According to a second aspect of this application, a LIN bus automatic addressing system is provided, including a master node and a plurality of slave nodes, wherein the plurality of slave nodes are connected in series, and the master node is connected to the first slave node.

[0011] Furthermore, the host node includes a host control unit and a host physical layer transceiver. The host control unit is used to receive data, process data, and send data. After receiving data, the host physical layer transceiver transmits it to the host control unit. The data sent by the host control unit is sent to the LIN bus through the host physical layer transceiver. The host physical layer transceiver is connected to the first slave node through the LIN bus.

[0012] Furthermore, the data received by the host physical layer transceiver is transmitted to the host control unit through the receive port, and the data sent by the host control unit is transmitted to the host physical layer transceiver through the send port.

[0013] Furthermore, each slave node includes a LIN control unit, a slave physical layer transceiver, a first switch, a first LIN port, and a second LIN port. The LIN control unit is used to receive data, process data, and send data. After receiving data, the slave physical layer transceiver transmits it to the LIN control unit. The data sent by the LIN control unit is sent to the LIN bus through the slave physical layer transceiver. The slave physical layer transceiver is connected to the first LIN port, and the slave physical layer transceiver is connected to the second LIN port through the first switch.

[0014] Furthermore, the first LIN port of the first slave node is connected to the master node via the LIN bus, and the second LIN port is connected to the first LIN port of the second slave node via the LIN bus. The first LIN port of the i-th slave node is connected to the second LIN port of the (i-1)-th slave node via a LIN bus, and the second LIN port of the i-th slave node is connected to the first LIN port of the (i+1)-th slave node via a LIN bus; where i is a natural number greater than 1, and i+1 is not greater than the total number of slave nodes.

[0015] Furthermore, the data received by the slave physical layer transceiver is transmitted to the LIN control unit through the receive port, and the data sent by the LIN control unit is transmitted to the slave physical layer transceiver through the transmit port.

[0016] Furthermore, it also includes a first switch control unit, which is used to control the on / off state of the first switch.

[0017] According to a third aspect of this application, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, are used to implement the LIN bus auto-addressing method as described in the first aspect of this application.

[0018] According to a fourth aspect of this application, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the LIN bus auto-addressing method as described in the first aspect of this application.

[0019] According to a fifth aspect of this application, a vehicle is provided, including the LIN bus automatic addressing system described in the second aspect of this application, or the computer-readable storage medium described in the third aspect of this application, or the computer program product described in the fourth aspect of this application.

[0020] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] To gain a more complete understanding of this application and its beneficial effects, the following description will be provided in conjunction with the accompanying drawings, wherein the same reference numerals in the following description denote the same parts.

[0023] Figure 1 This is a schematic diagram of the LIN bus automatic addressing method provided by the present invention; Figure 2This is a schematic diagram of the LIN bus automatic addressing system provided by the present invention; Figure 3 This is a flowchart illustrating the LIN bus automatic addressing method combined with the system provided by the present invention; Figure 4 This is a schematic diagram of the request frame format of the PDU format of the LIN bus automatic addressing system provided by the present invention; Figure 5 This is a schematic diagram of the PDU format response frame of the LIN bus automatic addressing system provided by the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.

[0025] According to the first aspect of this application, Figure 1 As shown, a LIN bus automatic addressing method is provided, including: S101, Connect all slave nodes in series; S102. The master node sends address allocation frames sequentially to each slave node, starting from the first slave node, until all slave nodes have completed configuration.

[0026] In this way, all slave nodes are connected in series. The master node only needs to send an address allocation frame to the first slave node. Subsequent address allocation frames are passed sequentially by the slave nodes connected in series. This makes it more convenient to replace or add or remove slave nodes without having to reprogram the master node, thus simplifying the system configuration process.

[0027] In some embodiments, after receiving an address allocation frame, any slave node configures its own address locally according to the received address allocation frame.

[0028] In some embodiments, after the host node sends an address allocation frame to the i-th slave node, the host node then sends an acknowledgment request frame to the i-th slave node. After receiving the acknowledgment request frame, the i-th slave node sends an acknowledgment message to the host node; where i is a non-zero natural number, and i+1 is not greater than the total number of slave nodes.

[0029] In some embodiments, after the host node receives the response message sent by the i-th slave node, the host node sends an address allocation frame to the (i+1)-th slave node.

[0030] In some embodiments, the link between any two adjacent slave nodes is initially disconnected. When the master node receives the response message sent by the i-th slave node, the link between the i-th slave node and the (i+1)-th slave node is established.

[0031] Unlike existing methods where host nodes send request frames via broadcast, this application's strategy ensures the orderliness of bus data and effectively avoids the problem of LIN bus data chaos caused by human factors resulting in identical initial NAD values. This application significantly improves bus data stability and reduces the complexity of software design.

[0032] According to the second aspect of this application, such as Figure 2 As shown, a LIN bus automatic addressing system is provided, including a master node (BCM) and several slave nodes connected in series. The master node (BCM) is connected to the first slave node (slave1). Through this method, the LIN bus automatic addressing system can be designed as a link-type system, which is simpler and more efficient than the existing daisy-chain type.

[0033] In some embodiments, the host node BCM includes a host control unit (LIN master CTRL) and a host physical layer transceiver (master LINPHY). The host control unit (LIN master CTRL) is used to receive, process, and transmit data. After receiving data, the host physical layer transceiver (master LINPHY) transmits the data to the host control unit. The data transmitted by the host control unit (LIN master CTRL) is sent to the LIN bus through the host physical layer transceiver (master LINPHY). The host physical layer transceiver (master LINPHY) is connected to the first slave node (slave 1) through the LIN bus.

[0034] In some embodiments, data received by the host physical layer transceiver master LINPHY is transmitted to the host control unit LIN master CTRL via the receive port RX, and data sent by the host control unit LIN master CTRL is transmitted to the host physical layer transceiver master LINPHY via the transmit port TX.

[0035] In some embodiments, each slave node includes a LIN control unit, a slave physical layer transceiver LINLINPHY, a first switch S1, a first LIN port LIN_1, and a second LIN port LIN_2. The LIN control unit receives, processes, and transmits data. After receiving data, the slave physical layer transceiver LINLINPHY transmits it to the LIN control unit. Data transmitted by the LIN control unit is sent to the LIN bus via the slave physical layer transceiver LINLINPHY. The slave physical layer transceiver LINLINPHY is connected to the first LIN port LIN_1 and to the second LIN port LIN_2 via the first switch S1. In this manner, accurate automatic addressing of LIN network slave nodes can be achieved without the need for shunt resistors, additional current sources, and sampling units.

[0036] In some embodiments, the first LIN port LIN_1 of the first slave node 1 is connected to the master node BCM via a LIN bus, and the second LIN port LIN_2 is connected to the first LIN port LIN_1 of the second slave node via a LIN bus.

[0037] In some embodiments, the first LIN port LIN_1 of the i-th slave node and the second LIN port LIN_2 of the (i-1)-th slave node are connected via a LIN bus, and the second LIN port LIN_2 of the i-th slave node and the first LIN port LIN_1 of the (i+1)-th slave node are connected via a LIN bus; where i is a natural number greater than 1, and i+1 is not greater than the total number of slave nodes n.

[0038] In some embodiments, after the i-th slave node's response address is successfully configured, the state of the first switch S1 is switched, enabling the link between the second LIN port LIN_2 and the next node to be established.

[0039] In some embodiments, data received by the slave physical layer transceiver LIN LINPHY is transmitted to the LIN control unit through the receive port RX, and data sent by the LIN control unit is transmitted to the slave physical layer transceiver LINLINPHY through the transmit port TX.

[0040] In some embodiments, a first switch control unit SWCTRL 1 is further included, which is used to control the on / off state of the first switch S1.

[0041] In some embodiments, the first switch S1 is in the off state by default.

[0042] In some embodiments, the addresses assigned to all slave nodes are unique. After configuring the address, each slave node increments its own address data by 1 and passes it to the subsequent slave nodes through an address allocation frame. That is, the address NAD assigned to the first slave node is 1, the address NAD assigned to the second slave node is 2, and the address assigned to the nth slave node is n.

[0043] In some embodiments, after address allocation is completed, all first switches S1 are closed, making the lines between all slave nodes conductive, so that the master node controls each slave node to perform different tasks, thereby realizing intelligent control of the whole vehicle.

[0044] In some embodiments, the LIN data frame transmission format adopts the PDU (Packet Data Unit) format, wherein the address allocation frame and request / response frame sent by the host adopt a single frame in the PDU unit, which is further subdivided into host request and slave response. Figure 4 As shown, the PDU format request frame format includes: Node Address (NAD), Protocol Control Information (PCI), Service ID (SID), and message byte segment (D1-D5). Figure 5 As shown, the PDU format response frame format includes: Node Address (NAD), Protocol Control Information (PCI), Response ID (RSID), and message byte segment (D1-D5).

[0045] Through the above methods, this application's solution does not require an additional controllable power supply, a series shunt resistor, or a current acquisition module, nor does it require multiple electronic switches to control the link's on / off state to complete slave node addressing. Furthermore, unlike existing solutions that determine the distance between the slave and master devices by acquiring current, this application's solution simplifies the hardware structure, eliminating the need for a current source, shutdown resistor, and related current acquisition modules, significantly reducing hardware design complexity and cost, simplifying the addressing process, lowering implementation difficulty, and making operation more convenient. Unlike existing solutions that require reducing daisy-chain resistance to improve addressing stability, this application's solution does not rely on shunt resistors for addressing, effectively avoiding the problem of unstable automatic addressing due to excessive resistance in the daisy chain, greatly improving the reliability and stability of the LIN communication system. Finally, unlike existing solutions that rely on multiple hardware switches, where multiple switches between two physical transceivers can create a loop with oscillation risks, this solution eliminates the need for repeated switching of multiple switches, simplifying the control logic for multiple switches and reducing software design difficulty.

[0046] The following will provide exemplary descriptions of the LIN bus automatic addressing method of the first aspect of this application and the LIN bus automatic addressing system of the second aspect of this application, such as... Figure 3 As shown: S201, Start; Enter S202; S202, Let i=1; Proceed to S203; S203, The master node sends an address allocation frame to the i-th slave node; proceed to S204; S204. Determine whether the SID in the data received by the i-th slave node is for executing address configuration service; if yes, proceed to S205; if no, proceed to S206. S205, The i-th slave node configures the address locally; proceed to S207; S206, Service ID mismatch; proceed to S210; S207. The master node sends a response request frame to the i-th slave node; proceed to S208; S208. Determine whether the address configuration of the i-th slave node is successful; if yes, proceed to S209; if no, proceed to S210. S209. The i-th slave node sends an acknowledgment message to the master node, informing it that the address configuration of the i-th slave node is successful, and switches the state of the first switch S1; proceed to S211; S210, The i-th slave node sends an acknowledgment message to the master node, informing it that the address configuration of the i-th slave node failed; proceed to S203; S211. Determine if all slave nodes have been configured; if yes, proceed to S213; if no, proceed to S212. S212, Let i = i + 1; Proceed to S203; S213, End.

[0047] According to a third aspect of this application, a computer-readable storage medium is provided, which stores computer-executable instructions that, when executed by a processor, are used to implement the LIN bus auto-addressing method as described in the first aspect of this application.

[0048] According to a fourth aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the LIN bus auto-addressing method as described in the first aspect of this application.

[0049] According to a fifth aspect of this application, a vehicle is provided, including the LIN bus automatic addressing system of the second aspect of this application, or the computer-readable storage medium of the third aspect of this application, or the computer program product of the fourth aspect of this application.

[0050] The various embodiments described in this specification are mainly those that differ from other embodiments. For the same or similar parts between the various embodiments, please refer to each other.

[0051] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0052] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, computer-readable storage media, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0053] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0054] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0055] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0056] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0057] The embodiments, implementation methods, and related technical features of this application can be combined and substituted for each other without conflict.

[0058] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. In the embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant content of other embodiments. Any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of this application without departing from the content of the technical solution of this application shall still fall within the scope of the technical solution of this application.

[0059] The foregoing has provided a detailed description of the LIN bus automatic addressing method, LIN bus automatic addressing system, computer-readable storage medium, computer program product, and vehicle provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A LIN bus automatic addressing method, characterized in that, include: Connect all slave nodes in series; The master node sends address allocation frames sequentially to each slave node, starting with the first slave node, until all slave nodes have completed configuration.

2. The LIN bus automatic addressing method according to claim 1, characterized in that, After receiving an address allocation frame, any slave node configures its own address locally according to the received address allocation frame.

3. The LIN bus automatic addressing method according to claim 1, characterized in that, After the host node sends an address allocation frame to the i-th slave node, the host node then sends a response request frame to the i-th slave node. After receiving the response request frame, the i-th slave node sends a response message to the host node. Where i is a non-zero natural number, and i+1 is not greater than the total number of slave nodes.

4. The LIN bus automatic addressing method according to claim 3, characterized in that, After receiving the response message sent by the i-th slave node, the host node sends an address allocation frame to the (i+1)-th slave node.

5. The LIN bus automatic addressing method according to claim 4, characterized in that, The link between any two adjacent slave nodes is initially disconnected. When the master node receives the response message sent by the i-th slave node, the link between the i-th slave node and the (i+1)-th slave node is established.

6. A LIN bus automatic addressing system, characterized in that, It includes a master node and several slave nodes, the slave nodes are connected in series, and the master node is connected to the first slave node.

7. The LIN bus automatic addressing system according to claim 6, characterized in that, The host node includes a host control unit and a host physical layer transceiver. The host control unit is used to receive data, process data, and send data. After receiving data, the host physical layer transceiver transmits it to the host control unit. The data sent by the host control unit is sent to the LIN bus through the host physical layer transceiver. The host physical layer transceiver is connected to the first slave node through the LIN bus.

8. The LIN bus automatic addressing system according to claim 7, characterized in that, Data received by the host physical layer transceiver is transmitted to the host control unit through the receive port, and data sent by the host control unit is transmitted to the host physical layer transceiver through the send port.

9. The LIN bus automatic addressing system according to claim 6, characterized in that, Each slave node includes a LIN control unit, a slave physical layer transceiver, a first switch, a first LIN port, and a second LIN port. The LIN control unit is used to receive data, process data, and send data. After receiving data, the slave physical layer transceiver transmits it to the LIN control unit. The data sent by the LIN control unit is sent to the LIN bus through the slave physical layer transceiver. The slave physical layer transceiver is connected to the first LIN port, and the slave physical layer transceiver is connected to the second LIN port through the first switch.

10. The LIN bus automatic addressing system according to claim 9, characterized in that, The first LIN port of the first slave node is connected to the master node via the LIN bus, and the second LIN port is connected to the first LIN port of the second slave node via the LIN bus; and / or The first LIN port of the i-th slave node is connected to the second LIN port of the (i-1)-th slave node via a LIN bus, and the second LIN port of the i-th slave node is connected to the first LIN port of the (i+1)-th slave node via a LIN bus; where i is a natural number greater than 1, and i+1 is not greater than the total number of slave nodes.

11. The LIN bus automatic addressing system according to claim 9, characterized in that, The data received by the slave physical layer transceiver is transmitted to the LIN control unit through the receive port, and the data sent by the LIN control unit is transmitted to the slave physical layer transceiver through the send port.

12. The LIN bus automatic addressing system according to claim 9, characterized in that, It also includes a first switch control unit, which is used to control the on / off state of the first switch.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the LIN bus auto-addressing method as described in any one of claims 1-5.

14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the LIN bus auto-addressing method as described in any one of claims 1-5.

15. A vehicle, characterized in that, This includes the LIN bus automatic addressing system as described in claims 6-12, the computer-readable storage medium as described in claim 13, or the computer program product as described in claim 14.