A method for adaptive decoding of MIPI APHY cable polarity
By sending a fixed format 01 sequence in the MIPI APHY system and detecting the counter, automatically judging the cable status, the problem of not being able to establish a connection under the back plugging of the cable is solved, and the system's automatic detection and efficient connection are realized.
Patent Information
- Application Number
- CN202411426935.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The MIPI APHY system cannot establish a connection correctly under the back plugging of the cable, and there is a lack of a method to automatically identify the cable status to improve the convenience and compatibility of the system.
By periodically sending a fixed-length fixed-format 01 sequence in the MIPI APHY system, and detecting the number of times the sequence appears through the counter at the receiving end, it automatically determines whether the cable is in a forward or reverse plug state, thereby performing corresponding data processing.
It realizes automatic detection of cable status and establishing connections without the intervention of external equipment, improving the convenience and compatibility of the system, and having higher timeliness and accuracy.
Smart Images

Figure CN119292984B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal detection, and in particular to a method for adaptively decoding polarity of a MIPI APHY cable. Background Art
[0002] At the receiving end of the MIPI (Mobile Industry Processor Interface) APHY (Automobile PHY) signal, the current protocol can only work properly when the cable is plugged in correctly, such as Figure 1 If the cable is plugged in reverse, as shown Figure 2 If the following error message appears, the connection cannot be established correctly.
[0003] In order to enhance the convenience and compatibility of MIPI APHY system board-level layout and wiring, there is an urgent need for a method that allows the system to automatically identify whether the current cable status is forward or reverse, and to establish a normal connection without the intervention of any external device. Summary of the invention
[0004] The object of the present invention is to provide a method for adaptively decoding polarity of a MIPI APHY cable to solve the problems in the background technology.
[0005] In order to solve the above technical problems, the present invention provides a method for adaptively decoding MIPI APHY cable polarity, comprising:
[0006] During the APHY connection establishment process, at a certain stage, the sender will periodically send a fixed-length and fixed-format 01 sequence, which is recorded as the first sequence. At the same time, the sequence that is the bit-inverted first sequence is called the inverse sequence, which is recorded as the second sequence.
[0007] During this phase, the receiving circuit will continue to observe the received bit stream:
[0008] When the number of times the first sequence is received within a certain period of time is greater than a preset threshold, it is considered that the cable is in a normal plug-in state, and the data parsed by the analog circuit is not processed;
[0009] When the number of times the second sequence is received within a certain period of time is greater than a preset threshold, it is considered that the cable is in a reverse insertion state, and the data analyzed by the analog circuit is bit-inverted before subsequent actions are performed;
[0010] When calculating the number of times the first sequence is received, if the second sequence is received, the counter of the first sequence is reset; when calculating the number of times the second sequence is received, if the first sequence is received, the counter of the second sequence is reset;
[0011] If the first sequence is detected, the counter of the first sequence is incremented by 1 and the counter of the second sequence is reset to zero; if the second sequence is detected, the counter of the second sequence is incremented by 1 and the counter of the first sequence is reset to zero.
[0012] In one implementation, if the first sequence or the second sequence is not detected in the received code stream, the current data format of the analog circuit is maintained for processing.
[0013] The present invention provides a method for adaptively decoding MIPI APHY cable polarity, which has the following beneficial effects:
[0014] (1) It can automatically detect whether the cable is in the forward or reverse insertion state;
[0015] (2) After the cable status is detected, the system can directly establish a connection normally without the intervention of external equipment;
[0016] (3) Compared with using upper layer protocols to judge the current cable status, the timeliness and accuracy of the present invention are better. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is an indication that the APHY cable is properly plugged in.
[0018] Figure 2 This is an indication that the APHY cable is plugged in reverse.
[0019] Figure 3 It is a typical application diagram of the method for adaptive decoding of MIPI APHY cable polarity proposed in the present invention. DETAILED DESCRIPTION
[0020] The following is a further detailed description of a method for adaptive decoding of MIPI APHY cable polarity proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer according to the following description. It should be noted that the accompanying drawings are in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0021] When the cable is reversed, the data 0 sent by the sender will be parsed as data 1 by the receiver, and the data 1 sent by the sender will be parsed as data 0 by the receiver. During the APHY connection establishment process, there is a window in which the sender will send a fixed format 01 sequence. Based on the above two facts, the present invention designs the following method:
[0022] like Figure 3 As shown, when the other party's transmitting end sends a sequence of a specific format, the relevant detection program will be started, otherwise the data format of the current analog circuit will be maintained for processing.
[0023] When the detection program is started, it is determined whether there is a sequence of a specific format or a sequence of a specific format inverse in the current code stream. If neither of the above is detected, the current data format of the analog circuit is maintained for processing.
[0024] If a sequence of a specific format is detected, the counter of the specific format sequence should be increased by 1, and the counter of the specific format inverse sequence should be reset to zero, and further determine whether the counter of the specific format sequence has counted to the preset threshold. If the threshold has been reached, it is determined that the APHY cable is in the positive insertion state, indicating that the subsequent processing should use the original data sent by the analog circuit. If the threshold has not been reached, continue monitoring.
[0025] If a sequence of a specific format reverse code is detected, the counter of the specific format reverse code sequence should be increased by 1, and the counter of the specific format sequence should be reset to zero, and further determine whether the counter of the specific format reverse code sequence has counted to the preset threshold. If the threshold has been reached, it is determined that the APHY cable is in the reverse insertion state, and the subsequent processing should use the original data sent by the analog circuit and reverse it bit by bit. If the threshold has not been reached, continue monitoring.
[0026] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A method for adaptive decoding of MIPI APHY cable polarity, characterized in that: include: During the APHY connection establishment process, at a certain stage, the sender will periodically send a fixed-length and fixed-format 01 sequence, which is recorded as the first sequence. At the same time, the sequence that is the bit-inverted first sequence is called the inverse sequence, which is recorded as the second sequence. During this phase, the receiving circuit will continue to observe the received bit stream: When the number of times the first sequence is received within a certain period of time is greater than a preset threshold, it is considered that the cable is in a normal plug-in state, and the data parsed by the analog circuit is not processed; When the number of times the second sequence is received within a certain period of time is greater than a preset threshold, it is considered that the cable is in a reverse insertion state, and the data analyzed by the analog circuit is bit-inverted before subsequent actions are performed; When calculating the number of times the first sequence is received, if the second sequence is received, the counter of the first sequence is reset; when calculating the number of times the second sequence is received, if the first sequence is received, the counter of the second sequence is reset; If the first sequence is detected, the counter of the first sequence is incremented by 1 and the counter of the second sequence is reset to zero; If the second sequence is detected, the counter of the second sequence is incremented by 1 and the counter of the first sequence is reset to zero.
2. The method for adaptive decoding of MIPI APHY cable polarity according to claim 1, characterized in that: If the first sequence or the second sequence is not detected in the received code stream, the data format of the current analog circuit is maintained for processing.
Citation Information
Patent Citations
A high-voltage frequency converter optical signal loop test method and system
CN109842441A
DP interface chip, high-definition video receiving chip and electronic equipment
CN112714270A