CN115801217B - Clock phase determining method and device and near field communication device - Google Patents

Clock phase determining method and device and near field communication device Download PDF

Info

Publication number
CN115801217B
CN115801217B CN202310032251.7A CN202310032251A CN115801217B CN 115801217 B CN115801217 B CN 115801217B CN 202310032251 A CN202310032251 A CN 202310032251A CN 115801217 B CN115801217 B CN 115801217B
Authority
CN
China
Prior art keywords
phase
near field
field communication
noise
comparator
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.)
Active
Application number
CN202310032251.7A
Other languages
Chinese (zh)
Other versions
CN115801217A (en
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.)
Beijing Unigroup Tsingteng Microsystems Co Ltd
Original Assignee
Beijing Unigroup Tsingteng Microsystems 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 Beijing Unigroup Tsingteng Microsystems Co Ltd filed Critical Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority to CN202310032251.7A priority Critical patent/CN115801217B/en
Publication of CN115801217A publication Critical patent/CN115801217A/en
Application granted granted Critical
Publication of CN115801217B publication Critical patent/CN115801217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The application relates to the technical field of near field communication and discloses a clock phase determining method. The method is based on an initial phase after the hardware phase inversion of the near field communication device, a phase set is obtained by multiple increment, and a target phase meeting the preset noise requirement is selected from the phase set to serve as a clock phase of a sampling clock of the near field communication device. Compared with the initial phase after the phase inversion of the hardware, the noise of the selected target phase is smaller, so that the target phase is closer to the phase of an ideal clock, the consistency of the sampling clock of the near field communication device and the transmitting clock of the near field communication card is effectively improved, and the sampling accuracy of the near field communication device is improved. The application also discloses a clock phase determining device and a near field communication device.

Description

Clock phase determining method and device and near field communication device
Technical Field
The present invention relates to the field of near field communication technologies, and for example, to a clock phase determining method and device, and a near field communication device.
Background
NFC (Near Field Communication ) is a contactless identification and interconnection technology that enables near field wireless communication between mobile devices, consumer electronics, PCs, and smart control tools. NFC provides a simple, touch-based solution that allows consumers to exchange information, access content and services simply and intuitively.
NFC information is transferred by electromagnetic inductive coupling in the radio frequency portion of the spectrum. NFC devices are typically composed of an NFC module and an NFC antenna. The NFC antenna can be regarded as a coupling coil, and the reader-writer antenna generates a magnetic field to be coupled to the NFC card antenna to generate voltage energy to start the NFC chip, so that energy and signal transmission is performed.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
the existing NFC antenna matching circuit shows different impedance performances due to the differences of components of an external circuit and the differences of NFC chips, and can not be automatically calibrated to an optimal phase, so that partial NFC equipment or NFC chips can not normally communicate.
It should be noted that the information disclosed in the foregoing background section is only for enhancing understanding of the background of the present application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the disclosure provides a clock phase determining method and device and a near field communication device, so as to improve the accuracy of NFC chip phase calibration.
In some embodiments, the near field communication device is communicatively connected with a near field communication card, the near field communication card including a comparator, the method comprising: acquiring an initial phase after hardware phase inversion of the near field communication device; the following phase determination operations are performed: comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result; each phase in the phase set is obtained by adding one or more phase increment to the initial phase; the target phase is taken as a clock phase of a sampling clock of the near field communication device.
Optionally, the method further comprises: if the target phase meeting the preset noise requirement is not determined after the phase determining operation is finished, raising the current noise threshold of the comparator; and re-executing the phase determining operation by taking the raised noise threshold value as the current noise threshold value of the comparator until a target phase meeting the preset noise requirement is determined.
Optionally, after the step of raising the current noise threshold of the comparator, the method further comprises: and if the raised current noise threshold is larger than the preset maximum noise threshold, taking the initial phase after the hardware phase inversion as a target phase.
Optionally, the step of determining a target phase meeting a preset noise requirement from the phase set according to the comparison result includes: judging the times that the noise generated by the sampling clock of the near field communication device on the current phase is higher than the current noise threshold value of the comparator; and if the times are smaller than a preset times threshold, determining the current phase as a target phase meeting the preset noise requirement.
Optionally, the step of determining the number of times the noise generated at the current phase is higher than the current noise threshold of the comparator includes: and judging the times that the noise generated on the current phase is higher than the current noise threshold value of the comparator within the preset duration.
Optionally, before performing the following steps of phase determining operations, the method further comprises: acquiring noise of an analog-to-digital conversion module in the comparator; judging whether the noise is in a preset measurable range or not; and if the noise is not in the preset measurable range, reducing the gain of the comparator so as to adjust the noise of the analog-to-digital conversion module to be in the preset measurable range.
Optionally, after determining the target phase, the method further comprises: judging whether the current gain of the comparator is smaller than the initial gain of the comparator; if so, increasing the current gain of the comparator to the initial gain of the comparator.
In some embodiments, the near field communication device is communicatively connected with a near field communication card, the near field communication card including a comparator, the device comprising: the acquisition module is configured to acquire an initial phase after the near field communication device performs hardware phase inversion; a target phase determination module configured to perform the steps of: comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result; each phase in the phase set is obtained by adding one or more phase increment to the initial phase; a clock determination module configured to take the target phase as a clock phase of a sampling clock of the near field communication device.
In some embodiments, the near field communication device comprises: the near field communication device chip and the clock phase determining device for the near field communication device, wherein the clock phase determining device is arranged on the near field communication device chip.
The clock phase determining method and device and the near field communication device provided by the embodiment of the disclosure can realize the following technical effects:
based on the initial phase after the hardware phase inversion of the near field communication device, performing multiple increment to obtain a phase set, and selecting a target phase meeting the preset noise requirement from the phase set as the clock phase of the sampling clock of the near field communication device. Compared with the initial phase after the phase inversion of the hardware, the noise of the selected target phase is smaller, so that the target phase is closer to the phase of an ideal clock, the consistency of the sampling clock of the near field communication device and the transmitting clock of the near field communication card is effectively improved, and the sampling accuracy of the near field communication device is improved.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which like reference numerals refer to similar elements, and in which:
fig. 1 is a schematic diagram of an internal structure of a near field communication device;
fig. 2 is a schematic diagram of signals received by an NFC chip;
fig. 3 is a flowchart of a clock phase determining method for a near field communication device according to an embodiment of the present disclosure;
fig. 4 is a flowchart of another clock phase determining method for a near field communication device according to an embodiment of the present disclosure;
fig. 5 is a flowchart of yet another clock phase determining method for a near field communication device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a clock phase determining apparatus for a near field communication apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another clock phase determining apparatus for a near field communication apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a near field communication device according to an embodiment of the disclosure.
Detailed Description
So that the manner in which the features and techniques of the disclosed embodiments can be understood in more detail, a more particular description of the embodiments of the disclosure, briefly summarized below, may be had by reference to the appended drawings, which are not intended to be limiting of the embodiments of the disclosure. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be practiced without these details. In other instances, well-known structures and devices may be shown simplified in order to simplify the drawing.
The terms first, second and the like in the description and in the claims of the embodiments of the disclosure and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe embodiments of the present disclosure. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more, unless otherwise indicated.
The clock phase determining method provided by the embodiment of the disclosure may be applied to a chip of a near field communication device (hereinafter referred to as NFC chip), and is shown in fig. 1 in combination, which is an internal structure schematic diagram of the near field communication device. The near field communication device comprises an NFC chip and an antenna matching circuit, wherein the NFC chip is related to Radio Frequency (RF) and mainly comprises three parts: an RF receiving module, an RF transmitting module, and a digital demodulating module. The near field communication device and the near field communication card can be in communication connection, and information replied by the near field communication card enters the NFC chip through an RX pin of the NFC chip, and is transmitted to the digital demodulation module for decoding after being filtered, amplified and converted by the analog-to-digital conversion module.
However, the antenna matching circuit in the existing NFC chip shows different impedance performances due to the differences of components of an external circuit and the differences of the NFC chip itself, and cannot be automatically calibrated to an optimal phase. This causes abnormal communication of some devices or NFC chips, but the non-contact devices are difficult to locate due to complex environments.
In connection with fig. 2, a schematic diagram of signals received by an NFC chip is shown. The RX antenna signal in fig. 2 is an RX antenna signal acquired by the NFC chip in fig. 1, rx_clk is a sampling clock of a signal received by the NFC chip, and rxclk is an ideal clock. If the sampling clock of the signal received by the NFC chip can be consistent with the ideal clock, the acquired sinusoidal signal is sampled to obtain the maximum value, and the generated noise is minimum.
Based on the above principle, the embodiment of the disclosure traverses different phases (i.e. different delay times of the traversing circuit) of the sampling clock rx_clk of the receiving signal of the NFC chip, and determines an ideal phase corresponding to the ideal sampling clock according to the noise generated by the receiving end of the near field communication card. Thus, the NFC chip automatically finds the sampling clock which is closer to the ideal clock.
Referring to fig. 3, a clock phase determining method for a near field communication device according to an embodiment of the present disclosure is provided, where the near field communication device is connected to a near field communication card, and the near field communication card includes a comparator, and the method includes the following steps:
s301: and acquiring an initial phase after the near field communication device performs hardware phase inversion.
The hard phase inversion is designed inside the NFC chip, that is, the hard phase inversion phase can be used to fix the phase at the optimal phase suitable for the NFC chip through register configuration. After the phase of the hardware phase inversion is obtained, the phase is set to the sampling phase in the ADC acquisition module in the NFC chip, and this phase is called the initial phase of the NFC chip.
Wherein each phase in the phase set is obtained by adding one or more phase increment to the initial phase. Wherein the phase increment is used to characterize the phase difference value for the phase increment. The phase increment can be preset and stored in the NFC chip, and the initial phase can be increased by different numbers of phase increment to obtain a plurality of different phases to form a phase set. For example, the phase increment may be set to 10 °, the initial phase determined after the hardware phase inversion is set to 0 °, and the initial phase is first increased by one phase increment to obtain the first phase of 10 °. And continuously adding two phase increment to the initial phase to obtain a second phase of 20 degrees. Similarly, a phase set containing 36 phases can be obtained.
S302: the following phase determination operations are performed: and comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result.
Wherein each phase in the phase set is obtained by adding one or more phase increment to the initial phase. The noise corresponding to each phase is the noise detected on the near field communication card when the sampling clock of the NFC chip is in the phase.
The phase set may be a set of a plurality of phases obtained by performing a plurality of transformations of the phase value based on the initial phase. As an alternative embodiment, the method may also be obtained by setting a fixed phase increment with the initial phase as the center, and performing addition operations or subtraction operations on the initial phase by different times of increment. The phase increment is factory set in the NFC chip, for example 5 °.
As an example, 13 phase values may be included in the phase set, and the phases included in the phase set are all phases between the initial phase +6 and the initial phase-6.
S303: the target phase is taken as a clock phase of a sampling clock of the near field communication device.
According to the phase determining method for the near field communication device, based on the initial phase after the hardware phase inversion of the near field communication device, a phase set is obtained by performing multiple increment, and a target phase meeting the preset noise requirement is selected from the phase set to serve as a clock phase of a sampling clock of the near field communication device. Compared with the initial phase after the phase inversion of the hardware, the noise of the selected target phase is smaller, so that the target phase is closer to the phase of an ideal clock, the consistency of the sampling clock of the near field communication device and the transmitting clock of the near field communication card is effectively improved, and the sampling accuracy of the near field communication device is improved.
The comparator in the near field communication card may set a plurality of noise thresholds, and as an example, the noise threshold of the comparator may be fixed on a preset initial noise threshold, and on the noise threshold, traversal of each phase in the phase set is performed to find out the target phase. However, the fixed noise threshold may not be reasonably set, for example, if the fixed noise threshold is set too low, the noise generated by all phases in the current noise threshold is larger than the noise threshold of the comparator, so that a suitable target phase cannot be determined all the time. Based on this, the disclosed embodiments also provide another phase determination method focusing on describing how to change the noise threshold of the comparator to find a suitable target phase, the method including the steps of, in connection with fig. 4:
s401: and acquiring an initial phase after the near field communication device performs hardware phase inversion.
S402: the following phase determination operations are performed: and comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result.
Each phase in the phase set is obtained by adding one or more phase increment to the initial phase, and noise corresponding to the phase is noise generated when a sampling clock of the near field communication device is in the phase.
In one possible implementation, the noise comparison may be directly performed based on the current noise threshold of the comparator, and the target phase is selected, and if the current noise threshold cannot select the target phase satisfying the preset noise condition, the initial phase is directly taken as the target phase.
As another possible implementation manner, the current noise threshold of the comparator can be adjusted simultaneously on the basis of adjusting the phase, and the phase traversing operation is sequentially performed in a plurality of noise thresholds.
S403: and if the target phase meeting the preset noise requirement is not determined after the phase determining operation is finished, raising the current noise threshold of the comparator.
S404: and re-executing the phase determining operation by taking the raised noise threshold value as the current noise threshold value of the comparator until a target phase meeting the preset noise requirement is determined.
S405: the target phase is taken as a clock phase of a sampling clock of the near field communication device.
For example, an initial noise threshold of the comparator may be set as a comparison reference, that is, the initial noise threshold is the current noise threshold, before the noise comparison is performed. The current noise threshold may be set to 130mv. If 130mv is used as a reference for comparison, it is found that all phases in the phase set produce more than 130mv, at which time there are two possibilities, one is that none of the phases produce less noise. Another possibility is that the current noise threshold is set too low at 130mv, at which point the current noise threshold may be raised, for example by 20mv, i.e. the current noise threshold becomes 150mv, and the noise comparison is performed on a 150mv basis.
Therefore, the target phases meeting the preset noise requirements can be selected one by one from the noise thresholds, so that the phase selection is more accurate.
It should be noted that the transformation of the current noise threshold of the comparator needs to be within a certain range, i.e. there is a maximum noise threshold and a minimum noise threshold, based on which, after S502 in the above step (the step of raising the current noise threshold of the comparator), the method further comprises: and if the raised current noise threshold is larger than the preset maximum noise threshold, taking the initial phase after the hardware phase inversion as a target phase.
The noise threshold may also be referred to as a comparator gear, and for convenience of description, the noise threshold of the comparator is replaced by a comparator gear in the following examples. For example, the comparator is set to 8 common gears, the lowest gear 130mv, every 50mv is one gear, starting from 130mv until the measured noise level.
Therefore, if all phases and the noise threshold values of all comparators cannot find the target phase meeting the preset noise condition, the fact that the sampling clock precision of the near field communication device cannot reach very high due to the hardware circuit or the device is indicated, the initial phase which is determined by the hardware circuit and is more in line with the hardware structure is selected, and the normal operation of the near field communication device is ensured.
The method for determining the target phase meeting the preset noise requirement from the phase set can be various, for example, a noise minimum value can be directly set, and the current phase is determined to be the target phase as long as the noise generated by the current phase is smaller than the noise minimum value after traversing to the current phase.
Optionally, in order to make the determined target phase more toward the phase corresponding to the ideal clock, a more detailed setting may be further made on the preset noise requirement, so the step of determining the number of times that the noise generated on the current phase is higher than the preset noise threshold of the comparator may include:
(1) Acquiring a preset frequency threshold;
(2) Judging the times that the noise generated by the sampling clock of the near field communication device on the current phase is higher than the current noise threshold value of the comparator;
(3) And if the times are smaller than the preset times threshold, determining the current phase as a target phase meeting the preset noise requirement.
Specifically, it may be determined whether the noise is continuously smaller than the current noise threshold of the comparator at the current phase, and if so, it is indicated that the noise generated at the current phase is smaller, and the target phase may be obtained.
Of course, in practical application, due to the structure of the hardware itself and the influence of environmental factors, it is difficult to ensure that the noise is always at a low level, i.e. a small number of increases in noise can be allowed. Based on this, it is also possible to judge the number of times that the noise generated at the current phase is higher than the preset noise threshold of the comparator within the preset period.
Optionally, the step of determining the number of times that the noise generated in the current phase is higher than the current noise threshold of the comparator may specifically include: and judging the times that the noise generated on the current phase is higher than the current noise threshold value of the comparator within the preset duration.
For example, a period of 150us may be set, and if the number of times that the current noise threshold of the comparator is exceeded is less than a preset number of times threshold, for example 8 times, a noise generated in 150us by a certain phase is considered to satisfy the preset noise requirement, the phase is regarded as the target phase. Otherwise, continuing the judgment of the next phase.
In this way, the target phase can ensure that the generated noise of the comparator is maintained at a lower level, but the noise exceeding the level may occur for several times in consideration of the instability of the comparator, and the phenomenon exceeding the preset noise threshold is allowed to occur for fewer times by setting the preset times threshold, so that the determined target phase is more accurate, and the situation that the preset noise requirement is set too strictly to select the target phase is avoided.
Optionally, since the comparator is enabled to accurately compare the difference between the actually generated noise and the current noise threshold of the comparator before the determination of the target phase is made, the gain of the comparator needs to be adjusted. Based on this, the method in the above embodiment may further include, before performing the determination of the target phase: acquiring noise of an analog-to-digital conversion module in the comparator; judging whether the noise is in a preset measurable range or not; and if the noise is not in the preset measurable range, reducing the gain of the comparator so as to adjust the noise of the analog-to-digital conversion module to be in the preset measurable range.
Specifically, comparator noise: the noise level of the AUX pin of the analog-to-digital conversion module is measured by a comparator module used during receiving of the near field communication card, for example, the maximum amplitude of the comparator measurement is 400mv, and if the maximum amplitude exceeds 400mv, the amplification gain needs to be reduced, so that the noise is reduced to a measurable range.
Therefore, noise measurement and comparison can be performed in a reasonable range, and phases with smaller noise can be more accurately selected, so that phase selection is more accurate.
After the target phase is determined, there are two cases, the first is that no adjustment is made to the comparator gain. The other is to lower the gain of the comparator in order to get a more accurate comparison result. For this case, the above disclosed embodiment may further include: judging whether the current gain of the comparator is smaller than the initial gain of the comparator; if so, increasing the current gain of the comparator to the initial gain of the comparator.
Thus, if there is an initial gain-reducing action, after the calibration phase is completed, the gain needs to be increased back, so that the comparator can be ensured to work normally afterwards.
As shown in connection with fig. 5, a further clock phase determining method for a near field communication device according to an embodiment of the present disclosure focuses on describing how to determine a phase of a sampling clock close to an ideal clock according to an analog-to-digital conversion module and by adjusting a noise threshold of a comparator, the method comprising the steps of:
s501: and acquiring noise of an analog-to-digital conversion module in the comparator.
S502: and judging whether the noise is in a preset measurable range or not. If within range, step S504 is performed, otherwise step S503 is performed.
S503: the gain of the comparator is reduced so that the noise of the analog-to-digital conversion module is within the preset measurable range.
S504: and acquiring an initial phase after the near field communication device performs hardware phase inversion, and a current noise threshold value and a preset frequency threshold value of the comparator.
S505: and judging whether the frequency of noise generated by the sampling clock of the near field communication device on the current phase is higher than the current noise threshold value of the comparator is greater than a preset frequency threshold value. If the number of times is greater than the preset number of times threshold, step S507 is performed. If the number of times is smaller than the preset number of times threshold, step S506 is performed.
S506: determining that the current phase is a target phase satisfying a preset noise requirement, and executing step S511.
S507: whether the current phase is the last phase in the phase set is determined, and if so, step S508 is performed. Otherwise, another phase in the phase set that is not compared is selected, and step S505 is performed again.
S508: and judging that the current noise threshold is larger than a preset maximum noise threshold. If so, step S510 is performed. Otherwise, step S509 is performed.
S509: and raising the current noise threshold of the comparator, taking the raised noise threshold as the current noise threshold, and re-executing step S505.
S510: step S511 is executed with the initial phase after the hardware phase inversion as the target phase.
S511: and taking the target phase as the clock phase of the sampling clock of the NFC chip.
S512: comparing the current gain of the comparator with the initial gain of the comparator, and if the current gain of the comparator is smaller than the initial gain of the comparator, increasing the current gain of the comparator to the initial gain of the comparator.
For easy understanding, the following provides a clock phase determining method for a near field communication device in combination with an actual application scenario, which is as follows:
1. when the radio frequency field is started, hardware phase inversion is carried out, and the phase is fixed at the optimal phase considered by the NFC chip through register configuration by using the hardware phase inversion.
The optimal phase is the initial phase in the above embodiments of the disclosure.
2. Writing the optimal phase into an analog-to-digital conversion module in the NFC chip.
Specifically, the noise level of the AUX pin of the analog-to-digital conversion module is measured by a comparator module used when receiving the borrowed near field communication card.
3. The comparator measures 400mv at maximum amplitude, and if the maximum amplitude exceeds 400mv, the amplification gain is automatically reduced, so that noise is reduced to a measurable range.
The maximum amplitude is the maximum value in the measurable range described above.
4. And confirming that the initial phase is the optimal phase-6 according to the optimal phase after hardware phase inversion and the phase range to be searched, and the termination phase is the optimal phase +6.
5. The comparator is set to 8 gears, the lowest gear is 130mv, every 50mv is one gear, and the noise is measured from 130mv.
The gear of the comparator is the noise threshold of the comparator in the above embodiment of the disclosure.
Specifically, 130mv is fixed first, the phase value of the traversal phase hardware phase is-6 is added by 1 to +6, if the noise in the range exceeds 130 comparator threshold value for 8 times, the noise is considered to be larger than 130mv, the gear is continuously increased, the phase value of the traversal phase hardware phase is + -6 nearby, and the like is pushed until the noise is found to meet the requirement, namely the comparator threshold value comparison result is smaller than 8 times and is low.
The 8 times are the preset times threshold value. The noise requirement may be set such that the noise generated within 150us is continuously smaller than the current gear, wherein the current gear is allowed to be exceeded 8 times.
6. If the phase satisfying the noise requirement is not found yet in the maximum gear of the comparator, the optimum phase obtained by the hardware phase inversion is used.
7. If the method starts to have the action of decreasing the gain of the comparator, the gain of the comparator is increased after the calibration phase is completed.
Referring to fig. 6, a clock phase determining apparatus 600 for a near field communication device according to an embodiment of the present disclosure is provided, where the near field communication device is connected to a near field communication card, and the near field communication card includes a comparator, and the clock phase determining apparatus 600 includes: an acquisition module 601, a target phase determination module 602 and a clock determination module 603. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the acquiring module 601 is configured to acquire an initial phase after the near field communication device performs hardware phase inversion;
the target phase determination module 602 is configured to perform the steps of: comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result; each phase in the phase set is obtained by adding one or more phase increment to the initial phase;
the clock determination module 603 is configured to take the target phase as a clock phase of a sampling clock of the near field communication device.
According to the phase determining device provided by the embodiment of the disclosure, based on the initial phase after the hardware phase inversion of the near field communication device, a phase set is obtained by performing multiple increment, and a target phase meeting the preset noise requirement is selected from the phase set to serve as the clock phase of the sampling clock of the near field communication device. Compared with the initial phase after the phase inversion of the hardware, the noise of the selected target phase is smaller, so that the target phase is closer to the phase of an ideal clock, the consistency of the sampling clock of the near field communication device and the transmitting clock of the near field communication card is effectively improved, and the sampling accuracy of the near field communication device is improved.
Optionally, the apparatus further includes: and the threshold value raising module is configured to raise the current noise threshold value of the comparator if the target phase meeting the preset noise requirement is not determined after the phase determining operation is completed. And the circulation module is configured to take the raised noise threshold value as the current noise threshold value of the comparator, and re-execute the phase determining operation until a target phase meeting the preset noise requirement is determined.
Optionally, the apparatus further includes: and the second target phase determining module is configured to take the initial phase after the hardware phase inversion as a target phase if the raised current noise threshold is larger than a preset maximum noise threshold.
Optionally, the target phase determining module 602 is further configured to: judging the times that the noise generated by the sampling clock of the near field communication device on the current phase is higher than the current noise threshold value of the comparator; and if the times are smaller than a preset times threshold, determining the current phase as a target phase meeting the preset noise requirement.
Optionally, the above process of determining the number of times that the noise generated at the current phase is higher than the current noise threshold of the comparator includes: and judging the times that the noise generated on the current phase is higher than the current noise threshold value of the comparator within the preset duration.
Optionally, the apparatus further includes: and the noise acquisition module is configured to acquire the noise of the analog-to-digital conversion module in the comparator. And the judging module is configured to judge whether the noise is in a preset measurable range. And a gain reduction module configured to reduce the gain of the comparator to adjust the noise of the analog-to-digital conversion module to be within the preset measurable range if the noise is not within the preset measurable range.
Optionally, the apparatus further includes: and a second judging module configured to judge whether the current gain of the comparator is smaller than the initial gain of the comparator. A gain increasing module configured to increase a current gain of the comparator to an initial gain of the comparator if so.
As shown in connection with fig. 7, an embodiment of the present disclosure provides a clock phase determination apparatus 700 for a near field communication apparatus, including a processor (processor) 100 and a memory (memory) 101. Optionally, the apparatus may further comprise a communication interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via the bus 103. The communication interface 102 may be used for information transfer. The processor 100 may invoke logic instructions in the memory 101 to perform the method for clock phase determination of a near field communication device of the above described embodiments.
Further, the logic instructions in the memory 101 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 101 is a computer readable storage medium that can be used to store a software program, a computer executable program, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 performs functional applications as well as data processing, i.e. implements the method for clock phase determination of a near field communication device in the above embodiments, by running program instructions/modules stored in the memory 101.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. Further, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
As shown in connection with fig. 8, an embodiment of the present disclosure provides a near field communication device 800, comprising: a near field communication device chip, and the clock phase determining device 600 or 700 for a near field communication device described above. The clock phase determination device 600 or 700 for a near field communication device is mounted within a near field communication device chip. The mounting relationships described herein are not limited to placement within a product, but include mounting connections to other components of a product, including but not limited to physical, electrical, or signal transmission connections, etc. Those skilled in the art will appreciate that the clock phase determination device 600 or 700 for a near field communication device may be adapted to a viable near field communication device chip to implement other viable embodiments.
Embodiments of the present disclosure provide a computer readable storage medium storing computer executable instructions configured to perform the above-described method for clock phase determination for a near field communication device.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method for … described above.
The computer readable storage medium may be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
Embodiments of the present disclosure may be embodied in a software product stored on a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of a method according to embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium including: a plurality of media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or a transitory storage medium.
The above description and the drawings illustrate embodiments of the disclosure sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. Moreover, the terminology used in the present application is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, when used in this application, the terms "comprises," "comprising," and/or "includes," and variations thereof, mean that the stated features, integers, steps, operations, elements, and/or components are present, but that the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof is not precluded. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled artisan may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the embodiments disclosed herein, the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be practiced in other ways. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units may be merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to implement the present embodiment. In addition, each functional unit in the embodiments of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A clock phase determination method for a near field communication device, the near field communication device being in communication with a near field communication card, the near field communication card including a comparator, the method comprising:
acquiring an initial phase after hardware phase inversion of the near field communication device;
the following phase determination operations are performed: comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result; each phase in the phase set is obtained by adding one or more phase increment to the initial phase;
the target phase is taken as a clock phase of a sampling clock of the near field communication device.
2. The clock phase determination method according to claim 1, characterized in that the method further comprises:
if the target phase meeting the preset noise requirement is not determined after the phase determining operation is finished, raising the current noise threshold of the comparator;
and re-executing the phase determining operation by taking the raised noise threshold value as the current noise threshold value of the comparator until a target phase meeting the preset noise requirement is determined.
3. The method of clock phase determination according to claim 2, wherein after the step of raising the current noise threshold of the comparator, the method further comprises:
and if the raised current noise threshold is larger than the preset maximum noise threshold, taking the initial phase after the hardware phase inversion as a target phase.
4. The method of claim 1, wherein the step of determining a target phase from the set of phases that meets a predetermined noise requirement based on the comparison result comprises:
judging the times that the noise generated by the sampling clock of the near field communication device on the current phase is higher than the current noise threshold value of the comparator;
and if the times are smaller than a preset times threshold, determining the current phase as a target phase meeting the preset noise requirement.
5. The method of claim 4, wherein the step of determining the number of times that the noise generated at the current phase is above the current noise threshold of the comparator comprises:
and judging the times that the noise generated on the current phase is higher than the current noise threshold value of the comparator within the preset duration.
6. The method of claim 1, wherein prior to the step of performing the phase determination operation, the method further comprises:
acquiring noise of an analog-to-digital conversion module in the comparator;
judging whether the noise is in a preset measurable range or not;
and if the noise is not in the preset measurable range, reducing the gain of the comparator so as to adjust the noise of the analog-to-digital conversion module to be in the preset measurable range.
7. The method of claim 1, wherein after the step of determining a target phase from the set of phases that meets a predetermined noise requirement based on the comparison result, the method further comprises:
judging whether the current gain of the comparator is smaller than the initial gain of the comparator;
if so, increasing the current gain of the comparator to the initial gain of the comparator.
8. A clock phase determination device for a near field communication device, the near field communication device being in communication with a near field communication card, the near field communication card including a comparator, the device comprising:
the acquisition module is configured to acquire an initial phase after the near field communication device performs hardware phase inversion;
a target phase determination module configured to perform the steps of: comparing the noise corresponding to each phase in the phase set with the current noise threshold of the comparator, and determining a target phase meeting the preset noise requirement from the phase set according to a comparison result; each phase in the phase set is obtained by adding one or more phase increment to the initial phase;
a clock determination module configured to take the target phase as a clock phase of a sampling clock of the near field communication device.
9. A clock phase determination apparatus for a near field communication apparatus comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the clock phase determination method for a near field communication apparatus as claimed in any one of claims 1 to 7 when executing the program instructions.
10. A near field communication device, comprising:
a near field communication device chip;
the clock phase determination device for a near field communication device of claim 8 or 9, the clock phase determination device being mounted on the near field communication device chip.
CN202310032251.7A 2023-01-10 2023-01-10 Clock phase determining method and device and near field communication device Active CN115801217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310032251.7A CN115801217B (en) 2023-01-10 2023-01-10 Clock phase determining method and device and near field communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310032251.7A CN115801217B (en) 2023-01-10 2023-01-10 Clock phase determining method and device and near field communication device

Publications (2)

Publication Number Publication Date
CN115801217A CN115801217A (en) 2023-03-14
CN115801217B true CN115801217B (en) 2023-06-20

Family

ID=85428928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310032251.7A Active CN115801217B (en) 2023-01-10 2023-01-10 Clock phase determining method and device and near field communication device

Country Status (1)

Country Link
CN (1) CN115801217B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105191119A (en) * 2013-03-15 2015-12-23 高通股份有限公司 Apparatus and method for reducing phase noise in near field communication device signaling
CN105512431A (en) * 2016-01-04 2016-04-20 西安电子科技大学 Phase noise measuring method based on phase noise mathematical model
US9455855B1 (en) * 2015-06-17 2016-09-27 Google Inc. Phase shifter chip radio frequency self-test
CN111164912A (en) * 2017-09-30 2020-05-15 平方股份有限公司 Wireless signal noise reduction
CN115242368A (en) * 2022-09-21 2022-10-25 北京紫光青藤微系统有限公司 Method and device for adjusting phase, near field communication equipment and storage medium
CN115378569A (en) * 2022-10-24 2022-11-22 北京紫光青藤微系统有限公司 Method, apparatus, electronic device and storage medium for adjusting phase

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10255590B1 (en) * 2017-09-30 2019-04-09 Square, Inc. Radio frequency noise management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105191119A (en) * 2013-03-15 2015-12-23 高通股份有限公司 Apparatus and method for reducing phase noise in near field communication device signaling
US9455855B1 (en) * 2015-06-17 2016-09-27 Google Inc. Phase shifter chip radio frequency self-test
CN105512431A (en) * 2016-01-04 2016-04-20 西安电子科技大学 Phase noise measuring method based on phase noise mathematical model
CN111164912A (en) * 2017-09-30 2020-05-15 平方股份有限公司 Wireless signal noise reduction
CN115242368A (en) * 2022-09-21 2022-10-25 北京紫光青藤微系统有限公司 Method and device for adjusting phase, near field communication equipment and storage medium
CN115378569A (en) * 2022-10-24 2022-11-22 北京紫光青藤微系统有限公司 Method, apparatus, electronic device and storage medium for adjusting phase

Also Published As

Publication number Publication date
CN115801217A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
DK3142221T3 (en) Quick charge method, power adapter and mobile terminal
US9218518B2 (en) Method of operating contactless IC card reader, detection circuit of contactless IC card reader, contactless IC card reader and card system including the same
US20090049326A1 (en) Clock signal generator for generating stable clock signal, semiconductor memory device including the same, and methods of operating
CN103619054A (en) Method and device for selecting network frequency band and router
EP3447875B1 (en) Device and method for preventing nfc card destruction by a wireless charging system
CN110365425B (en) Antenna tuning control method, device and system
CN115801217B (en) Clock phase determining method and device and near field communication device
CN112039861A (en) Risk identification method and device, electronic equipment and computer readable storage medium
US9419682B2 (en) Apparatus and method for providing near field communication for mobile device
KR20160087819A (en) Systems and methods for low voltage secure digital (sd) interfaces
CN109426840B (en) Wireless clock calibration device of card reader and card reader
CN115865138A (en) Method and apparatus for acquiring near field communication signal, electronic device, and medium
US8942278B2 (en) Systems and methods for detecting data collisions for a near field communication system
CN110764440A (en) Signal sampling method of memory
KR102180715B1 (en) High speed counter
JP5323556B2 (en) Arithmetic circuit, signal selection method, and computer program
KR20190075509A (en) Apparatus and method for distinguishing communication signal in front of communication modem
CN104036305A (en) RFID reader-writer and method for carrying out self-detection and self-adjustment on transmitting power
CN115664626B (en) Clock phase determining method and device, near field communication chip and near field communication equipment
US20220346026A1 (en) Communication apparatus, communication method, and program
CN115865225B (en) Method and device for determining abnormality of radio frequency equipment, electronic device and equipment
CN117319161B (en) Chirp signal demodulation method and device, computer equipment and storage medium
CN117014845B (en) Method and device for determining communication starting position and near field communication equipment
CN109284239B (en) Method and system for acquiring delay step time in storage module
CN117674911A (en) Detection circuit, signal detection method and detection system for signal detection

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
GR01 Patent grant
GR01 Patent grant