Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for calibrating a clock using uart communication

A clock and communication technology, applied in the computer and communication fields, can solve problems such as increased cost, abnormal baud rate of UART communication, failure to apply, etc., and achieve the normal effect

Active Publication Date: 2019-02-12
HANGZHOU SYNOCHIP DATA SECURITY TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The method proposed in Patent No. 200710124118 must be applied with a standard pulse signal from the outside, which requires that a high-precision clock source such as a crystal oscillator must be used to generate an additional standard pulse signal from the other party in the communication, which requires additional cost Or increase the interface signal; the method proposed by the patent number 201010622250 must be based on the application of USB connection, and cannot be applied to the application with only UART communication
[0005] When the MCU uses the on-chip oscillator as the system clock source in UART-based communication applications, the output clock frequency deviation is caused by the internal oscillator being affected by factors such as production process, temperature, and voltage, resulting in abnormal UART communication baud rate.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for calibrating a clock using uart communication
  • A method and device for calibrating a clock using uart communication

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] The present invention will be further described below in conjunction with the accompanying drawings.

[0036] refer to figure 1 and figure 2 , a kind of method utilizing UART communication calibration clock, comprises the steps:

[0037] Step 01: Detect the falling edge signal of UART RXD, if the falling edge is detected, execute step 2 to start the automatic calibration process;

[0038] Step 02: Start the counter to count the output clock of the internal oscillator;

[0039] Step 03: Wait for the UART RXD signal to become high, and check whether it is timed out at the same time. If the UART RXD does not become high and does not time out, continue to wait until the UART RXD becomes high or timeout, and then perform step 04;

[0040] Step 04: Determine whether it is timed out, if it is timed out, exit the automatic calibration process, and execute step 01 again; if it does not time out, execute step 05;

[0041] Step 05: Obtain the counter value, which is M;

[00...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for calibrating a clock by utilizing UART communication. The method is characterized in that, by utilizing a feature that each frame of data of a UART at least comprises one logic "0", and when the UART is idle, the UART is always in a logic "1" state, and by carrying out counting on the width of the logic "0" of reception signals connected to the UART, carrying out calculation and making a comparison between the counting values and preset Baud rate, calibration of the clock is realized. The invention provides a device for calibrating the clock by utilizing UART communication. The device comprises a signal filter, a pulse width detector, an internal oscillator, an every-bit pulse width calculator, a deviation computer and a calibration counter. The provided method and device for calibrating the clock by utilizing UART communication effectively realize calibration of the clock oscillator in an MCU, thereby ensuring normal communication of the UART.

Description

technical field [0001] The invention relates to the fields of computer and communication, in particular to a method and device for calibrating a clock. Background technique [0002] UART (Universal Asynchronous Receiver Transmitter) is an asynchronous serial communication bus. The data frame starts with the start bit, followed by the lowest bit LSB of the data. The data length can be 5~8 data bits, and 1 bit after the end of the data An optional parity bit and finally a stop bit. When the bus is idle, it is in a logic "1" state, the start bit is always a logic "0", and the stop bit is always a logic "1". The sending and receiving sides of the UART perform asynchronous sampling according to the agreed baud rate. The baud rate refers to the number of bits transmitted per second, which essentially gives the time taken by each bit of data during UART communication. [0003] With the development of analog-digital hybrid design technology, most MCUs have internal clock oscillato...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H03L7/02H03L7/24G06F1/04
CPCG06F1/04H03L7/02H03L7/24
Inventor 钱志恒
Owner HANGZHOU SYNOCHIP DATA SECURITY TECH CO LTD