CN117857402A - Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment - Google Patents

Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment Download PDF

Info

Publication number
CN117857402A
CN117857402A CN202410169128.4A CN202410169128A CN117857402A CN 117857402 A CN117857402 A CN 117857402A CN 202410169128 A CN202410169128 A CN 202410169128A CN 117857402 A CN117857402 A CN 117857402A
Authority
CN
China
Prior art keywords
baud rate
interval
automatic
test signal
interval duration
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
Application number
CN202410169128.4A
Other languages
Chinese (zh)
Inventor
刘彧
付江平
钱刚
胡天豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lingkong Microelectronics Shenzhen Co ltd
Original Assignee
Lingkong Microelectronics Shenzhen Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lingkong Microelectronics Shenzhen Co ltd filed Critical Lingkong Microelectronics Shenzhen Co ltd
Priority to CN202410169128.4A priority Critical patent/CN117857402A/en
Publication of CN117857402A publication Critical patent/CN117857402A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention relates to the technical field of communication, and particularly discloses an automatic baud rate detection method, a configuration method, a device and electronic equipment, wherein the automatic baud rate detection method comprises the following steps: receiving a test signal, wherein the test signal is an alternate cycle data signal; counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations; calculating and acquiring an interval duration average value according to the interval duration, and calculating the baud rate according to the interval duration average value; according to the automatic baud rate detection method, a test signal based on an alternating cycle data signal is used as a detection object, and an interval duration mean value capable of representing data transmission efficiency is obtained according to a rising edge interval or a falling edge interval or an edge interval of the test signal, so that the baud rate is determined, the accurate automatic detection of the baud rate can be realized for the object which correspondingly receives the test signal, the smooth data communication is ensured, and the detection process is convenient, simple and high in detection efficiency.

Description

Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an automatic baud rate detection method, an automatic baud rate configuration device, and an electronic device.
Background
In asynchronous serial communication (UART), the baud rate is an important parameter, and normal communication can be performed only when the baud rates of the upper and lower computers are identical, where the baud rate refers to the number of baud bits that can be transmitted per second through the serial port.
The existing automatic baud rate detection process generally needs to carry out verification adjustment based on operation logic analysis preset by software or initialization baud rate value setting so as to detect and acquire the value of the baud rate, and has the defects of complicated detection and low detection efficiency.
In view of the above problems, no effective technical solution is currently available.
Disclosure of Invention
The purpose of the application is to provide an automatic baud rate detection method, an automatic baud rate configuration method, an automatic baud rate detection device and electronic equipment, so that the baud rate detection process is simplified, and the baud rate detection efficiency is improved.
In a first aspect, the present application provides an automatic baud rate detection method, including the steps of:
receiving a test signal, wherein the test signal is an alternate cycle data signal;
counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations;
and calculating and acquiring an interval duration average value according to the interval duration, and calculating the baud rate according to the interval duration average value.
According to the automatic baud rate detection method, the test signal expressed as the alternate circulation data signal is used as the detection object, the interval duration mean value capable of representing the data transmission efficiency is obtained according to the rising edge interval or the falling edge interval or the edge interval of the test signal, so that the baud rate is determined, the accurate automatic detection of the baud rate can be realized for the object correspondingly receiving the test signal, the smooth data communication is ensured, and the detection process is convenient, simple and high in detection efficiency.
The automatic baud rate detection method comprises the step of calculating and obtaining an interval duration average value according to the interval duration, wherein the step is executed when the number of edges, the number of rising edges, the number of falling edges or the number of interval durations of a received test signal reaches a preset number.
In this example, the step of calculating the mean value of the interval duration needs to be performed with ensuring that there are enough interval durations available for calculating an accurate mean value of the interval duration.
In the automatic baud rate detection method, the preset number is 5-10.
The automatic baud rate detection method, wherein the test signal is a 0x55 signal.
The automatic baud rate detection method, wherein the interval duration includes a high level duration and a low level duration, and the step of counting rising edge intervals or falling edge intervals or edge intervals in the received test signal to obtain a plurality of interval durations includes:
counting edge intervals of the received test signal based on rising edges and falling edges of the received test signal to obtain a plurality of high level durations and a plurality of low level durations.
The automatic baud rate detection method, wherein the steps of calculating and obtaining an interval duration mean value according to the interval duration, and calculating the baud rate according to the interval duration mean value include:
and respectively calculating a high-level time length average value and a low-level time length average value according to the high-level time lengths and the low-level time lengths, and calculating the baud rate according to the high-level time length average value and the low-level time length average value.
In a second aspect, the present application further provides an automatic baud rate configuration method, where the automatic baud rate configuration method includes the following steps:
detecting and acquiring the baud rate based on the automatic baud rate detection method as provided in the first aspect;
writing the baud rate into a baud rate register.
The automatic baud rate configuration method can rapidly and accurately detect the baud rate based on the automatic baud rate detection method provided by the first aspect, and the baud rate is written into the baud rate register based on the baud rate to realize the baud rate configuration, so that the corresponding lower computer can normally communicate with the upper computer to correctly receive communication data.
The automatic baud rate configuration method, wherein the step of writing the baud rate into a baud rate register comprises:
splitting the baud rate into integer information and fractional information based on a latch;
and writing the integer information and the decimal information into the baud rate register in turn.
According to the automatic baud rate detection method, the detection precision is improved to a plurality of decimal value levels, and the integer register space and the decimal register space for registering integer information and decimal information are divided in the baud rate register, so that the integer information and the decimal information which are split by the latch based on the baud rate are respectively registered, the baud rate of the chip can be configured based on the data which contain a plurality of decimal and are registered and configured in the baud rate register, and the baud rate configuration precision is improved.
In a third aspect, the present application further provides an automatic baud rate detection device, the device comprising:
the receiving module is used for receiving a test signal, wherein the test signal is an alternate cycle data signal;
the counting module is used for counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations;
the calculation module is used for calculating and obtaining an interval duration mean value according to the interval duration, and calculating the baud rate according to the interval duration mean value.
According to the automatic baud rate detection device, the test signal based on the alternating cycle data signal is used as a detection object, the interval duration mean value capable of representing the data transmission efficiency is obtained according to the rising edge interval or the falling edge interval or the edge interval of the test signal, so that the baud rate is determined, the accurate automatic detection of the baud rate can be realized for the object corresponding to the test signal, the smooth data communication is ensured, and the detection process is convenient, simple and high in detection efficiency.
In a fourth aspect, the present application also provides an electronic device comprising a processor and a memory storing computer readable instructions which, when executed by the processor, perform the steps of the method as provided in the first or second aspects above.
As can be seen from the foregoing, the present application provides an automatic baud rate detection method, a configuration method, an apparatus, and an electronic device, where the automatic baud rate detection method uses a test signal based on an alternating cycle data signal as a detection object, and obtains an interval duration average value capable of characterizing data transmission efficiency according to a rising edge interval or a falling edge interval or an edge interval of the test signal, so as to determine a baud rate, so that an object corresponding to receive the test signal can implement accurate automatic detection of a baud rate, so as to ensure smooth data communication, and the detection process is convenient and simple, and has high detection efficiency.
Drawings
Fig. 1 is a flowchart of an automatic baud rate detection method according to an embodiment of the present application.
Fig. 2 is a flowchart of an automatic baud rate configuration method according to an embodiment of the present application.
Fig. 3 is a flowchart of an automatic baud rate detection device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Reference numerals: 201. a receiving module; 202. a counting module; 203. a computing module; 301. a processor; 302. a memory; 303. a communication bus.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
In a first aspect, referring to fig. 1, some embodiments of the present application provide an automatic baud rate detection method, the automatic baud rate detection method includes the following steps:
s1, receiving a test signal, wherein the test signal is an alternate cycle data signal;
s2, counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations;
s3, calculating and obtaining an interval duration mean value according to the interval duration, and calculating the baud rate according to the interval duration mean value.
Specifically, the alternate cycle data signal is data of a plurality of 0 and a plurality of 1 alternate cycles, such as 010101010101,001100110011, 000111000111, and the number of elements of alternate 1 and 0 may be the same or different.
More specifically, the test signal is a signal which is sent by the upper computer and accords with the data characteristics, and the automatic baud rate detection method in the embodiment of the application is used for detecting the baud rate of the test signal so that the corresponding lower computer receiving the test signal can configure the corresponding baud rate value to ensure smooth data communication.
More specifically, in the test signal, the high level signal represents data 1, the low level signal represents data 0, the data alternating from 0 to 1 generates a rising edge, the data alternating from 1 to 0 generates a falling edge, and no edge is generated between the continuous data 0 or the continuous data 1; thus, the interval duration of one rising edge interval and the interval duration of one falling edge each represent the duration of one cycle of transmitting the alternating cyclical data signal, such as the 01 duration in transmitting 010101010101, i.e., the duration of one cycle of the alternating cyclical data signal; the interval duration of the edge interval then represents the interval duration of each numerical transition in transmitting an alternating cyclical data signal, such as the duration of 00 or 11 in transmitting 001100110011, i.e., the duration of one continuous high level or one continuous level; the interval duration of the categories can reflect the data transmission rate, and the specific composition of the alternate cycle data signals can be combined to convert the transmission efficiency of single data, so that the method can be used for calculating the baud rate.
More specifically, the average value of the interval duration acquired in the step S3 can reflect the average transmission efficiency of the data, so that the automatic baud rate detection method in the embodiment of the application detects the acquired baud rate more accurately.
More specifically, the interval duration and the average value of the interval duration are both count data measured with an objective time reference, and the unit of the interval duration and the average value of the interval duration may be time or clock number.
More specifically, based on the foregoing, the interval duration average value reflects the transmission efficiency of the data sent by the upper computer, and since the baud rate refers to the number of bits transmitted in a unit time in data transmission, the baud rate can be conveniently and accurately calculated by combining the interval duration average value, the unit type thereof and the data composition characteristics of the alternating cyclic data signals.
According to the automatic baud rate detection method, the test signal expressed as the alternate circulation data signal is used as the detection object, the interval duration average value capable of representing the data transmission efficiency is obtained according to the rising edge interval or the falling edge interval or the edge interval of the test signal, so that the baud rate is determined, the object corresponding to the test signal can realize accurate automatic detection of the baud rate, the smooth data communication is ensured, and the detection process is convenient, simple and high in detection efficiency.
In some preferred embodiments, the step of calculating the average value of the interval duration according to the interval duration is performed when the number of edges or the number of rising edges or the number of falling edges or the number of interval durations of the received test signal reaches a preset number.
Specifically, too few acquired interval durations may cause a large deviation in the calculation of the acquired interval duration average value in step S3, and thus, step S3 needs to be performed while ensuring that there are enough interval durations available for calculating an accurate interval duration average value.
More specifically, in this embodiment, the number of edges or the number of rising edges or the number of falling edges also determines the number of acquisition interval durations, so it can be determined whether a sufficient number of interval durations are acquired to trigger execution of step S3 based on whether the data reaches the preset number.
In some preferred embodiments, the predetermined number is 5-10.
Specifically, in the embodiment of the present application, the number of edges or the number of rising edges or the number of falling edges also determines the number of interval durations acquired in step S2, and if the preset number is too small, the average value of the interval durations acquired in step S3 may have a larger deviation, and if the automatic baud rate detection method in the embodiment of the present application is applied to perform baud rate automatic matching in data communication, the preset number is too many and affects the communication efficiency, and the preset number needs to be set by two factors of comprehensive detection precision and detection efficiency, so that 5 to 10 are preferred.
More specifically, the transmission rate of the test signal is relatively stable without considering the extreme communication environment, and therefore, in the embodiment of the present application, the preset number is preferably 5.
In some preferred embodiments, the test signal is a 0x55 signal.
Specifically, the 0x55 signal is the 01010101 signal, and the data 0 and 1 can be alternately generated in sequence to generate the rising edge and the falling edge rapidly, so that the acquisition speed of the interval duration is effectively improved, and the baud rate calculation speed is improved.
It should be noted that, in this embodiment, if the data length required for calculating the average value of the interval duration is greater than the length of one 0x55 signal, the test signal received in step S1 is a 0x55 signal continuously transmitted based on the upper computer.
In some preferred embodiments, the interval duration includes a high level duration and a low level duration, and the step of counting rising edge intervals or falling edge intervals or edge intervals in the received test signal to obtain a plurality of interval durations includes:
s21, counting the edge intervals of the received test signal based on the rising edge and the falling edge of the received test signal to obtain a plurality of high-level durations and a plurality of low-level durations.
Specifically, this embodiment essentially belongs to counting based on an edge interval to obtain an interval duration, and this processing manner can effectively reduce the length required by the received data compared with a manner of counting based on a rising edge interval or a falling edge interval, so as to effectively improve the detection efficiency, while the chip operation process generally uses only one type of edge (rising edge) as a trigger signal to perform one type of operation, so that the automatic baud rate detection method in this embodiment divides the interval duration into a high level duration and a low level duration, and then triggers counting based on alternately generated rising edges and falling edges to respectively calculate and obtain the high level duration and the low level duration; based on the foregoing, it can be known that the units of the high level duration and the low level duration as the interval duration may be time or clock count, in this embodiment, the clock count is preferred, that is, the operation process of counting the edge interval of the received test signal is to count the corresponding high level duration or low level duration based on the clock frequency, so as to obtain the corresponding continuous clock count, so the process of counting and obtaining the high level duration and the low level duration is performed based on counting the counter (counter), when the received test signal occurs, the counter count value is triggered to obtain the counter count value and reset and then re-counts, wherein when the edge is a rising edge, the counter count value of the counter is latched into the low level duration latch table, and when the edge is a falling edge, the count value of the counter is latched into the high level duration latch table, and these count values represent the corresponding high level duration and low level duration, and when the count value in the latch table reaches the preset number or the edge number triggering the reset of the counter reaches the preset value, the automatic specific detection method of this embodiment is based on the average value of the count value and the count value of the count value in the high level latch interval duration latch table.
More specifically, in this embodiment, the count value of the counter is written into the low-level duration latch table and the high-level duration latch table alternately, and the data of the two latch tables do not interfere with each other and are written alternately, so that the use time of the latch tables is effectively staggered, and the data writing blockage is not caused.
In some preferred embodiments, the step of calculating an average value of the interval duration from the interval duration, and calculating the baud rate from the average value of the interval duration includes:
and respectively calculating a high-level time length average value and a low-level time length average value according to the high-level time lengths and the low-level time lengths, and calculating the baud rate according to the high-level time length average value and the low-level time length average value.
Specifically, the number of count values in the low-level duration latch table and the high-level duration latch table may be the same or different (for example, the number of count values in the low-level duration latch table is one more than the number of count values in the high-level duration latch table), and in the case of different values, in order to improve accuracy of interval duration mean calculation, the automatic baud rate detection method in the embodiment of the present application calculates a high-level duration mean value and a low-level duration mean value first, and then calculates an interval duration mean value based on the high-level duration mean value and the low-level duration mean value.
More specifically, the interval duration average value is defined as c, and c= (a+b)/2, where a is a high-level duration average value and b is a low-level duration average value.
More specifically, in the embodiment where the unit of the interval duration average is the number of clocks and the test signal is 0x55, the interval duration average represents the transmission duration of one data, so the baud rate calculation formula is: bd=clk/c, where Bd is the baud rate and CLK is the clock frequency; in an embodiment where the average value of the interval duration is in time and the test signal is 0x55, the baud rate calculation formula is: bd=1/c.
In a second aspect, referring to fig. 2, some embodiments of the present application further provide an automatic baud rate configuration method, where the automatic baud rate configuration method includes the following steps:
a1, detecting and acquiring the baud rate based on the automatic baud rate detection method provided by the first aspect;
a2, writing the baud rate into a baud rate register.
Specifically, the baud rate register is a configuration register for configuring the baud rate, and belongs to a device for storing configuration information in a lower computer (which may be a controller such as an MCU) that correspondingly receives the above-mentioned test signal.
The automatic baud rate configuration method according to the embodiment of the present application can quickly and accurately detect the baud rate based on the automatic baud rate detection method provided in the first aspect, and write the baud rate into the baud rate register based on the baud rate to implement baud rate configuration, so that the corresponding lower computer can normally communicate with the upper computer to correctly receive communication data.
In some preferred embodiments, the step of writing the baud rate to the baud rate register comprises:
splitting the baud rate into integer information and decimal information based on the latches;
and sequentially writing the integer information and the decimal information into the baud rate register.
Specifically, the detection precision of the automatic baud rate detection method in the embodiment of the application is improved to a plurality of decimal value levels, and an integer register space and a decimal register space for registering integer information and decimal information are divided in the baud rate register to respectively register the integer information and the decimal information which are split by the latch based on the baud rate, so that the chip can configure the baud rate based on the data which contains a plurality of decimal and is configured in the baud rate register, the baud rate configuration precision is improved, and the corresponding chip (lower computer) can correctly receive communication data.
The number of bits of the fractional part of the baud rate obtained in step A1 is greater than or equal to the number of bits of the fractional information, and the number of bits of the fractional information is equal to the number of bits of the fractional register space for registering the fractional information in the baud rate register.
More specifically, in this embodiment, the register can configure the decimal information of an appropriate number of digits according to the division of the register space of the baud rate register to effectively utilize the register capacity of the baud rate register to improve the baud rate configuration accuracy.
In some preferred embodiments, the integer information is registered based on 15 bits of data and the decimal information is registered based on 7 bits of data.
Specifically, in this embodiment, the baud rate register is configured with [31:0] data addresses for baud rate registration, where [31:7] is used to register integer information and [6:0] is used to register decimal information.
In a third aspect, referring to fig. 3, some embodiments of the present application further provide an automatic baud rate detection apparatus, where the apparatus includes:
a receiving module 201, configured to receive a test signal, where the test signal is an alternate cycle data signal;
a counting module 202, configured to count rising edge intervals or falling edge intervals or edge intervals in the received test signal to obtain a plurality of interval durations;
the calculating module 203 is configured to calculate and obtain an interval duration average value according to the interval duration, and calculate the baud rate according to the interval duration average value.
According to the automatic baud rate detection device, the test signal based on the alternating cycle data signal is used as the detection object, the interval duration mean value capable of representing the data transmission efficiency is obtained according to the rising edge interval or the falling edge interval or the edge interval of the test signal, so that the baud rate is determined, the accurate automatic detection of the baud rate can be realized for the object corresponding to the test signal, the smooth data communication is guaranteed, the detection process is convenient and simple, and the detection efficiency is high.
In some preferred embodiments, the automatic baud rate detection device of the embodiments of the present application is preferably configured to perform the automatic baud rate detection method provided in the first aspect above.
In a fourth aspect, referring to fig. 4, some embodiments of the present application further provide a schematic structural diagram of an electronic device, where the electronic device includes: processor 301 and memory 302, the processor 301 and memory 302 being interconnected and in communication with each other by a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing computer readable instructions executable by the processor 301, which when executed by an electronic device, the processor 301 executes to perform the method in any of the alternative implementations of the embodiments described above.
In summary, the embodiment of the application provides an automatic baud rate detection method, a configuration method, a device and an electronic device, wherein the automatic baud rate detection method in the embodiment of the application takes a test signal based on an alternating cycle data signal as a detection object, and obtains an interval duration average value capable of representing data transmission efficiency according to a rising edge interval or a falling edge interval or an edge interval of the test signal, so that the baud rate is determined, and an object corresponding to the test signal can realize accurate automatic detection of the baud rate, so that smooth data communication is ensured, and the detection process is convenient, simple and high in detection efficiency.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or 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 through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. An automatic baud rate detection method, characterized in that the automatic baud rate detection method comprises the following steps:
receiving a test signal, wherein the test signal is an alternate cycle data signal;
counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations;
and calculating and acquiring an interval duration average value according to the interval duration, and calculating the baud rate according to the interval duration average value.
2. The automatic baud rate detection method according to claim 1, wherein said step of calculating an average value of interval duration according to said interval duration is performed when the number of edges, the number of rising edges, the number of falling edges, or the number of interval durations of the received test signal reaches a preset number.
3. The automatic baud rate detection method according to claim 2, wherein said preset number is 5-10.
4. The method of claim 1, wherein the test signal is a 0x55 signal.
5. The automatic baud rate detection method according to claim 1, wherein said interval period includes a high level period and a low level period, and said step of counting rising edge intervals or falling edge intervals or edge intervals in said received test signal to obtain a plurality of interval periods includes:
counting edge intervals of the received test signal based on rising edges and falling edges of the received test signal to obtain a plurality of high level durations and a plurality of low level durations.
6. The automatic baud rate detection method according to claim 5, wherein said step of calculating an interval duration average value according to said interval duration, and calculating a baud rate according to said interval duration average value comprises:
and respectively calculating a high-level time length average value and a low-level time length average value according to the high-level time lengths and the low-level time lengths, and calculating the baud rate according to the high-level time length average value and the low-level time length average value.
7. An automatic baud rate configuration method, characterized in that the automatic baud rate configuration method comprises the following steps:
detecting acquisition of the baud rate based on the automatic baud rate detection method according to any one of claims 1-6;
writing the baud rate into a baud rate register.
8. The automatic baud rate configuration method according to claim 7, wherein said step of writing said baud rate into a baud rate register comprises:
splitting the baud rate into integer information and fractional information based on a latch;
and writing the integer information and the decimal information into the baud rate register in turn.
9. An automatic baud rate detection device, the device comprising:
the receiving module is used for receiving a test signal, wherein the test signal is an alternate cycle data signal;
the counting module is used for counting rising edge intervals or falling edge intervals or edge intervals in the received test signals to obtain a plurality of interval durations;
the calculation module is used for calculating and obtaining an interval duration mean value according to the interval duration, and calculating the baud rate according to the interval duration mean value.
10. An electronic device comprising a processor and a memory storing computer readable instructions that, when executed by the processor, perform the steps in the method of any of claims 1-8.
CN202410169128.4A 2024-02-06 2024-02-06 Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment Pending CN117857402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410169128.4A CN117857402A (en) 2024-02-06 2024-02-06 Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410169128.4A CN117857402A (en) 2024-02-06 2024-02-06 Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117857402A true CN117857402A (en) 2024-04-09

Family

ID=90542146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410169128.4A Pending CN117857402A (en) 2024-02-06 2024-02-06 Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117857402A (en)

Similar Documents

Publication Publication Date Title
US6816809B2 (en) Hardware based utilization metering
CN106294040B (en) Method and device for acquiring optical module state information
CN101520640A (en) Time interval measuring instrument based on FPGA
CN109921915B (en) Method and device for testing wake-up function of real-time clock module and electronic equipment
CN102187578A (en) Methods, algorithms, circuits, and systems for determining a reference clock frequency and/or locking a loop oscillator
CN216748451U (en) High-precision time service precision measurement system
CN112069098B (en) Baud rate identification method and device
CN1298105A (en) Network analytical instrument, network analytical method and recording media
CN200993665Y (en) Small digitalized prase-comparing measuring device
US11809350B2 (en) Serial interrupt method, device, serial interrupt processing method, and processor
CN109684517B (en) Historical data storage method, reading and writing method, storage device and equipment
CN101809523A (en) Data-processing system and data-processing method
CN117857402A (en) Automatic baud rate detection method, automatic baud rate configuration method, automatic baud rate detection device and electronic equipment
CN201331680Y (en) Time interval measuring instrument based on FPGA
CN101145863B (en) Device and method for detecting system frame header deviation
US5734876A (en) Analyzer for capturing elapsed time values if predetermined conditions have occurred or capturing maximum time value upon counter rollover if predetermined conditions have not occurred
US5815690A (en) Deglitch method and apparatus to assure valid data sampling
CN109698696B (en) Clock frequency division method, device, system on chip and storage medium
CN101141227B (en) Error code testing device
CN1323337C (en) Method and circuit for conducting real time test for single chip clock shaking
CN109256998A (en) Control the method and system and servo motor of current of electric sampling with high precision
US5649123A (en) GPIB system with improved parallel poll response detection
CN109428771B (en) Method and device for detecting performance of high-speed peripheral component interconnection message
CN113032305B (en) Interface interrupt measurement method and device
CN114095300A (en) Adaptive rate data read-write method and device

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