A data transmission detection circuit and method based on OSP protocol

By adopting two physical layers and one data link layer in the detection circuit, and using the direction latch module to detect the receiving direction, the problem of large circuit overhead in the prior art is solved, and the circuit area saving and detection efficiency improvement are achieved.

CN119544577BActive Publication Date: 2025-05-13TINYCHIP MICROELECTRONICS (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510098108.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The existing detection circuit solution requires that both channels have complete physical layer and data link layer, resulting in large circuit overhead area and cannot meet the current requirements.

Method used

A data transmission detection circuit based on the OSP protocol is designed, using two physical layers and one data link layer structure, detect the encoded Preamble flag through the direction latch module, determine the reception direction, and determine the transmission direction according to the address of the data packet parsing the OSP protocol.

Benefits of technology

It realizes that the detection of two reception directions can be completed without the need for each channel to have a complete physical layer and a data link layer, simplifying the working process and saving circuit area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544577B_ABST
    Figure CN119544577B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission detection circuit and method based on the OSP protocol, wherein the data transmission detection circuit comprises: a connection port module, a physical layer module, a data link layer module and a direction latch module; wherein the connection port module comprises: a first connection port and a second connection port; the physical layer module comprises: a first physical layer module and a second physical layer module; the data link layer module comprises: a receiving data link layer and a sending data link layer; the output end of the direction latch module is connected to the receiving data link layer, the receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and the receiving data link layer determines the sending direction of the parsed data packet according to the parsed address by connecting to the sending data link layer. The present invention only needs to adopt the structure of two physical layers plus one data link layer to realize the detection of two receiving directions at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of detection circuits, and in particular to a data transmission detection circuit and method based on an OSP protocol. Background Art

[0002] The Open System Protocol (OSP) is an open, unlicensed communication technology launched by ams OSRAM in 2023 that can connect RGB LEDs, sensors and microcontrollers produced by different manufacturers. According to the OSP protocol, the OSP protocol can be divided into the physical layer, data link layer and network layer. The physical layer completes the physical connection definition and Manchester encoding and decoding; the data link layer completes the OSP data packet structure definition, message type definition, and conflict management;

[0003] OSP protocol includes: point-to-point connection and daisy chain connection. Figure 1 , which is a daisy chain connection method in bidirectional mode. The device device2 at the end of the daisy chain, that is, the link end node EOL (End Of Line) node, when it receives the message, in bidirectional mode, its feedback direction is device device1.

[0004] The OSP protocol uses Manchester encoding, and the packet structure of the OSP protocol includes Preamble and Address, where Preamble is a fixed value of 1010 and can be used to calculate the bit cycle; the OSP protocol supports automatic addressing. After power-on, each device will be assigned a device address (not 0x0 and 0x3FF) through automatic addressing. If a device receives a message that is not data of its own address, OSP will forward the message to other devices; and the OSP protocol also supports Forward Message transmission. The automatic addressing instruction after power-on is transmitted through ForwardMessage, and the transmission method is to receive from the device at one end and forward to the device at the other end.

[0005] The current detection circuit scheme adopts a relatively redundant implementation architecture, referring to Figure 2, channel 1 and channel 2 are detected independently, and the data comes from the SIO1N / P end. The receiving physical layer rx phy1 (rx phy, i.e. Receiver Physical Layer) first performs Manchester decoding on the received data, and the data link layer rx dlink1 completes the parsing of the entire packet according to the OSP protocol. When the address is parsed, it is found that it is not the address of this device, which is a fast forwarding packet (Fast Forward packet). Since the receiving direction is the SIO1N / P end and it is a non-EOL node, the sending direction is the SIO2N / P end. The sending data link layer tx dlink2 of channel 2 is started to complete the sending of the data link layer, and the data of the data link layer is then sent to the sending physical layer txphy2 (tx phy, i.e. Transmitter Physical Layer) to complete the Manchester encoding.

[0006] It can be seen that this method requires both channels to have complete physical layer and data link layer, and the circuit overhead area is large. Therefore, the existing technology can no longer meet people's needs at this stage. Based on the current situation, it is urgent to improve the existing technology. Summary of the invention

[0007] The object of the present invention is to provide a data transmission detection circuit and method based on the OSP protocol to solve the problems raised in the above background technology.

[0008] On the one hand, the present invention provides a data transmission detection circuit based on the OSP protocol, comprising: a connection port module, a physical layer module, a data link layer module and a direction latch module; wherein the connection port module comprises: a first connection port and a second connection port; the physical layer module comprises: a first physical layer module and a second physical layer module;

[0009] The first physical layer module includes: a first receiving physical layer and a first transmitting physical layer; the first receiving physical layer and the first transmitting physical layer are externally connected to a first connection port, and the other end of the first connection port is connected to a first external device, and the first receiving physical layer is connected to a direction latch module;

[0010] The second physical layer module includes: a second receiving physical layer and a second transmitting physical layer; the second receiving physical layer and the second transmitting physical layer are externally connected to a second connection port, and the other end of the second connection port is connected to a second external device, and the second receiving physical layer is also connected to the direction latch module;

[0011] The second receiving physical layer receives data from the second external device through the second connection port, parses the Manchester code and sends it to the direction latch module;

[0012] The data link layer module includes: a receiving data link layer and a sending data link layer;

[0013] The output end of the direction latch module is connected to the receiving data link layer, the receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and the receiving data link layer determines the sending direction of the parsed data packet according to the parsed address by connecting to the sending data link layer, wherein,

[0014] The first sending direction is: the sending data link layer is connected to the first connection port by connecting to the first sending physical layer, the sending data link layer first sends the parsed data packet to the first sending physical layer, and the first sending physical layer then sends it to the first connection port;

[0015] The second sending direction is: the sending data link layer connects to the second connection port by connecting to the second sending physical layer, sends the parsed data packet to the second sending physical layer first, and the second sending physical layer sends it to the second connection port;

[0016] On the other hand, the present invention provides a data transmission detection method based on the OSP protocol, the steps comprising:

[0017] S100: The receiving physical layer module receives data from the external device through the connection port, parses the Manchester code and sends the data to the direction latch module;

[0018] S200: The direction latch module detects the Preamble flag after the data encoding, and when the "1010" flag is detected, the receiving direction is latched as the connection port;

[0019] S300: The receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and determines the sending direction of the data packet according to the parsing result;

[0020] S301: When the address of the data packet resolved by the receiving data link layer is not the address of the device, and the device is a non-EOL node, regardless of whether the working mode is a bidirectional mode or a loopback mode, the data packet is sent to the connection port in the other direction;

[0021] S302: When the address of the data packet resolved by the receiving data link layer is the address of the local device and is an EOL node, when the working mode is the bidirectional mode, the sending direction is the direction of the connection port for receiving data; when the working mode is the loopback mode, the data packet is sent to the connection port in the other direction;

[0022] S303: When the address of the data packet parsed by the receiving data link layer is not the address of the device, and the device is an EOL node, when the working mode is the bidirectional mode, the data packet is sent to the direction of the connection port for receiving data; when the working mode is the loopback mode, the data packet is sent to the connection port in the other direction;

[0023] S400: The sending data link layer sends the received data packet to the sending physical layer to complete Manchester encoding, and the sending physical layer sends the encoded data.

[0024] The present invention has the following beneficial effects:

[0025] The present invention does not require each channel to have a complete physical layer and data link layer. It only needs to adopt a structure of two physical layers plus one data link layer to achieve simultaneous detection of two receiving directions. The working process is simplified and the circuit area is saved.

[0026] The present invention detects the receiving direction by detecting the Preamble mark "1010", thereby avoiding the influence of simple burrs on the judgment of the receiving direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a schematic diagram of the daisy chain connection method in the bidirectional mode of the OSP protocol;

[0028] Figure 2 It is a schematic diagram of a redundant detection circuit structure;

[0029] Figure 3 It is a schematic diagram of the overall circuit structure of the present invention;

[0030] Figure 4 The present invention is a schematic diagram of a structure in which the working mode is a bidirectional mode, the address of the received data packet is not the address of the device, and the receiving device is a non-EOL node;

[0031] Figure 5 The present invention is a schematic diagram of a structure in which the working mode is a loopback mode, the address of the received data packet is not the address of the device, and the receiving device is a non-EOL node;

[0032] Figure 6 The present invention is a schematic diagram of a structure in which the working mode is a bidirectional mode, the address of the received data packet is the address of the device, and the receiving device is an EOL node;

[0033] Figure 7 This is a schematic diagram of the structure in which the working mode of the present invention is a loop mode, the address of the received data packet is the address of the local device, and the receiving device is an EOL node. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field of the present invention without creative work are within the scope of protection of the present invention.

[0035] In order to clearly explain the technical solution of the present invention, the embodiments of the present invention first introduce the relevant terms to facilitate understanding of the specific technical solution of the present invention. The OSP protocol supports the transmission of forward messages and fast forward messages, where the forward message must ensure the integrity of the packet, that is, it is forwarded only after the entire packet is received. The preamble flag is used to ensure that the receiver is correctly synchronized to the clock signal of the transmitter. EOL is the abbreviation of End of Line, which means the end node of the link.

[0036] refer to Figure 3 On the one hand, the present invention provides a data transmission detection circuit based on the OSP protocol, comprising: a connection port module, a physical layer module, a data link layer module and a direction latch module; wherein the connection port module comprises: a first connection port and a second connection port; the physical layer module comprises: a first physical layer module and a second physical layer module;

[0037] The first physical layer module includes: a first receiving physical layer and a first transmitting physical layer; the first receiving physical layer and the first transmitting physical layer are externally connected to a first connection port, and the other end of the first connection port is connected to a first external device, and the first receiving physical layer is connected to a direction latch module;

[0038] The first receiving physical layer receives data from the first external device through the first connection port, and sends the data to the direction latch module after parsing the Manchester code. The direction latch module detects the preamble flag after the data encoding. When the "1010" flag is detected, the receiving direction is latched as the first connection port;

[0039] The second physical layer module includes: a second receiving physical layer and a second transmitting physical layer; the second receiving physical layer and the second transmitting physical layer are externally connected to a second connection port, and the other end of the second connection port is connected to a second external device, and the second receiving physical layer is also connected to the direction latch module;

[0040] The second receiving physical layer receives data from the second external device through the second connection port, and sends the data to the direction latch module after parsing the Manchester code. The direction latch module detects the preamble flag after the data encoding. When the "1010" flag is detected, the receiving direction is latched as the second connection port.

[0041] When the direction latch module detects the preamble mark after data encoding, if one of the connection ports first detects that the preamble mark is "1010", the connection port is latched as the data receiving direction, and the data of the other connection port will no longer be received until the data reception of the connection port is completed; for example, in this embodiment, if the first connection port first detects the preamble mark "1010", the first connection port is latched as the data receiving direction, and the data of the second connection port will no longer be received until the data reception of the first connection port is completed;

[0042] The data link layer module includes: a receiving data link layer and a sending data link layer;

[0043] The output end of the direction latch module is connected to the receiving data link layer, the receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and the receiving data link layer determines the sending direction of the parsed data packet according to the parsed address by connecting to the sending data link layer, wherein,

[0044] The first sending direction is: the sending data link layer is connected to the first connection port by connecting to the first sending physical layer, the sending data link layer first sends the parsed data packet to the first sending physical layer, and the first sending physical layer then sends it to the first connection port;

[0045] The second sending direction is: the sending data link layer connects to the second connection port by connecting to the second sending physical layer, sends the parsed data packet to the second sending physical layer first, and the second sending physical layer sends it to the second connection port.

[0046] refer to Figure 4As an optional embodiment of the present invention, it is assumed that the working mode is a bidirectional mode, and there are a first external device (device1), a second external device (device2) and a third external device (device3); in this embodiment, data is input from device3 to the second external device device2 through the second connection port, and when the second external device device2 receives the address of the data packet resolved by the data link layer, for example, when the ECU wants to inquire about the status of the second external device device2 (such as temperature), since the OSP protocol is connected in a daisy chain, the inquiry packet is first sent from the ECU to the first external device device1. Since the address of the inquiry packet is the address of the second external device device2, not the address of the first external device device1, it is not the address of this device, and the second external device device2 is a non-EOL node, so the response packet (such as temperature) of the second external device device2 is sent to the first connection port through the first sending physical layer.

[0047] In this embodiment, when data is input from the first external device device1 to the second external device device2 through the first connection port, and the receiving data link layer parses the address of the data packet, since the inquiry is about the status (such as temperature) of the second external device device2, the address of the inquiry packet is the non-inquiry address of the second external device device2, so it is a non-device address. Since the first external device device1 is a non-EOL node, according to the OSP protocol, the first external device device1 will forward the inquiry packet to the second external device device2, and the sending direction is to send to the second connection port through the second sending physical layer.

[0048] On the other hand, the present invention provides a data transmission detection method based on the OSP protocol, the steps comprising:

[0049] S100: The receiving physical layer module receives data from the external device through the connection port, parses the Manchester code and sends the data to the direction latch module;

[0050] S200: The direction latch module detects the Preamble flag after the data encoding, and when the "1010" flag is detected, the receiving direction is latched as the connection port;

[0051] S300: The receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and determines the sending direction of the data packet according to the parsing result;

[0052] S301: When the address of the data packet resolved by the receiving data link layer is not the address of the device, and the device is a non-EOL node, regardless of whether the working mode is a bidirectional mode or a loopback mode, the data packet is sent to the connection port in the other direction;

[0053] S302: When the address of the data packet resolved by the receiving data link layer is the address of the local device and is an EOL node, when the working mode is the bidirectional mode, the sending direction is the direction of the connection port for receiving data; when the working mode is the loopback mode, the data packet is sent to the connection port in the other direction;

[0054] S303: When the address of the data packet parsed by the receiving data link layer is not the address of the device, and the device is an EOL node, when the working mode is the bidirectional mode, the data packet is sent to the direction of the connection port for receiving data; when the working mode is the loopback mode, the data packet is sent to the connection port in the other direction;

[0055] S400: The sending data link layer sends the received data packet to the sending physical layer to complete Manchester encoding, and the sending physical layer sends the encoded data.

[0056] refer to Figure 4 and Figure 5 As an embodiment of the present invention, if the current device is the second external device device2, assuming that the device addressing has been completed, according to the OSP protocol, device1, device2 and device3 are three external devices, SIO1N represents the receiving end of the first connection port, SIO1P represents the transmitting end of the first connection port, SIO2N represents the receiving end of the second connection port, SIO2P represents the transmitting end of the second connection port, and the device address of the first external device device1 is 0x01; the device address of the second external device device2 is 0 x02, the device address of the third external device device3 is 0x03, and the third external device device3 is an EOL node; according to the OSP protocol, when the ECU (electronic controller) inquires about the status of the second external device device2 (such as temperature), the message is first sent by the ECU and needs to pass through the first external device device1; according to the OSP protocol, when the address of the inquiry packet is parsed, since it is inquiring about the temperature of the second external device device2, the address of the received inquiry packet is not the address of this device, and the second external device device2 is a non-EOL node.

[0057] For step S301, in this embodiment, whether the working mode is bidirectional mode or loopback mode, the sending direction is the connection port in the other direction; for example Figure 4 In the bidirectional working mode, the second external device device2 receives data from the first external device device1 through the first connection port SIO1N, and the second external device device2 then sends the data to the first connection port SIO1N of the third external device device3 through the second connection port SIO2P; Figure 5 In the working mode, the loopback mode is used, and the second external device device2 receives the data of the first external device device1 through the first connection port SIO1N, and the second external device device2 then sends the data to the first connection port SIO1N of the third external device device3 through the second connection port SIO2P. In this embodiment, if the current device is the third external device device3, the message is first sent by the ECU and needs to pass through device1 and device2; according to the OSP protocol, when the address of the data packet is parsed, since the temperature of the third external device device3 is being inquired, the address of the received data packet is the address of this device, and the third external device device3 is an EOL node. For step S303, in this embodiment, when the working mode is bidirectional mode, the sending direction is the direction of the connection port that receives the data; for example Figure 4 In the embodiment, the third external device device3 receives data from the second external device device2 through the first connection port SIO1N. Since the third external device device3 is an EOL node, the third external device device3 sends data to the second external device device2 through the first connection port SIO1P. In this embodiment, when the working mode is the loopback mode, the sending direction is the direction of the connection port in another direction. Figure 5 In the example, the third external device device3 receives data from the second external device device2 through the first connection port SIO1N. Since the third external device device3 is an EOL node, the third external device device3 sends data to the ECU through the second connection port SIO2P.

[0058] As an optional embodiment of the present invention, for step S302, refer to Figure 6 and Figure 7 ,Since there is only one device, the address of the data packet parsed by the data link layer is the address of this device, and the device is an EOL node, Figure 6 The working mode is a bidirectional mode, so the first external device device1 receives data from the ECU through the first connection port SIO1P, and sends the data back to the ECU through the first connection port SIO1P; Figure 7 The working mode is the loopback mode, the third external device device3 receives the data of the ECU through the first connection port SIO1P, and sends the data back to the ECU through the second connection port SIO2P.

[0059] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission detection circuit based on the OSP protocol, characterized in that: include: Connecting port module, physical layer module, data link layer module and direction latch module; wherein, The connection port module includes: a first connection port and a second connection port; The physical layer module comprises: a first physical layer module and a second physical layer module; The first physical layer module includes: a first receiving physical layer and a first sending physical layer; wherein the first receiving physical layer and the first sending physical layer are externally connected to a first connection port, and the other end of the first connection port is connected to a first external device; The second physical layer module includes: a second receiving physical layer and a second sending physical layer; wherein the second receiving physical layer and the second sending physical layer are externally connected to a second connection port, and the other end of the second connection port is connected to a second external device; The first receiving physical layer receives data from a first external device through a first connection port, and the second receiving physical layer receives data from a second external device through a second connection port, and both the first receiving physical layer and the second receiving physical layer are connected to a direction latch module; The data link layer module includes: a receiving data link layer and a sending data link layer; The output end of the direction latch module is connected to the receiving data link layer, and the receiving data link layer completes the parsing of the entire data packet according to the OSP protocol. The receiving data link layer determines the sending direction of the parsed data packet according to the parsed address by connecting to the sending data link layer.

2. The data transmission detection circuit based on the OSP protocol according to claim 1, characterized in that: The data received by the direction latch module is the data obtained after the first receiving physical layer and the second receiving physical layer analyze and Manchester encode the data.

3. The data transmission detection circuit based on the OSP protocol according to claim 1, characterized in that: The direction latch module is used to detect the preamble flag after data encoding, and latch the data receiving direction when the "1010" flag is detected.

4. The data transmission detection circuit based on the OSP protocol according to claim 3, characterized in that: When the direction latch module detects the preamble flag after data encoding, if one of the connection ports detects the preamble flag as "1010" first, the connection port is latched as the data receiving direction, and the data of the other connection port will no longer be received until the data reception of the connection port is completed.

5. The data transmission detection circuit based on the OSP protocol according to claim 1, characterized in that: The directions in which the data link layer sends include: The sending data link layer is connected to the first connection port by connecting to the first sending physical layer. The sending data link layer first sends the parsed data packet to the first sending physical layer, and the first sending physical layer then sends it to the first connection port.

6. The data transmission detection circuit based on the OSP protocol according to claim 1, characterized in that: The direction in which the data link layer is sent also includes: The sending data link layer is connected to the second connection port by connecting to the second sending physical layer. The sending data link layer first sends the parsed data packet to the second sending physical layer, and the second sending physical layer then sends it to the second connection port.

7. A data transmission detection method based on the OSP protocol, implemented by the data transmission detection circuit according to any one of claims 1 to 6, characterized in that: The steps include, S100: The receiving physical layer module receives data from an external device through a connection port, parses the Manchester code and sends the data to the direction latch module; S200: The direction latch module detects the preamble flag after the data encoding, and when the "1010" flag is detected, the receiving direction is latched as the connection port; S300: The receiving data link layer completes the parsing of the entire data packet according to the OSP protocol, and determines the sending direction of the data packet according to the parsing result; S400: The sending data link layer sends the received data packet to the sending physical layer to complete Manchester encoding, and the sending physical layer sends the encoded data.

8. The data transmission detection method based on the OSP protocol according to claim 7, characterized in that: S300 includes: When the address of the data packet resolved by the receiving data link layer is not the address of the device, and the device is not a link end node, regardless of whether the working mode is bidirectional mode or loopback mode, the data packet is sent to the connection port in the other direction.

9. The data transmission detection method based on the OSP protocol according to claim 7, characterized in that: The S300 also includes: When the address of the data packet resolved by the receiving data link layer is the address of the local device, and the device is the end node of the link, When the working mode is bidirectional mode, the sending direction is the direction of the connection port that receives data; When the working mode is loopback mode, the data packet is sent to the connection port in the other direction.

10. The data transmission detection method based on the OSP protocol according to claim 7, characterized in that: The S300 also includes: When the address of the data packet resolved by the receiving data link layer is not the address of the local device, and the device is the end node of the link, When the working mode is bidirectional mode, the data packet is sent in the direction of the connection port receiving the data; When the working mode is loopback mode, the data packet is sent to the connection port in the other direction.

Citation Information

Patent Citations

  • Downlink test method and device

    CN115499350A

  • Circuit and method for quickly forwarding message based on OSP protocol

    CN119135311A