Search

CN-121984652-A - Baud rate detection method, baud rate detection device, electronic equipment and storage medium

CN121984652ACN 121984652 ACN121984652 ACN 121984652ACN-121984652-A

Abstract

The present disclosure provides a baud rate detection method, a device, an electronic apparatus and a storage medium, wherein the method includes taking a time difference between a first pulse falling edge and a first pulse rising edge in a received signal as a real-time bit time, and determining whether the time difference between two adjacent pulse edges and the real-time bit time meet a preset condition from the first pulse rising edge; when the time difference between the ith and the (i+1) th pulse edges and the real-time bit time meet the preset condition, updating the real-time bit time based on the time difference between the ith and the (i+1) th pulse edges and the first pulse falling edge until the time difference between the fifth pulse falling edge and the fifth pulse rising edge and the real-time bit time meet the preset condition, and when the time for maintaining the high level of the received signal after the fifth pulse rising edge exceeds the real-time bit time, determining that the current data frame is a SYNC sequence and determining the baud rate. The method can improve the success rate of SYNC sequence detection and improve the precision of the baud rate.

Inventors

  • DING FUJIAN
  • CHEN LIANG

Assignees

  • 珠海楠欣半导体科技有限公司

Dates

Publication Date
20260505
Application Date
20260121

Claims (10)

  1. 1. A baud rate detection method, comprising: acquiring a received signal, and taking the time difference between the falling edge of the first pulse and the rising edge of the first pulse in the received signal as real-time bit time; Starting from the first pulse rising edge, determining whether the time difference between two adjacent pulse edges in the received signal and the real-time bit time meet a preset condition; When the time difference between the ith pulse edge and the (i+1) th pulse edge in the received signal and the real-time bit time meet the preset condition, updating the real-time bit time based on the time difference between the (i+1) th pulse edge and the first pulse falling edge until the time difference between the fifth pulse falling edge and the fifth pulse rising edge in the received signal and the real-time bit time meet the preset condition, wherein i is more than or equal to 2 and less than or equal to 8; detecting a time during which the received signal remains high after the fifth pulse rising edge; And when the time for which the received signal maintains the high level after the fifth pulse rising edge exceeds the real-time bit time, determining that the current data frame is a synchronous SYNC sequence, and determining the baud rate based on the real-time bit time.
  2. 2. The method of claim 1, wherein the updating the real-time bit time based on the time difference between the i+1th pulse edge and the first pulse falling edge comprises: determining an average bit time of a first i bits in the received signal based on a time difference between the i+1th pulse edge and the first pulse falling edge; And updating the real-time bit time to be the average bit time of the first i bits.
  3. 3. The method of claim 1, wherein i is 2, 4 or 8; before updating the real-time bit time based on the time difference between the i+1th pulse edge and the first pulse falling edge, the method further comprises: When the time difference between the two adjacent pulse edges and the real-time bit time meet the preset condition, determining that all bits between the next pulse edge in the two adjacent pulse edges and the first pulse falling edge are partial continuous bits from a start bit in the SYNC sequence; Determining whether the two adjacent pulse edges are the ith pulse edge and the (i+1) th pulse edge.
  4. 4. A method according to claim 3, wherein the time difference between the i+1th pulse edge and the first pulse falling edge is stored in a time register; said determining an average bit time of a first i bits in said received signal based on a time difference between said i+1th pulse edge and said first pulse falling edge comprises: And when the (i+1) th pulse edge is detected, shifting the time difference between the (i+1) th pulse edge and the first pulse falling edge stored in the time register by i bits to the right so as to obtain the average bit time of the first i bits.
  5. 5. The method of claim 1, wherein the predetermined condition is that a difference between the time difference between the adjacent two pulse edges and the real-time bit time is less than or equal to one eighth of the real-time bit time.
  6. 6. The method according to any one of claims 1-5, further comprising: when the time difference between the two adjacent pulse edges and the real-time bit time do not meet the preset condition, determining that the current data frame is a non-SYNC sequence; Detecting a level change of the received signal after a subsequent one of the two adjacent pulse edges; And re-acquiring the received signal when the time for which the received signal maintains the high level after the last pulse edge of the two adjacent pulse edges exceeds a preset time, wherein the preset time is M times of the time difference between the first pulse falling edge and the first pulse rising edge, and M is an integer greater than or equal to 10.
  7. 7. The method according to any one of claims 1-5, further comprising: Determining that the current data frame is a non-SYNC sequence when the time for which the received signal maintains a high level after the fifth pulse rising edge does not exceed the real-time bit time; detecting a level change of the received signal after the fifth pulse rising edge; And re-acquiring the received signal when the time for which the received signal maintains the high level after the rising edge of the fifth pulse exceeds a preset time, wherein the preset time is M times of the time difference between the falling edge of the first pulse and the rising edge of the first pulse, and M is an integer greater than or equal to 10.
  8. 8. A baud rate detection device, comprising: The acquisition module is used for acquiring the received signals; The device comprises a determining module, a determining module and a receiving module, wherein the determining module is used for taking the time difference between the first pulse falling edge and the first pulse rising edge in the received signal as real-time bit time; An updating module, configured to update the real-time bit time based on a time difference between the i+1th pulse edge and the first pulse falling edge when the time difference between the i+1th pulse edge and the real-time bit time in the received signal meets the preset condition, until a time difference between a fifth pulse falling edge and a fifth pulse rising edge in the received signal and the real-time bit time meet the preset condition, where i is greater than or equal to 2 and less than or equal to 8; a detection module for detecting a time for which the received signal maintains a high level after the rising edge of the fifth pulse; The determining module is further configured to determine that a current data frame is a synchronization SYNC sequence when a time for which the received signal maintains a high level after the fifth pulse rising edge exceeds the real-time bit time, and determine a baud rate based on the real-time bit time.
  9. 9. An electronic device comprising a processor for executing a computer program stored in a memory, which when executed by the processor carries out the steps of the method according to any of claims 1-7.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-7.

Description

Baud rate detection method, baud rate detection device, electronic equipment and storage medium Technical Field Embodiments of the present disclosure relate to the field of communications technologies, and in particular, to a baud rate detection method, a baud rate detection device, an electronic device, and a storage medium. Background The baud rate detection method of universal asynchronous receiver/Transmitter (UART)/local interconnect network (Local Interconnect Network, LIN) communication is generally based on Synchronous (SYNC) sequence detection, such as a 0x55 sequence, by identifying the time length of the sequence and the sampled sequence value to determine whether the received data frame is a correct SYNC sequence and its corresponding baud rate. The current baud rate detection scheme is mostly based on single bit (bit) time or 8bit time, and when pulse width time jitter occurs to the following or currently received bit, the baud rate calculation of the single bit time can cause receiving errors and poor robustness. For the baud rate calculation of 8bit time, the average bit time of the whole SYNC sequence can be counted, the baud rate error caused by pulse width jitter can be avoided to a certain extent, but the baud rate cannot be tracked in real time, and the detection failure of the SYNC sequence can be caused. Disclosure of Invention The embodiment of the disclosure provides a baud rate detection method, a baud rate detection device, electronic equipment and a storage medium, which can improve the success rate of SYNC sequence detection and improve the precision of the baud rate. In a first aspect, the present disclosure provides a baud rate detection method, including: the method comprises the steps of obtaining a receiving signal, taking the time difference between the first pulse falling edge and the first pulse rising edge in the receiving signal as real-time bit time, and determining whether the time difference between two adjacent pulse edges in the receiving signal and the real-time bit time meet preset conditions or not from the beginning of the first pulse rising edge; When the time difference between the ith pulse edge and the (i+1) th pulse edge in the received signal and the real-time bit time meet the preset condition, updating the real-time bit time based on the time difference between the (i+1) th pulse edge and the first pulse falling edge until the time difference between the fifth pulse falling edge and the fifth pulse rising edge in the received signal and the real-time bit time meet the preset condition, wherein i is more than or equal to 2 and less than or equal to 8; and when the time for which the receiving signal maintains the high level after the rising edge of the fifth pulse exceeds the real-time bit time, determining that the current data frame is a synchronous SYNC sequence and determining the baud rate based on the real-time bit time. In some embodiments of the present disclosure, the updating the real-time bit time based on the time difference between the i+1th pulse edge and the first pulse falling edge includes determining an average bit time of a first i bit in the received signal based on the time difference between the i+1th pulse edge and the first pulse falling edge, and updating the real-time bit time to the average bit time of the first i bit. In some embodiments of the present disclosure, i is 2, 4, or 8. The method further comprises the steps of determining that all bits between the next pulse edge of the two adjacent pulse edges and the first pulse falling edge are partial continuous bits from a start bit in the SYNC sequence when the time difference between the two adjacent pulse edges and the real-time bit time meet the preset condition and determining whether the two adjacent pulse edges are the ith pulse edge and the (i+1) th pulse edge or not based on the time difference between the (i+1) th pulse edge and the first pulse falling edge. In some embodiments of the present disclosure, the time difference between the i+1th pulse edge and the first pulse falling edge is stored in a time register. The determining the average bit time of the first i bits in the received signal based on the time difference between the i+1th pulse edge and the first pulse falling edge includes right shifting the time difference between the i+1th pulse edge and the first pulse falling edge stored in the time register by i bits when the i+1th pulse edge is detected, so as to obtain the average bit time of the first i bits. In some embodiments of the present disclosure, the preset condition is that a difference between the time difference between the adjacent two pulse edges and the real-time bit time is less than or equal to one eighth of the real-time bit time. In some embodiments of the present disclosure, the baud rate detection method further comprises: The method comprises the steps of determining that a current data frame is a non-SYNC sequence when a time differenc