LIN bus transceiver and method for it
A simplified method in LIN bus nodes differentiates between missing and incomplete responses using a recessive bit detection and flag mechanism, enhancing network efficiency and reducing circuit complexity.
Patent Information
- Application Number
- DE102023126007
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2024-11-07
- Estimated Expiration
- 2043-09-26
AI Technical Summary
Existing LIN bus systems face challenges in distinguishing between frame errors caused by a missing response and incomplete responses, leading to complex circuitry and inefficiencies in network nodes.
Implementing a mechanism in LIN network nodes to detect a recessive bit after the first header and use a flag or SR latch to differentiate between missing and incomplete responses, simplifying the circuitry by evaluating a flag to distinguish between these scenarios.
Enables efficient differentiation between missing and incomplete responses, reducing circuit complexity and improving network node performance in LIN bus systems.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates generally to serial bus communication, and more particularly to an improvement of the Local Interconnect Network (LIN) bus. BACKGROUND
[0002] The Local Interconnect Network (also called LIN bus) is a bus system for serial communication between multiple network nodes (e.g., sensors and actuators). It can be considered a fieldbus. The LIN specification was developed as an industry standard by the LIN Consortium in 2010. It contains the physical layer, the bus protocol (layers 2-4 according to the OSI model), the application interface, and a uniform format for describing an entire LIN. The latest revision, 2.2A, of the specification was transferred to ISO and published as ISO standard 17987-1 (Road vehicles - Local Interconnect Network (LIN) - Parts 1-8).Regarding the relevant state of the art, reference is made in particular to the following standards: ISO 17987-3:2016 (Road vehicles - Local Interconnect Network (LIN), Part 3: Protocol specification); ISO 17987-4:2016 (Road vehicles - Local Interconnect Network (LIN), Part 4: Electrical physical layer (EPL) specification 12 V / 24 V); ISO / TR 17987-5:2016 (Road vehicles - Local Interconnect Network (LIN), Part 5: Application programmers interface (API)); ISO 17987-6:2016 (Road vehicles - Local Interconnect Network (LIN), Part 6: Protocol conformance test specification); ISO 17987-8:2019 (Road vehicles - Local Interconnect Network (LIN), Part 8: Electrical physical layer (EPL) specification: LIN over DC powerline (DC-LIN)). A LIN-based serial communication system is also described in patent application US 20190165968 A1. Furthermore, patent applications CN 116827839 A and JP 2011257265 A are also mentioned.
[0003] Semiconductor chips with an integrated LIN transceiver are commercially available. Such LIN transceivers can be used in LIN commander (master) and LIN responder (slave) network nodes. The inventors have set themselves the task of improving existing LIN network nodes. OVERVIEW
[0004] The stated object is achieved by the method according to claim 1 and the circuit according to claim 9. Various embodiments and further developments are covered by the dependent claims.
[0005] Described herein is a method for a listening network node. According to one embodiment, the method includes receiving data from a serial bus interface, the data including (at least) a first header of a first data frame. The method further includes determining completion of reception of the first header and determining whether data received after the first header contains a recessive bit, and storing information indicating whether or not a recessive bit was detected.Furthermore, the method includes detecting a stop bit in the data received after the first header and, if the detection of the stop bit fails, detecting a break delimiter indicating the end of a break field of a second header, signaling a frame error if the stored information indicates that a recessive bit was received, and signaling a missing response if the stored information indicates that a recessive bit was not received.
[0006] Also described herein is a network node. According to one embodiment, the network node includes a serial bus interface configured to receive data from a serial bus interface, wherein the received data includes (at least) a first header of a first data frame. The network node further includes a frame processor configured to determine completion of reception of the first header, determine whether data received after the first header includes a recessive bit, store information indicating whether or not a recessive bit was detected, and determine a stop bit in the data received after the first header.Furthermore, the frame processor is configured to, if the detection of the stop bit fails, detect a pause delimiter indicating the end of a pause field of a second header, signal a frame error if the stored information indicates that a recessive bit was received, and signal a missing response if the stored information indicates that a recessive bit was not received. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The invention will be better understood with reference to the following drawings and descriptions. The components in the figures are not necessarily to scale; instead, emphasis is placed upon illustrating the principles of the invention. Furthermore, like reference numerals designate corresponding parts throughout the figures. In the drawings: Fig. 1 shows a Local Interconnect Network (LIN bus system) with one commander node and (at least) two responder nodes. Fig. Figure 2 shows the structure of a frame according to the LIN specification Rev. 2.2A. The frame consists of a header and a response. Fig. Figure 3 shows the structure of a generic byte field of a LIN frame. Fig. Figure 4 shows the structure of a pause field of a LIN frame (diagram (a)) and a sync byte field (diagram (b)). Fig. Figure 5 shows a scenario where the bus commander sends a pause field of a new frame after an incomplete frame (with a missing or incomplete response). As a result, a frame error is detected by a listening bus node. Fig. Figure 6 shows how a listening bus node can be enabled to distinguish a frame error due to a missing response from a frame error due to an incomplete response. Fig. Figure 7 shows a block diagram of a LIN bus responder node capable of determining the cause of a frame error, as in Fig. 6 shown. DETAILED DESCRIPTION
[0008] Fig. Figure 1 shows a local interconnect network, which can also be referred to as a LIN bus system. The network contains a commander node 11 and one or more responder nodes, in the example shown, the responder node 12 and the responder node 13. All network nodes are connected via a bus line 15. The commander node 11 is configured to perform the commander task and can also be configured to perform a responder task (like the responder nodes) and thus also operate as a responder. The basic structure of a LIN bus system and the required functions of commander and responder network nodes are known as such from the LIN specification and are therefore not discussed further here.
[0009] The LIN commander node 11 may contain a communication interface that enables communication with other units or subsystems. In the example shown, the commander node 11 contains an interface for communicating with a Control Area Network (CAN) via CAN bus lines 19. Additionally or alternatively, the commander node may also contain (or be coupled to) any other data source.
[0010] Fig. Figure 2 shows the structure of a LIN frame according to the LIN specification Rev. 2.2A. Accordingly, a frame is composed of two parts: a header part and a response part. For each frame, the header is generated by the commander node, while the response can be generated by the commander node or a responder node. The header consists of a pause field (see diagram (a) of Fig. 4), a sync field (see diagram (b) of Fig. 4) and a field for a protected identifier (PID).
[0011] The header begins with the falling edge of the pause field and ends after the end of the stop bit of the protected identifier (PID) field. The response is composed of one or more data fields and a special data field containing a checksum (checksum field). The response begins at the end of the stop bit of the PID field and ends at the end of the stop bit of the checksum field.
[0012] The interbyte spacing is the time between the end of the stop bit of the preceding field and the start bit of the following byte. The response spacing is the interbyte spacing between the PID field and the first data field of the response.
[0013] Fig. Figure 3 shows the structure of a generic byte field of a LIN frame. The sync field, PID field, data fields, and checksum field have the structure of a byte field. This means that each field begins with a (dominant) start bit, followed by eight bits (bits 0-7), and ends with a (recessive) stop bit. A dominant bit has a low level (bit with a value of zero) and a recessive bit has a high level (bit with a value of one). Accordingly, the length of a byte field corresponds to the length of ten bits.
[0014] Fig. Figure 4 shows two special fields, namely the pause field in diagram (a) and the sync field (also called the sync byte field) in diagram (b). The pause field is used to signal the start of a new frame. It is always generated by the commander node and is the only field that does not contain the Fig. 3 shown field structure is fulfilled. As in Fig. As can be seen in Figure 4, the pause field is longer than a normal byte field. According to the specification, it is at least 13 nominal bit times long (with the value zero), followed by a pause delimiter that is at least one nominal bit time long (with the value one). In other words, the pause field contains at least 13 dominant bits, and the pause delimiter contains at least one recessive bit.
[0015] Typically, a responder node can use a pause detection threshold of 11 (dominant) bit times. A responder node is not required to verify that the pause delimiter is at least one nominal bit time long. The sync field is a normal byte field with the value 85 (decimal) or 0b01010101 (binary). The most significant bit is bit 7.
[0016] A responder node should always be able to detect the pause / sync field sequence, even if it expects a byte field (assuming the byte fields are separated). When a pause / sync field sequence occurs, the current transmission is aborted and processing of a new frame begins.
[0017] The PID field consists of two subfields: the frame identifier and the parity bits. Bits 0 to 5 are the frame identifier (possible values from 0 to 63), and bits 6 and 7 are the parity bits.
[0018] As mentioned, the header is generated (and output to the bus line) by the commander node, while the response is generated (and output to the bus line) by one of the responder nodes or by the commander node acting as a responder. Situations can arise where a frame is incomplete. This can happen if none of the bus nodes issues a response after a header, which may be a desired scenario in certain situations. An incomplete frame can also occur if—for whatever reason—a response is incomplete. For example, a responder node sending a response can be preempted by the commander node sending a new pause field (consisting of 13 dominant bits).
[0019] Fig. Figure 5 shows a scenario where the commander node sends a pause field of a new frame after an incomplete frame (with a missing or incomplete response). As a result, a frame error (stop bit error) is detected by a listening bus node, since it expects a data field. Assuming the scenario where a second header is sent by the bus commander instead of waiting for a response, a listening responder node (which does not yet know that a second header is being sent) will interpret the first (dominant) bit of the pause field of the second header as the start bit of a data field and, after receiving / detecting eight bits (bits 0-7), will expect a (recessive) stop bit. However, since the pause field contains at least 13 dominant bits, the recessive stop bit does not occur.As a result, the listening responder node signals a frame error (stop bit error) at the time the stop bit is expected. Only later, upon detection of the pause delimiter bit, is the pause field (and thus the new header) recognized as such.
[0020] The above with reference to Fig. The frame error explained in Figure 5 can have two causes, namely a second header, without a response in between, following a first header, and a second header that interrupts the response following the first header. In some applications, there is a need to distinguish between these two causes. A straightforward approach to distinguish between these two scenarios (missing response and incomplete response) could be to store the received bits in a buffer memory and to analyze the history of the received bits when a stop bit error occurs. However, such an approach complicates the circuitry of a responder node, and the embodiments described here aim at a simpler solution, which is described below with reference to Fig. 6 is discussed.
[0021] The first (upper) diagram in Fig. Figure 6 shows a schematic of a normal frame with a header followed by a response containing several data fields and an appended checksum field (in Fig. 6 not shown). The second diagram of Fig. 6 shows a first header followed by a second header indicating the beginning of a new frame, although no response is sent after the first header. The third (lower) diagram of Fig. Figure 6 shows a scenario similar to the one shown in the second diagram, but with an incomplete response sent after the first header. That is, the response sent after the first header is interrupted (for whatever reason) by the Pause field of the second header.
[0022] In both scenarios (incomplete frames due to missing or incomplete response, as in the second and third diagrams of Fig. 6) a stop bit error is detected as described above with reference to Fig. 5. The frame error occurs because the responder expects a stop bit (which is always a recessive bit) at the end of a data field, but actually detects a dominant bit of the pause field of a new header. The embodiments described here implement a mechanism that allows a responder to distinguish between these two scenarios (missing response and incomplete response).
[0023] As in Fig. As can be seen in Figure 6, second diagram, the start bit of the pause field of the second header is initially interpreted as the start bit of the first data field of a response. After receiving / detecting eight bits (bits 0-7), a responder node expects a (recessive) stop bit, which does not occur because the pause field of the second header always contains a sequence of at least 13 dominant bits. Therefore, at the time the expected stop bit should have occurred, a frame error / stop bit error is signaled. Only later, after at least 13 dominant bits, is the responder able to detect the pause delimiter and identify the sequence received up to that point as the pause field of a new header. Fig. 6 (in conjunction with Fig. 5) It can be seen that after receiving the first header, no recessive bit is received by a listening responder node until the stop bit error occurs. This is different in the second scenario, where the response is not missing but incomplete because it is interrupted by the new header.
[0024] If one or more data fields are received before the stop bit error occurs, at least one recessive bit will be received before the stop bit error occurs. Accordingly, when a listening bus node receives a response (or receives a bit sequence interpreted as a response), it can set a flag upon receipt of the first recessive bit. A flag is a one-bit storage element and can be a special bit stored in a register. Alternatively, a flag can be implemented using a simple SR latch (set-reset flip-flop). If the flag is set at the time the pause delimiter is detected after the occurrence of a stop bit error (indicating that a recessive bit was previously detected), the listening bus can conclude that an incomplete response was received before the pause field was received—that is, the previous response was interrupted by a new header.
[0025] The flag is not set if the response is not present at all and a second header is sent immediately after the first header (without an incomplete response in between). Therefore, a listening bus node can easily distinguish between the two scenarios (missing response, incomplete response) by evaluating the flag.
[0026] Fig. Figure 7 shows a block diagram of a LIN bus responder node capable of receiving frames and detecting the cause of a frame error, as shown in Fig. 6. It is understood that Fig. 7 is a simplified block diagram in which elements known per se and not required for the discussion of the embodiments have been omitted in order to keep the drawings simple and easy to understand.
[0027] According to Fig. 7, the bus / network node includes a serial bus interface 121 configured to receive data from a serial bus line 15. In the illustrated example, the bus interface 121 is formed by a comparator. More complex interface circuits, known per se, may also be used. The signal representing the received data is labeled RXD. The received data includes multiple data frames, each of which contains at least one header.
[0028] The network node further includes a frame processor, which in the present example includes the pause field detector 122, the sync byte and PID evaluator 123, the RXD level monitor 124, and an AND gate 125. It is understood that a person skilled in the art will consider various other implementations of the frame processor, all of which perform substantially the same function. According to one embodiment, the frame processor is configured to detect the completion of reception of the first header. In the example of Fig. 7, this detection is performed by the pause field detector 122 and the sync byte and PID evaluator 123, wherein the logic signal EOPID provided by the sync byte and PID evaluator 123 signals the completion of the reception of a header (e.g., EOPID=1 signals the completion of the reception of a header).
[0029] The frame processor is further configured to determine whether the data received after the first header contains a recessive bit and to store information indicating whether or not a recessive bit has been detected. This determination is performed by the RXD level monitor 124, wherein the RBD signal provided by the RXD level monitor 124 indicates that a recessive bit has been detected (e.g., RBD=1 indicates the detection of a recessive bit). The RBD signal may be an output signal of a latch included in the RXD level monitor 124. The latch may be reset (to output RBD=0) upon detection of a new PID field (e.g., signaled by EOPID).
[0030] In addition, the frame processor is configured to detect a stop bit in the data received after the first header. Furthermore, if the stop bit detection fails, the frame processor is configured to detect a pause delimiter indicating the end of a pause field of a second header (e.g., by EOB=1), signal a frame error (e.g., FER=1 and NRF=0) if the stored information indicates that a recessive bit was received (e.g., RBD=1), and signal a "no-response frame" (e.g., NRF=1) if the stored information indicates that a recessive bit was not received (e.g., RBD=0).
[0031] In the example shown, the signal FER (e.g. by FER=1) indicates the occurrence of a stop bit error as described above with reference to the Fig. 5 and Fig. 6. The AND gate 125 generates the RBD & EOB logic as output signal NRF. The NRF signal is therefore "1" when the pause field of a new header (see second header in Fig. 6) is received (EOB=1) and a recessive bit was not detected (RBD=0). The RBD signal / flag is reset upon detection of a new frame (EOPID=1). This means that the monitoring circuit 124 generates RBD=0 at the beginning of an (expected) response. If the "response" turns out to be a second header, this fact is indicated by NRF=1 at the output of AND gate 125. Alternatively, if the response is interrupted by a second header, this fact is indicated by NRF=0 at the output of AND gate 125.
[0032] Although the invention has been illustrated and described with respect to one or more implementations, changes and / or modifications may be made to the illustrated examples without departing from the spirit and scope of the appended claims. Particularly with regard to the various functions performed by the components or structures (units, assemblies, devices, circuits, systems, etc.) described above, the terms (including any reference to a "means") used to describe such components are intended, unless otherwise indicated, to correspond to any component or structure that performs the specified function of the described component (e.g., that is functionally equivalent), even if it is not structurally equivalent to the disclosed structure that performs the function in the exemplary implementations of the invention illustrated herein.
Claims
[1] Method comprising: Receiving data from a serial bus interface, the data including a first header of a first data frame; Determining the completion of receipt of the first header; Determining whether the data received after the first header contains a recessive bit and storing information indicating whether or not a recessive bit was detected; Detecting a stop bit in the data received after the first header; and if the detection of the stop bit fails: Detecting a pause delimiter indicating the end of a pause field of a second header; Signaling a frame error if the stored information indicates that a recessive bit was received; and Signaling a missing response when the stored information indicates that a recessive bit was not received. [2] The method of claim 1, wherein the serial bus interface is a Local Interconnect Network (LIN) interface. [3] Method according to claim 1 or 2, where, in the event that the detection of the stop bit fails, the data received up to the pause delimiter is interpreted as a pause field of a second header, and wherein the method further comprises receiving further data of the second header. [4] A method according to any one of claims 1 to 3, wherein the information indicating whether a recessive bit has been detected or not is stored in a latch. [5] A method according to any one of claims 1 to 4, wherein receiving data from the serial bus interface begins with receiving a start bit. [6] A method according to any one of claims 1 to 5; wherein the first header includes the pause field, a synchronization field and a frame identifier field. [7] A method according to any one of claims 1 to 5; wherein receiving data includes repeatedly sampling bit values synchronous to a clock signal. [8] The method of claim 7, wherein the clock signal is synchronized using a synchronization field included in the first header. [9] Network node that has a serial bus interface (121) configured to receive data from a serial bus, the received data including a first header of a first data frame; a frame processor that is designed to: to determine the completion of the reception of the first header, to determine whether the data received after the first header contains a recessive bit and to store information indicating whether a recessive bit was detected or not; detect a stop bit in the data received after the first header; and if the detection of the stop bit fails: detect a pause delimiter indicating the end of a pause field of a second header; to signal a frame error if the stored information indicates that a recessive bit has been received; and to signal a missing response if the stored information indicates that a recessive bit was not received. [10] A network node according to claim 9, wherein the serial bus interface (121) includes a comparator. [11] Network node according to claim 9 or 10, wherein the serial bus interface (121) is a Local Interconnect Network (LIN) interface. [12] Network node according to one of claims 9 to 11, wherein the frame processor is further configured to: in the case where the detection of the stop bit fails, to interpret the data received up to the pause delimiter as a pause field of a second header, and subsequently to receive further data from the second header. [13] A network node according to any one of claims 9 to 12, wherein the frame processor includes a latch for storing information indicating whether or not a recessive bit has been detected. [14] A network node according to any one of claims 9 to 13, wherein the first header includes the pause field, a synchronization field and a frame identifier field. [15] A network node according to any one of claims 9 to 14, wherein, in order to receive data, the frame processor is arranged to repeatedly sample bit values synchronously with a clock signal.
Citation Information
Patent Citations
Method and device for realizing LIN consistency test based on DMA data customization
CN116827839A
Waveform measuring device and waveform measuring method
JP2011257265A
Serial communication system
US20190165968A1
CN000116827839A
JP002011257265A
