CN116156021A - USB PD message decoding method and device, chip and communication equipment - Google Patents
USB PD message decoding method and device, chip and communication equipment Download PDFInfo
- Publication number
- CN116156021A CN116156021A CN202211605434.5A CN202211605434A CN116156021A CN 116156021 A CN116156021 A CN 116156021A CN 202211605434 A CN202211605434 A CN 202211605434A CN 116156021 A CN116156021 A CN 116156021A
- Authority
- CN
- China
- Prior art keywords
- data
- usb
- decoding
- detected
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/18—Protocol analysers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a USB PD message decoding method and device, a chip and communication equipment, wherein the method comprises the following steps: receiving sampling data of a USB PD signal in real time, and sequentially placing the sampling data into a FIFO buffer memory with a set length; extracting current data from the FIFO buffer memory, and taking the current data as data to be detected; matching the data to be detected with 4K codes in a frame header sequence code; if at least 3K codes are successfully matched, the detection of the frame header sequence code is determined. By using the scheme of the invention, the accurate detection and the receiving of the USB PD message can be realized.
Description
Technical Field
The invention relates to the technical field of digital communication, in particular to a USB PD message decoding method and device, a chip and communication equipment.
Background
The USB (Universal Serial Bus) PD (universal serial bus) protocol is also called USB Power supply specification, and is a fast charging protocol, which aims to specify fast charging devices in the market, so that the fast charging device is universal, and the fast charging device can be used between different devices, so as to avoid the situation that a battery cannot be charged or damaged due to exceeding of voltage or current during charging.
The USB PD protocol uses a Type-C (Type C) interface, the USB PD standard is divided into five stages of 'specifications' of 10W, 18W, 36W, 60W and 100W, the voltage is 5V, 12V, 15V and 20V, the current is 1.5A, 2A, 3A and 5A, and the maximum current is 100W, and according to the successful communication handshake between devices, the autonomous negotiation adopts corresponding power to charge and discharge, and in addition, the USB PD standard is bidirectional, and can mutually transform roles, namely power supply.
PD messages are classified into different types of messages according to their frame header sequence codes (Ordered Sets) according to the USB PD3.0 protocol, section 5.4, and are roughly classified into SOP/SOP'/SOP "/Hard Reset/Cable Reset, etc. Each frame header sequence code consists of 4K-codes, and the protocol specifies that only one erroneous K-code may not affect the reception of the message. While the protocol specifies that the Preamble (Preamble) of each message consists of alternating 0/1 of 64 bits and must start from 0 and end from 1.
Because the problems of signal level distortion, frequency offset, asymmetric duty cycle and the like can be generated in the actual circuit operation transmission process, the sampling error of the digital receiving circuit is caused. In this case, the reception of the message is affected, so that the receiver cannot timely reply to the GoodCRC message for confirming that the previous message has been received correctly.
Disclosure of Invention
The embodiment of the invention provides a USB PD message decoding method and device and communication equipment, so as to realize accurate detection and reception of a USB PD message.
Therefore, the embodiment of the invention provides the following technical scheme:
in one aspect, an embodiment of the present invention provides a method for decoding a USB PD packet, where the method includes:
receiving sampling data of a USB PD signal in real time, and sequentially placing the sampling data into a FIFO buffer memory with a set length;
extracting current data from the FIFO buffer memory, and taking the current data as data to be detected;
matching the data to be detected with 4K codes in a frame header sequence code;
if at least 3K codes are successfully matched, the detection of the frame header sequence code is determined.
Optionally, the FIFO buffer length is 20 bits.
Optionally, the matching the data to be detected with 4K codes in the frame header sequence code includes:
dividing the data to be detected into four parts in sequence to obtain a sequence to be detected;
and matching the sequence to be detected with the frame header sequence codes of all types in sequence.
Optionally, the method further comprises:
determining a data starting point in the USB PD message according to the frame header sequence code;
and decoding according to the sampling data after the starting point to obtain data in the USB PD message.
Optionally, the method further comprises:
starting a decoding timer after determining that the frame header sequence code is detected;
if the EOP code is obtained by decoding before the decoding timer is overtime, determining that the message is received completely, and closing the decoding timer;
otherwise, after the decoding timer is overtime, the message is determined to be received.
On the other hand, the embodiment of the invention also provides a device for decoding the USB PD message, which comprises:
the data buffer module is used for receiving sampling data of the USB PD signal in real time and sequentially placing the sampling data into the FIFO buffer memory with set length;
the detection module is used for extracting current data from the FIFO buffer memory, taking the current data as data to be detected, and matching the data to be detected with 4K codes in a frame header sequence code; in case of at least 3K-code matches successful, it is determined that a frame header sequence code is detected.
Optionally, the detection module includes:
a data extraction unit, configured to extract current data from the FIFO buffer;
the data processing unit is used for taking the current data as data to be detected, and dividing the data to be detected into four parts in sequence to obtain a sequence to be detected;
and the matching unit is used for sequentially matching the sequence to be detected with the frame header sequence codes of all types, and determining that the frame header sequence codes are detected under the condition that at least 3K codes are successfully matched.
Optionally, the detection module is further configured to determine a data start point in the USB PD packet according to the frame header sequence code;
the apparatus further comprises: and the decoding module is used for decoding the sampled data after the starting point to obtain the data in the USB PD message.
Optionally, the apparatus further comprises: a decoding timer;
the detection module is further configured to start the decoding timer after determining that the frame header sequence code is detected;
the decoding module is further used for determining that the message is received after the EOP code is obtained by decoding before the decoding timer is overtime, and closing the decoding timer; otherwise, after the decoding timer is overtime, the message is determined to be received.
On the other hand, the embodiment of the invention also provides a chip, which comprises the USB PD message decoding device.
On the other hand, the embodiment of the present invention further provides a communication device, where the communication device is configured to perform USB PD report Wen Jiaohu with other devices through a communication line, and the communication device includes: the sampling module and the USB PD message decoding device are used for sampling the data;
the sampling module is used for sampling the USB PD signals transmitted on the communication line to obtain sampling data;
the USB PD message decoding device is used for decoding according to the sampling data.
According to the USB PD message decoding method and device, sampling data of a USB PD signal received in real time are stored into the FIFO buffer memory with the set length, current data in the FIFO buffer memory is used as data to be detected, and the current data are matched with 4K codes in a frame header sequence code; if at least 3K codes are successfully matched, the detection of the frame header sequence code is determined. By using the scheme of the invention, the detection of the frame header sequence code can be simply and conveniently realized. In addition, the preamble is not required to be detected, and the frame header sequence code is directly detected to determine the data starting point in the USB PD message, so that the situation that the preamble is wrong or lost can be filtered, namely, the decoding of the data in the USB PD message can not be influenced as long as the frame header sequence code can be detected under the situation that the preamble is wrong or lost, and the correct receiving of the transmission data is ensured.
Further, by setting the decoding timer, even in the case of EOP code reception error, subsequent message reception is not affected.
Accordingly, the communication equipment provided by the embodiment of the invention can effectively improve the robustness of the equipment by utilizing the USB PD message decoding device, so that the equipment is better suitable for various application environments.
Drawings
Fig. 1 is a schematic diagram of a communication flow of a conventional USB PD 3.0.
Fig. 2 is a flowchart of a method for decoding a USB PD packet according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a window queue corresponding relation between sampled data and 20 bits according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for decoding a USB PD packet according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a USB PD message decoding apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of another structure of a USB PD message decoding apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
Detailed Description
In order to make the above objects, features and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below.
The communication flow of the USB PD3.0, including the transmission and reception process of the data packet, is first briefly described as shown in fig. 1. Wherein:
the flow of sending the data packet is as follows:
(1) Receiving a data packet from a protocol layer;
(2) Performing CRC;
(3) Encoding the CRC result onto the data packet;
(4) The verified data packet is sent through BMC (Biphase Mark Coding) codes via (Configuration Channel, CC) communication lines.
The flow of receiving the data packet is as follows:
(1) Recovering the clock and locking to the preamble of the data packet;
(2) Detecting SOP;
(3) Decoding the received data, including the CRC;
(4) It is determined whether the received data is valid data.
The format of the data message of the USB PD protocol is shown in table 1 below.
TABLE 1
Preamble | SOP (start of packet) | Message | CRC | EOP (end of bag) |
Wherein, the roles of the information fields are as follows:
the Preamble is a Preamble consisting of a 64-bit sequence of alternating "0" and "1" (beginning with "0" and ending with "1");
SOP (Start of Packet) is similar to the address of I2C (Inter-Integrated Circuit, integrated circuit bus) communication, and SOP is divided into three types, namely SOP, SOP'; where SOP refers to the communication between a Source (Source) and Sink (Sink), only end-to-end, and the cable cannot recognize such messages; SOP' and SOP "can only be data types where one end (Source or Sink) communicates with the cable;
message is a payload comprising three types of messages, respectively: 1) Controlling the short message; 2) Data information; 3) Expanding the message;
CRC (Cyclic Redundancy Check ) is a check code, calculating all bytes of the payload except for the frame symbols (Preamble, SOP, EOP);
EOP (End of Packet, end of Packet code).
Only the Message field is the data of the protocol layer, and the other fields are the physical layer data.
PD messages are classified into different types of messages according to their frame header sequence codes (Ordered Sets), and are roughly classified into SOP/SOP'/SOP "/Hard Reset (hardware Reset)/Cable Reset (Cable Reset), etc.
At the transmitting end, the PD physical layer needs to assemble the Message, that is, add the preamble, SOP, CRC, EOP, etc., and then encode the assembled data and transmit it. Correspondingly, at the receiving end, the received data packet needs to be decoded and checked, and finally the Message is obtained.
In USB PD3.0, the data packets are encoded with 4b5b except for the preamble, i.e. 4 bits of data are encoded into 5 bits of symbols for transmission at the transmitting end and 5 bits of symbols are decoded into 4 bits of data at the receiving end.
The 4b5b code provides data encoding and special symbols, uses special symbols to represent hard resets, and delineates packet boundaries. The 4b5b symbol encoding table is shown in table 2 below.
TABLE 2
PD messages are classified into different types of messages according to their frame header sequence codes (Ordered Sets), and are roughly classified into SOP/SOP'/SOP "/Hard Reset/Cable Reset. Each frame header sequence code consists of 4K-codes (K-codes) as shown in table 3 below.
TABLE 3 Table 3
The receiver searches all 4K codes and when 3 or 4 of the 4K codes are found in the correct position, it is the valid frame header sequence code.
Therefore, the embodiment of the invention provides a method and a device for decoding a USB PD message, which are used for directly detecting a frame header sequence code without detecting a preamble of sampling data of a received USB PD signal, and determining a data starting point in the USB PD message after detecting the frame header sequence code, further starting the data starting point, and decoding the adopted data behind the starting point to obtain the data in the USB PD message.
Fig. 2 is a flowchart of a method for decoding a USB PD packet according to an embodiment of the present invention.
The USB PD message decoding method of the embodiment comprises the following steps:
Considering 4K codes in the frame header sequence code, after 4b5b coding is performed, the 5b code corresponding to each K code is 5 bits, so the length of the FIFO buffer can be set to 20 bits.
The FIFO buffer is a first-in first-out buffer, that is, after 20 bits of data are stored, new sampling data enter the FIFO buffer, and the data that enter the FIFO buffer first overflows from the FIFO buffer. A 20bit FIFO buffer can also be considered as a 20bit window queue that slides with the sample signal sequence.
Fig. 3 is a schematic diagram of a window queue corresponding relationship between sampled data and 20 bits in an embodiment of the present invention.
Wherein CC represents a USB PD signal transmitted on a communication line, rx_sample_en represents a sample data output enable signal, rx_sample represents a sample signal, and sr20bit_queue represents a 20bit window queue.
And 202, extracting current data from the FIFO buffer memory, and taking the current data as data to be detected.
That is, each time it is detected that 20 bits of buffered data are extracted from the FIFO buffer, it is detected whether the 20 bits of buffered data are frame header sequence codes, i.e., 4K codes.
In the embodiment of the invention, 20 bits of buffered data can be extracted from the FIFO buffer every 5 sampling clocks.
And 203, matching the data to be detected with 4K codes in the frame header sequence code.
The frame header sequence code is used for identifying the type of the USB PD message, and specifically includes the following steps: SOP, SOP', SOP ", hardware reset, transmission line reset. While the corresponding values of the 4K codes may be different for different types, see in particular table 3 above.
Therefore, in the embodiment of the invention, the data to be detected can be divided into four parts in sequence to obtain the sequence to be detected, and the sequence to be detected is matched with the frame header sequence codes of all types in sequence.
Of course, the data to be detected may be unequal, and 20 bits may be matched with 4K codes in the frame header sequence code together, which is not limited to the embodiment of the present invention.
Step 205 determines that a frame header sequence code is detected.
After detecting the frame head sequence code, determining a data starting point in the USB PD message according to the frame head sequence code, and decoding according to the sampling data after the starting point to obtain the data in the USB PD message. Specifically, the data after the data starting point is extracted from the FIFO buffer memory is decoded by 4b5b, and the data in the USB PD message is obtained.
It should be noted that, when extracting data to be decoded from the FIFO buffer, data may be extracted from the FIFO buffer every 5 sampling periods, that is, 5 bits of data may be extracted each time, and 5b4b decoding may be performed on the extracted 5 bits of data to obtain 4 bits of data. Of course, 5N (n=2 or 3 or 4) bits of data may be extracted from the FIFO buffer each time, and of course, the number of bits extracted is different, and the corresponding data extraction clocks are different, which is not limited to the embodiment of the present invention.
It should be noted that, the above steps 201 and 202 to 205 are two parallel processes, and the two processes may be controlled by corresponding timing control mechanisms.
The method for decoding the USB PD message can simply and conveniently realize the detection of the frame header sequence code. In addition, the preamble is not required to be detected, and the frame header sequence code is directly detected to determine the data starting point in the USB PD message, so that the situation that the preamble is wrong or lost can be filtered, namely, the decoding of the data in the USB PD message can not be influenced as long as the frame header sequence code can be detected under the situation that the preamble is wrong or lost, and the correct receiving of the transmission data is ensured.
According to the data message format of the USB PD protocol shown in table 1, the EOP code in the USB PD message indicates that the data packet is finished, that is, the reception of the USB PD message is finished. Therefore, in the prior art, the reception of the message is usually determined by decoding the EOP code, and the current USB PD message reception process is ended.
Considering the situation that the EOP code receiving error or EOP code loss may be caused by various reasons in the data transmission process, in these situations, the EOP code cannot be obtained all the time by decoding, and the current USB PD message receiving process cannot be finished. In order not to affect the subsequent USB PD message receiving process, in another embodiment of the method of the present invention, the decoding timer may be set to solve the problem.
Fig. 4 is a flowchart of a method for decoding a USB PD packet according to an embodiment of the present invention.
The USB PD message decoding method of the embodiment comprises the following steps:
and step 401, receiving sampling data of the USB PD signal in real time, and sequentially placing the sampling data into a FIFO buffer memory with a set length.
And step 402, extracting current data from the FIFO buffer memory, and taking the current data as data to be detected.
Step 405 determines if the decode timer has timed out. If yes, go to step 407; otherwise, step 406 is performed.
It should be noted that, the duration of the decoding timer may be set to a decoding duration corresponding to the maximum data length in the USB PD packet.
The method for decoding the USB PD message in the embodiment of the invention can simply and conveniently realize the detection of the frame header sequence code, further determine the data starting point in the USB PD message according to the frame header sequence code, and decode the sampled data after the starting point to obtain the data in the USB PD message. Moreover, by setting the decoding timer, even in the case of an EOP code reception error, the subsequent message reception is not affected.
Correspondingly, the embodiment of the invention also provides a USB PD message decoding device, as shown in FIG. 5, which is a structural schematic diagram of the device.
The USB PD message decoding apparatus 500 includes the following modules:
the data buffer module 501 is configured to receive sampling data of a USB PD signal in real time, and sequentially put the sampling data into FIFO buffers with a set length;
the detection module 502 is configured to extract current data from the FIFO buffer, take the current data as data to be detected, and match the data to be detected with 4K codes in a frame header sequence code; in case of at least 3K-code matches successful, it is determined that a frame header sequence code is detected.
One non-limiting example of the detection module 502 may include the following:
a data extraction unit, configured to extract current data from the FIFO buffer;
the data processing unit is used for taking the current data as data to be detected, and dividing the data to be detected into four parts in sequence to obtain a sequence to be detected;
and the matching unit is used for sequentially matching the sequence to be detected with the frame header sequence codes of all types, and determining that the frame header sequence codes are detected under the condition that at least 3K codes are successfully matched.
Further, in another non-limiting embodiment of the USB PD message decoding apparatus of the present invention, the apparatus may further include:
the detection module 502 is further configured to determine a data start point in the USB PD packet according to the frame header sequence code.
Accordingly, the USB PD message decoding apparatus of this embodiment may further include: and the decoding module is used for decoding the sampled data after the starting point to obtain the data in the USB PD message.
According to the USB PD message decoding device provided by the embodiment of the invention, sampling data of a USB PD signal received in real time is stored into the FIFO buffer memory with the set length, and the current data in the FIFO buffer memory is used as data to be detected and is matched with 4K codes in a frame header sequence code; if at least 3K codes are successfully matched, the detection of the frame header sequence code is determined. By using the scheme of the invention, the detection of the frame header sequence code can be simply and conveniently realized. In addition, the preamble is not required to be detected, and the frame header sequence code is directly detected to determine the data starting point in the USB PD message, so that the situation that the preamble is wrong or lost can be filtered, namely, the decoding of the data in the USB PD message can not be influenced as long as the frame header sequence code can be detected under the situation that the preamble is wrong or lost, and the correct receiving of the transmission data is ensured.
Fig. 6 is a schematic diagram of another structure of a USB PD message decoding apparatus according to an embodiment of the present invention.
The difference from the embodiment shown in fig. 5 is that in this embodiment, the USB PD packet decoding apparatus further includes: the decoding module 601 and the decoding timer 602.
In this embodiment:
the data buffer module 501 is configured to receive sampling data of a USB PD signal in real time, and sequentially put the sampling data into FIFO buffers with a set length;
the detection block 502 is configured to extract current data from the FIFO buffer, take the current data as data to be detected, and match the data to be detected with 4K codes in a frame header sequence code; under the condition that at least 3K codes are successfully matched, determining that a frame header sequence code is detected, determining a data starting point in a USB PD message according to the frame header sequence code, and starting the decoding timer.
The decoding module 601 is configured to decode the sampled data after the starting point to obtain data in a USB PD packet, determine that the packet is received after the EOP code is obtained by decoding before the decoding timer 602 times out, and close the decoding timer; otherwise, after the decoding timer 602 times out, it is determined that the message reception is completed.
By utilizing the USB PD message decoding device of the embodiment, the detection of the frame header sequence code can be simply and conveniently realized, the data starting point in the USB PD message is further determined according to the frame header sequence code, and the data in the USB PD message is obtained by decoding the sampled data after the starting point. Moreover, by setting the decoding timer, even in the case of an EOP code reception error, the subsequent message reception is not affected.
Correspondingly, the embodiment of the invention also provides a chip, which comprises the USB PD message decoding device of the embodiment.
Correspondingly, the embodiment of the invention also provides communication equipment which is used for carrying out USB PD message interaction with other equipment through a communication line. As shown in fig. 7, is a schematic structural diagram of the communication device.
The communication device includes: sampling module 701, and USB PD message decoding apparatus 500 as described above. Wherein:
the sampling module 701 is configured to sample the USB PD signal transmitted on the communication line, to obtain sampling data;
the USB PD packet decoding apparatus 500 is configured to perform decoding processing according to the sampled data.
The communication device may be a terminal device with an USB Type-c interface, such as a mobile phone.
The communication equipment provided by the embodiment of the invention can realize the detection of the frame header sequence code by utilizing the USB PD message decoding device, and after the frame header sequence code is detected, the data in the USB PD message is obtained by decoding according to the follow-up sampling data. Furthermore, the decoding timer can be used, and the subsequent message reception is not affected even under the condition of EOP code reception errors, so that the robustness of the equipment can be effectively improved, and the equipment can be better adapted to various different application environments.
It should be understood that the term "and/or" is merely an association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In this context, the character "/" indicates that the front and rear associated objects are an "or" relationship.
The term "plurality" as used in the embodiments of the present invention means two or more.
The first, second, etc. descriptions in the embodiments of the present invention are only used for illustrating and distinguishing the description objects, and no order is used, nor is the number of the devices in the embodiments of the present invention limited, and no limitation on the embodiments of the present invention should be construed.
In the several embodiments provided in the present invention, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may be physically disposed separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the invention, and the scope of the invention should be assessed accordingly to that of the appended claims.
Claims (11)
1. A method for decoding a USB PD packet, the method comprising:
receiving sampling data of a USB PD signal in real time, and sequentially placing the sampling data into a FIFO buffer memory with a set length;
extracting current data from the FIFO buffer memory, and taking the current data as data to be detected;
matching the data to be detected with 4K codes in a frame header sequence code;
if at least 3K codes are successfully matched, the detection of the frame header sequence code is determined.
2. The method of claim 1, wherein the FIFO buffer length is 20 bits.
3. The method of claim 2, wherein said matching the data to be detected with 4K codes of a frame header sequence code comprises:
dividing the data to be detected into four parts in sequence to obtain a sequence to be detected;
and matching the sequence to be detected with the frame header sequence codes of all types in sequence.
4. A method according to any one of claims 1 to 3, further comprising:
determining a data starting point in the USB PD message according to the frame header sequence code;
and decoding according to the sampling data after the starting point to obtain data in the USB PD message.
5. The method according to claim 4, wherein the method further comprises:
starting a decoding timer after determining that the frame header sequence code is detected;
if the EOP code is obtained by decoding before the decoding timer is overtime, determining that the message is received completely, and closing the decoding timer;
otherwise, after the decoding timer is overtime, the message is determined to be received.
6. A USB PD message decoding apparatus, said apparatus comprising:
the data buffer module is used for receiving sampling data of the USB PD signal in real time and sequentially placing the sampling data into the FIFO buffer memory with set length;
the detection module is used for extracting current data from the FIFO buffer memory, taking the current data as data to be detected, and matching the data to be detected with 4K codes in a frame header sequence code; in case of at least 3K-code matches successful, it is determined that a frame header sequence code is detected.
7. The apparatus of claim 6, wherein the detection module comprises:
a data extraction unit, configured to extract current data from the FIFO buffer;
the data processing unit is used for taking the current data as data to be detected, and dividing the data to be detected into four parts in sequence to obtain a sequence to be detected;
and the matching unit is used for sequentially matching the sequence to be detected with the frame header sequence codes of all types, and determining that the frame header sequence codes are detected under the condition that at least 3K codes are successfully matched.
8. The apparatus according to claim 6 or 7, wherein,
the detection module is further configured to determine a data starting point in the USB PD packet according to the frame header sequence code;
the apparatus further comprises:
and the decoding module is used for decoding the sampled data after the starting point to obtain the data in the USB PD message.
9. The apparatus of claim 8, wherein the apparatus further comprises: a decoding timer;
the detection module is further configured to start the decoding timer after determining that the frame header sequence code is detected;
the decoding module is further used for determining that the message is received after the EOP code is obtained by decoding before the decoding timer is overtime, and closing the decoding timer; otherwise, after the decoding timer is overtime, the message is determined to be received.
10. A chip comprising a USB PD message decoding apparatus according to any one of claims 6 to 9.
11. A communication apparatus for USB PD reporting Wen Jiaohu with other apparatuses via a communication line, comprising: a sampling module, a USB PD message decoding apparatus according to any one of claims 6 to 9;
the sampling module is used for sampling the USB PD signals transmitted on the communication line to obtain sampling data;
the USB PD message decoding device is used for decoding according to the sampling data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211605434.5A CN116156021A (en) | 2022-12-14 | 2022-12-14 | USB PD message decoding method and device, chip and communication equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211605434.5A CN116156021A (en) | 2022-12-14 | 2022-12-14 | USB PD message decoding method and device, chip and communication equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116156021A true CN116156021A (en) | 2023-05-23 |
Family
ID=86339894
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211605434.5A Pending CN116156021A (en) | 2022-12-14 | 2022-12-14 | USB PD message decoding method and device, chip and communication equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116156021A (en) |
-
2022
- 2022-12-14 CN CN202211605434.5A patent/CN116156021A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103141066B (en) | Transmission circuit, reception circuit, transmission method, reception method, communication system and communication method therefor | |
US10396921B2 (en) | Multi-lane synchronization method, synchronization apparatus and system, and computer storage medium | |
CN106817197B (en) | Communication coding and decoding method based on duty ratio modulation | |
US20170024354A1 (en) | Single-wire interface bus transciver system based on i2c-bus, and associated method for communication of single-wire interface bus | |
CN108512785B (en) | Data transmission protocol method | |
JP2003524331A (en) | Interface between modem and subscriber interface module | |
CN108390752B (en) | Signal receiving method | |
JPH05122282A (en) | Data transmission system | |
KR20160125411A (en) | Bit allocation over a shared bus to facilitate an error detection optimization | |
CN112187789B (en) | Data link protocol conversion system | |
CN111177060B (en) | Serial port data sending method, serial port data receiving method, corresponding devices and terminal equipment | |
US20150312037A1 (en) | Data scrambling initialization | |
JP4988544B2 (en) | Data processing apparatus, data processing method, and program | |
CN109728879B (en) | Synchronous error correction method for serial burst access application layer SLIP protocol message | |
CN116156021A (en) | USB PD message decoding method and device, chip and communication equipment | |
US9094911B2 (en) | Data communication system, method of optimizing preamble length, and communication apparatus | |
CN102480333A (en) | Line coding method as well as synchronous processing method and device of coded data block | |
Gallo et al. | Revision and verification of an enhanced UART | |
CN100444595C (en) | A method of master-slave equipment communication | |
CN110381095B (en) | System on chip, equipment and communication system | |
CN111800360B (en) | FSK software decoding method based on frequency identification | |
CN113794538A (en) | High-efficiency dual-computer communication feedback method | |
CN210442508U (en) | Empty pipe radar conversion equipment | |
CN108322298B (en) | UART out-of-synchronization recovery method, equipment and system | |
CN110875911B (en) | Communication protocol and communication method for supporting automatic identification of single data packet data bit number |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |