A clock phase self-calibration circuit and calibration method for NFC chip
By combining the clock that recovers the RX signal from the antenna and the multi-channel continuous phase clock signal inside the chip, the clock signal that satisfies the phase difference value is directly selected, which solves the problem of field strength judgment dependence in the phase calibration of NFC chips, and achieves rapid Calibration and high sensitivity detection.
Patent Information
- Application Number
- CN202411196415.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-29
AI Technical Summary
The existing NFC chip clock phase calibration method will increase the phase determination time and extend the adjustment time when the field strength value corresponding to the N-channel phase does not rise or fall continuously.
By recovering the clock of the RX signal from the antenna and combining the multiple continuous phase clock signals generated inside the chip, a clock signal that satisfies the phase difference value is directly selected, without judging the sampled field strength code value, simplifying digital logic and shortening Adjust the time.
Fast clock phase self-calibration is achieved, which improves detection sensitivity, enables the PCD to more accurately detect signals transmitted by the PICC card, and reduces calibration time.
Smart Images

Figure CN118732778B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of NFC chips, and more specifically, to a clock phase self-calibration circuit and a calibration method for an NFC chip. Background Art
[0002] In recent years, NFC (Near Field Communication) devices have been widely used. NFC cards (PICC) communicate with corresponding NFC reader (PCD) devices through inductive coupling. The standard for communication between PICC and PCD complies with the ISO / IEC 14443 protocol. The protocol defines that the carrier frequency for communication between the two is 13.56MHz, data transmission uses a subcarrier frequency of 13.56MHz / 16, the PICC is powered by the electric field of the PCD, and the PICC clock is provided by the signal transmitted by the PCD.
[0003] Due to the delay of the internal circuit structure of PICC and the tolerance of the external matching circuit and antenna, there may be a certain degree of phase difference between the clock signals of the PICC device and the PCD device. When the phase difference between the PICC device clock phase and the PCD device sampling clock is 0° or 180°, the PCD can sample the PICC signal with the maximum amplitude. When the phase difference between the PICC device clock phase and the PCD device sampling clock is 90° or 270°, the sampled amplitude is even 0. In order to ensure the correct transmission of information, the phase difference should be between -30° and 30° or 150° and 210°.
[0004] The existing implementation scheme is to adjust by generating multiple continuous phases, such as a clock phase determination method described in patent document CN115664626A. This method selects N continuous phases from multiple continuous phases, and uses the clock corresponding to each phase in the N continuous phases as the sampling clock for sampling. Based on the relationship between the field strengths obtained by sampling and the relationship between each field strength and the zero value, the field strength that matches the ideal clock is quickly found. Figure 1As shown, the method selects N continuous phases as the phases of the sampling clock, collects the field strengths of the receiving fields of the N sampling clocks with different phases respectively, and determines whether the magnitudes of the N field strengths meet the target field strength of the zero value condition, and determines that the phase corresponding to the target field strength is the phase of the receiving clock of the near field communication device NFC. The specific judgment method is: if the field strength values of the N field strengths corresponding to the N continuous phases increase or decrease, it is determined that the N continuous phases meet the predetermined conditions, and the field strength with the smallest difference between the field strength value and the zero value among the N field strengths is determined as the target field strength, and the phase of the target field strength is determined as the sampling clock phase. The key point is that the N field strength values corresponding to the N phases rise or fall continuously, and the probability of finding the target phase with a field strength closer to the zero value is greater, which saves the time for phase determination.
[0005] However, when the N field strength values corresponding to the N phases do not rise and fall continuously, the N continuous phases will be reselected, and the above steps of determining the field strength of the receiving field will be repeated, which will increase the phase determination time, which will extend the adjustment time. Summary of the invention
[0006] To solve the above problems, the primary purpose of the present invention is to provide a clock phase self-calibration circuit and calibration method for an NFC chip. The self-calibration circuit and calibration method recover the clock of the RX signal from the antenna, and then combine the multi-channel continuous phase clock signals generated inside the chip to select a clock signal that meets the phase difference from the multi-channel continuous clock signals. There is no need to judge the size of the sampled field strength code value, which simplifies the digital logic in the existing solution and shortens the adjustment time.
[0007] Another object of the present invention is to provide a clock phase self-calibration circuit and calibration method for an NFC chip, which can sample the maximum signal amplitude and enable the PCD to detect smaller signals emitted by PICC cards, thereby improving the detection sensitivity.
[0008] The applicant's research found that: through a clock recovery circuit, the clock of the RX signal is recovered from the antenna, and combined with the multi-channel continuous phase clock signals generated inside the chip, the recovered signal clock and the internal multi-channel continuous phase signal clock are judged, and then the clock signal whose phase difference meets the set requirements is selected, and this clock signal is determined to be the receiving clock signal. This not only simplifies the digital logic of the existing solution, but also shortens the adjustment time, and there is no need to judge the size of the sampled field strength code value.
[0009] To achieve the above objectives, the technical solution of the present invention is as follows.
[0010] A clock phase self-calibration circuit for an NFC chip, comprising an RX clock extraction circuit, a clock delay circuit, a phase comparison circuit, a digital logic circuit, a sampling clock selection circuit, a four-phase clock generation circuit, and a sampling circuit;
[0011] Among them, the RX clock extraction circuit and the clock delay circuit are connected to the phase comparison circuit, and output CLK to the phase comparison circuit. RX ,CLK D0 ,CLK D1 ……CLK D7 The signal, phase comparison circuit, digital logic circuit, sampling clock selection circuit, four-phase clock generation circuit, and sampling circuit are connected in sequence;
[0012] The RX clock extraction circuit recovers the RX clock from the RX signal and transmits it to the phase comparison circuit;
[0013] The clock delay circuit generates 7-way continuous phase-delayed clock signals according to the PCD main clock signal, and the clock signals are also transmitted to the phase comparison circuit for comparison;
[0014] The phase comparison circuit compares the phases of the 7-way continuously phase-delayed clocks with the phases of the clock extracted from the RX signal, and outputs the comparison results to the digital logic circuit;
[0015] The digital logic circuit selects the nth phase delay signal closest to the RX extraction clock phase according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit;
[0016] The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the n-th phase delay signal, and transmits them to the four-phase clock generation circuit;
[0017] The four-phase clock generation circuit generates sampling clock signals CLK1 to CLK4 according to the selected target phase signal, and outputs the CLK1 to CLK4 signals to the sampling circuit;
[0018] The sampling circuit removes the carrier according to the sampling clock signal and separates the I-channel and Q-channel signals.
[0019] The present invention recovers the clock of the RX signal from the antenna, combines it with the multi-channel continuous phase clock signals generated inside the chip, determines the phase difference between the recovered RX signal clock and the internal multi-channel continuous phase delay signal clock through a trigger, selects a clock signal that meets the phase difference value from the multi-channel continuous clock signals, and determines that this clock signal is the receiving clock signal. There is no need to judge the size of the sampled field strength code value, which simplifies the digital logic in the existing solution and shortens the adjustment time.
[0020] Furthermore, the clock delay circuit includes an inverter and a capacitor, the inverters are connected in series and then in parallel with the capacitor, and the clock signal is obtained from between the inverters; CLK PCD is the start signal and the clock signal of PCD. This signal is phase-delayed by the inverter and capacitor to obtain the signal CLK with zero delay. D0 , delay td of signal CLK D1 , delayed by 2td, signal CLK D2 ... and so on, the signal CLK delayed by 7td D7 .
[0021] Furthermore, the phase comparison circuit is composed of a D flip-flop, which converts the phase-delayed signal CLK D0 ~CLK D7 Respectively with the CLK extracted from the PICC RX The clock signal is compared and finally an eight-bit binary signal a0 to a7 is output.
[0022] Furthermore, the sampling clock selection circuit is composed of a D flip-flop, a data selector, a buffer and an inverter; CLK D0 ~CLK D7 The signals are divided into four groups, which are processed by the data selector and the result is selected according to the binary code value C0; the processed signals are reduced by half, leaving four signals, which are divided into two groups again, which are processed by the data selector and the result is selected according to the binary code value C1; two signals are generated after processing, which are processed by the data selector and the result is selected according to the binary code value C2; the final signal is passed through the buffer BUF1 to generate the CLK of the target delay phase Dn ;CLK Dn The inverted signal is obtained through the inverter, and the two signals are processed by the MU2X18 data selector. The result is selected according to the binary code value a0. The processed signal generates CLK_I through the D flip-flop DFF2, and the other signal passes through the inverter and then generates CLK_Q through the D flip-flop DFF1.
[0023] Further, CLK_I and CLK_Q are converted to generate CLK1 to CLK4; wherein CLK1 and CLK2 control the I channel sampling switch, and CLK3 and CLK4 control the Q channel sampling switch.
[0024] The present invention further provides a clock phase self-calibration method for an NFC chip, comprising the following steps:
[0025] 101, generating N channels of continuous clock signals with different phases of a chip master clock signal;
[0026] Specifically, the clock delay circuit of the chip generates 7 consecutive phase-delayed clock signals according to the PCD main clock signal.
[0027] 102, an RX clock extraction circuit extracts a clock of an RX signal from an antenna;
[0028] Specifically, the RX clock extraction circuit recovers the clock signal from the RX signal;
[0029] 103, the phase comparison circuit compares the phase of the RX clock signal with the N-channel clock signals with different phases of the chip; selects the clock signal whose phase difference with the RX clock signal meets the delay requirement from the N-channel clock signals with different phases;
[0030] The phase comparison circuit compares the phase of the clock of the 7 continuous phase-delayed signals with the phase of the clock extracted from the RX signal, and outputs the comparison result to the digital logic circuit; the digital logic circuit selects the nth phase-delayed signal closest to the clock phase extracted from the RX signal according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit;
[0031] 104, determining that the phase of the clock signal selected in step 103 is the receiving clock phase of the near field communication PCD device;
[0032] 105, generating a sampling clock using the target clock phase.
[0033] The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the n-th phase delay signal and provides them to the four-phase clock generation circuit;
[0034] Then the four-phase clock generation circuit generates sampling clock signals CLK_1 to CLK_4 according to the selected target phase signal, and outputs the CLK_1 to CLK_4 signals to the sampling circuit;
[0035] 106, obtaining I-channel and Q-channel signals through a sampling circuit.
[0036] Further, in step 102, the RX clock extraction circuit inputs the RX signal and the VMID signal, RX is the signal obtained by the PCD from the PICC through the antenna, and the VMID signal is half the power supply voltage. The RX and VMID signals are compared with each other to extract the PICC clock signal CLK. RX .
[0037] Furthermore, in the clock delay circuit, CLK PCD The clock signal of PCD has a frequency of 27.12MHz. After phase delay by inverter and capacitor, the signal CLK with zero delay is generated. D0 , delay td of signal CLK D1 , delayed by 2td, signal CLK D2... and so on, the signal CLK delayed by 7td D7 .
[0038] Furthermore, the phase comparison circuit is composed of a D flip-flop, which converts the phase-delayed signal CLK D0 ~CLK D7 Respectively with the CLK extracted from the PICC RX The D flip-flop is triggered by the rising edge. When CLK RX Phase delay exceeds the corresponding generated CLK Dn (n=0……7) phase, Q outputs high level, when CLK RX The phase delay does not reach the corresponding generated CLK Dn (n=0……7) phase, Q outputs low level, and a0~a7 output high level or low level state is continuous. The digital logic circuit can convert it into a 3-bit binary code value by counting the number of high levels. This code value represents CLK RX Phase corresponding to the nth CLK Dn Signal.
[0039] Furthermore, the sampling clock selection circuit selects the CLK of the target delay phase through the parallel three-bit binary code values C0~C2 output by the digital logic Dn , select CLK through MU2X18 data selector Dn or inverted CLK Dn , corresponding to phase lag and lead respectively, and finally CLK_I and CLK_Q are generated by two D flip-flops DFF1 and DFF2. CLK_I and CLK_Q are orthogonal square wave clocks with a phase difference of 90°, which are used for the subsequent four-phase clock generation circuit to generate CLK1~CLK4.
[0040] Furthermore, the logic of the output of the four-phase clock generation circuit is:
[0041]
[0042] Among them, CLK1 and CLK2 control the I channel sampling switch, and CLK3 and CLK4 control the Q channel sampling switch.
[0043] Furthermore, the CLK1 and CLK2 control the I channel sampling switch, and the CLK3 and CLK4 control the Q channel sampling switch. When the CLK1 deviates from the carrier phase by 90° and the CLK2 deviates from the carrier phase by 270°, the signal amplitude sampled by the I channel is 0; when the CLK1 deviates from the carrier phase by 0° and the CLK2 deviates from the carrier phase by 180°, the signal amplitude sampled by the I channel is the maximum value; when the CLK1 deviates from the carrier phase by 0° and the CLK2 deviates from the carrier phase by 180°, the field strength of the I channel is the maximum and the field strength of the Q channel is 0; or when the CLK3 deviates from the carrier phase by 0° and the CLK4 deviates from the carrier phase by 180°, the field strength of the Q channel is the maximum and the field strength of the I channel is 0.
[0044] Compared with the prior art, the technical effects of the present invention are as follows:
[0045] The present invention recovers the clock of the RX signal from the antenna through a clock recovery circuit, generates multiple continuous phase-delayed clock signals inside the chip, judges the phases of the recovered RX signal clock and the internal multiple continuous phase-delayed clock signals through a trigger, selects the clock signal whose phase difference meets the set requirements, and determines that the clock signal is the receiving clock signal. It is not necessary to judge the size of the sampled field strength code value, simplifies the digital logic of the existing solution, and shortens the adjustment time.
[0046] The present invention compares multiple continuous phase signals with the RX signal clock and automatically adjusts the phase of the sampling signal to achieve the maximum difference between the I-path and Q-path signal amplitudes, thereby ensuring that the I-path (Q-path) samples the maximum signal amplitude. At the same time, the PCD can detect smaller signals emitted by the PICC card, thereby improving the detection sensitivity. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 FIG. 4 is a flow chart of sampling clock adjustment in the prior art.
[0048] Figure 2 The present invention is a circuit block diagram of a clock phase self-calibration circuit for an NFC chip.
[0049] Figure 3 The invention discloses a circuit diagram of an RX clock extraction circuit.
[0050] Figure 4 It is a circuit diagram of a clock delay circuit implemented by the present invention.
[0051] Figure 5 It is a circuit diagram of a phase comparison circuit implemented by the present invention.
[0052] Figure 6 It is a structural diagram of the sampling clock selection circuit implemented by the present invention.
[0053] Figure 7 It is a circuit diagram of a four-phase clock generation circuit implemented by the present invention.
[0054] Figure 8 It is a circuit diagram of a sampling circuit implemented by the present invention.
[0055] Fig. 9 The diagram is a schematic diagram of the phase deviation between the four-phase clock and the carrier generated by the sampling circuit implemented in the present invention.
[0056] Fig.10 It is a schematic diagram of I and Q path sampling results when the carrier phase deviation is realized by the present invention.
[0057] Fig.11 The present invention is a flow chart of clock phase self-calibration. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0059] Figure 2 As shown, a clock phase self-calibration circuit for an NFC chip implemented in the present invention is shown. As shown in the figure, the self-calibration circuit includes an RX clock extraction circuit, a clock delay circuit, a phase comparison circuit, a digital logic circuit, a sampling clock selection circuit, a four-phase clock generation circuit, and a sampling circuit.
[0060] Among them, the RX clock extraction circuit and the clock delay circuit are connected to the phase comparison circuit, and output CLK to the phase comparison circuit. RX ,CLK D0 ,CLK D1 ……CLK D7 The signal, phase comparison circuit, digital logic circuit, sampling clock selection circuit, four-phase clock generation circuit and sampling circuit are connected in sequence.
[0061] Specifically, their functions are as follows:
[0062] The RX clock extraction circuit recovers the clock signal from the RX signal and transmits it to the phase comparison circuit.
[0063] The clock delay circuit generates 7-channel continuous phase-delayed clock signals according to the PCD main clock signal. This clock signal is also transmitted to the phase comparison circuit for comparison.
[0064] The phase comparison circuit compares the phases of the clocks of the 7-channel continuous phase-delayed signals and the clock extracted from the RX signal, and outputs the comparison result to the digital logic circuit.
[0065] The digital logic circuit selects the nth phase-delayed signal closest to the clock phase extracted by the RX according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit.
[0066] The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the n-th phase delay signal and transmits them to the four-phase clock generation circuit.
[0067] The four-phase clock generation circuit generates sampling clock signals CLK1 to CLK4 according to the selected target phase signal, and outputs the CLK1 to CLK4 signals to the sampling circuit.
[0068] The sampling circuit removes the carrier wave according to the sampling clock signal to separate the I-channel and Q-channel signals.
[0069] In this way, by recovering the clock of the RX signal from the antenna and combining it with the multi-channel continuous phase clock signals generated inside the chip, the phase difference between the recovered RX signal clock and the internal multi-channel continuous phase delay signal clock is determined through a trigger, and a clock signal that meets the phase difference value is selected from the multi-channel continuous clock signals, and this clock signal is determined to be the receiving clock signal. In this way, there is no need to judge the size of the sampled field strength code value, which simplifies the digital logic in the existing solution and shortens the adjustment time.
[0070] Figure 3 The RX clock extraction circuit implemented by the present invention is shown. In the figure, Ibias is the reference current of the circuit, EN is the enable signal, and high level is effective. The RX clock extraction circuit inputs the RX signal and the VMID signal. RX is the signal obtained by the PCD from the PICC through the antenna, and the VMID signal is half the power supply voltage. The RX and VMID signals are compared with each other to extract the PICC clock signal CLK. RX .
[0071] Figure 4 This is an example of the 8-way clock delay circuit of this invention. In the figure, the clock delay circuit includes an inverter and a capacitor. The inverter is connected in series and then in parallel with the capacitor. The clock signal is obtained from between the inverters; CLK PCD is the start signal and the clock signal of PCD. This signal is phase-delayed by the inverter and capacitor to obtain the signal CLK with zero delay. D0 , delay td of signal CLK D1 , delayed by 2td, signal CLK D2 ... and so on, the signal CLK delayed by 7td D7 The generated phase delay should contain half a full cycle (0-180°). D0 and CLK RX The result can be used to determine whether the phase is ahead or behind. When the phase is ahead, CLKD0 ~CLK D7 Will be Figure 6 In the sampling clock generation circuit shown, the reverse phase represents a delayed phase of -180° to 0°. This design reduces the area and power consumption of the clock delay circuit by half, while covering a complete cycle of phase delay of -180° to 180°. The fewer the number of clock delay phases, the smaller the circuit power consumption and area. The more the number of phases, the closer the target phase is to the RX clock phase.
[0072] Figure 5 This is an example of an 8-way phase comparison circuit of this invention. The phase comparison circuit is composed of a D flip-flop, which converts the phase-delayed signal CLK D0 ~CLK D7 Respectively with the CLK extracted from the PICC RX The clock signal is compared and finally the eight-bit binary signal a0 to a7 is output. The number of D flip-flops here should be the same as Figure 4 The number of N phase delays of the D flip-flop is consistent. The D flip-flop is triggered by the rising edge. RX Phase delay exceeds the corresponding generated CLK Dn (n=0……7) phase, Q outputs high level, when CLK RX The phase delay does not reach the corresponding generated CLK Dn (n=0……7) phase, Q outputs low level, and a0~a7 output high level or low level must be continuous. The digital logic circuit can convert it into a 3-bit binary code value by counting the number of high levels. This code value represents CLK RX Phase corresponding to the nth CLK Dn Signal.
[0073] The digital logic circuit is a prior art, which only counts the number of high levels and converts them into a 3-bit binary code value, which will not be described in detail here.
[0074] Figure 6 This is an example of an 8-way sampling clock selection circuit of this invention. The sampling clock selection circuit is composed of a D flip-flop, a data selector, a buffer and an inverter; CLK D0 ~CLK D7 The signals are divided into four groups and processed by the data selector, and the result is selected according to the binary code value C0; the number of processed signals is halved to four, and these four signals are divided into two groups and processed by the data selector, and the result is selected according to the binary code value C1; after further processing, two signals are generated, and these two signals are processed by the data selector, and the result is selected according to the binary code value C2; the final signal is passed through the buffer BUF1 to obtain the target delay phase CLK Dn ;CLK DnGet the inverted CLK through the inverter Dn , the two signals are processed by a data selector, and the result is selected according to the binary code value a0. The processed signal generates CLK_I through the D flip-flop DFF2, and the other way passes through the inverter and then generates CLK_Q through the D flip-flop DFF1.
[0075] The sampling clock selection circuit selects the CLK with the target delay phase through the parallel three-bit binary code values C0~C2 output by the digital logic Dn , Figure 5 The output of a0 reflects the CLK RX Phase advance or lag, select CLK through MU2X18 data selector Dn or inverted CLK Dn , corresponding to phase lag and lead respectively, and finally CLK_I and CLK_Q are generated by two D flip-flops DFF1 and DFF2. CLK_I and CLK_Q are orthogonal square wave clocks with a phase difference of 90°, which are used for the subsequent four-phase clock generation circuit to generate CLK1~CLK4.
[0076] Figure 7 This is an example of the four-phase clock generation circuit of this invention, and the output logic is:
[0077]
[0078] The output waveform is Fig. 9 As shown, specifically, CLK_I is converted to generate CI and CI_N signals, CLK_Q is converted to generate CQ and CQ_N signals, CI, CI_N, CQ, CQ_N are combined to generate CLK1~CLK4 signals; among them, CLK1 and CLK2 control the I channel sampling switch, and CLK3 and CLK4 control the Q channel sampling switch.
[0079] Combination Figure 8 , Fig. 9 As shown, Figure 8 is the PCD sampling circuit, Fig. 9 for Figure 8Phase relationship diagram of the four-phase clock in the circuit. CLK1, CLK2, CLK3, and CLK4 drive the two-stage switch of the circuit respectively. When the phase deviation between CLK1 and the carrier is 90°, and the phase deviation between CLK2 and the carrier is 270°, the amplitude of the signal sampled by I-channel is 0; when the phase deviation between CLK1 and the carrier is 0°, and the phase deviation between CLK2 and the carrier is 180°, the amplitude of the signal sampled by I-channel is the maximum. In order to obtain the maximum target field strength, the phase deviation between CLK1 and the carrier should be 0°, and the phase deviation between CLK2 and the carrier should be 180° (or the phase deviation between CLK3 and the carrier should be 0°, and the phase deviation between CLK4 and the carrier should be 180°). At this time, the field strength of I-channel (Q-channel) is the maximum, and the field strength of Q-channel (I-channel) is 0.
[0080] Fig. 9 As shown, the phase deviation between CLK1 and the carrier is 0°, the phase deviation between CLK2 and the carrier is 180°, the phase deviation between CLK3 and the carrier is 90°, and the phase deviation between CLK4 and the carrier is 270°; Fig.11 The figure shows the I and Q sampling results when the phase deviation between CLK1 and the carrier is 0° and the phase deviation between CLK2 and the carrier is 90°.
[0081] Combination Fig. 9 and Fig.10 As shown, when the phase deviation between CLK1 and the carrier is 0°, CLK2 and the carrier is 180°, CLK3 and the carrier is 90°, and CLK4 and the carrier are 270°, the field strength received by the I channel is the largest, and the field strength received by the Q channel is the smallest, which is about 0. In an example scheme, the magnitude of the field strength is quantified by the code value output by a 6-bit ADC. From the code value, the ADC output result of the Q channel Q: ADC, at this time, the code value fluctuates around 011111, and this code value represents the middle value 0, while the I channel ADC outputs 000001 and 111110, which are close to the minimum and maximum values respectively, and the code value difference is the largest. This result is helpful for decoding and improves the detection sensitivity.
[0082] Fig.11 As shown, the clock phase self-calibration method for the NFC chip implemented by the present invention includes the following steps:
[0083] 101, N channels of continuous clock signals with different phases generated by the chip master clock signal.
[0084] The chip's clock delay circuit generates 7 consecutive phase-delayed clock signals based on the PCD master clock signal.
[0085] 102, the RX clock extraction circuit extracts the RX clock signal from the antenna.
[0086] Specifically, the RX clock extraction circuit recovers the clock of the RX signal from the RX signal.
[0087] 103, the phase comparison circuit compares the phase of the RX clock signal with N consecutive clock signals of different phases of the chip; and selects a clock signal whose phase difference with the RX clock signal meets the delay requirement from the N consecutive clock signals of different phases.
[0088] The phase comparison circuit compares the phase of the clock of the 7 continuous phase delayed signals with the phase of the clock extracted from the RX signal, and outputs the comparison result to the digital logic circuit; the digital logic circuit selects the nth phase delayed signal closest to the clock phase extracted from the RX signal according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit.
[0089] 104 , determining that the phase of the clock signal selected in step 103 is the receiving clock phase of the near field communication PCD device.
[0090] 105, generating a sampling clock using the target clock phase.
[0091] The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the n-th phase delay signal and provides them to the four-phase clock generation circuit.
[0092] Then the four-phase clock generation circuit generates sampling clock signals CLK_1 to CLK_4 according to the selected target phase signal, and outputs the CLK_1 to CLK_4 signals to the sampling circuit;
[0093] 106, after being processed by a sampling circuit, the carrier is removed to obtain I-channel and Q-channel signals.
[0094] Specifically, the steps include:
[0095] First, a clock phase adjustment command needs to be received: this enable signal can be valid within 128 cycles of the PCD clock, and phase calibration is performed within 128 cycles of the PCD clock.
[0096] The clock signal is then extracted from the RX signal: the antenna receives the 13.56MHz carrier signal and recovers the RX clock from the carrier signal.
[0097] At the same time, the PCD master clock generates N clock signals with different phase delays: the generated phase contains half a complete cycle (by judging the output result of the lowest bit trigger, it can be determined whether the phase is advanced or delayed, and only the clock signal that satisfies the phase delay of 0 to 180° needs to be generated). The fewer the number of phases is set, the smaller the circuit power consumption area is, and the more the number of phases is set, the closer the target phase is to the RX clock phase.
[0098] Then, compare the RX clock signal with the PCD clock signals with different phase delays: when there are N signals with different phase delays, use N D flip-flops for comparison, with rising edge triggering. When the RX clock phase delay is greater than the nth PCD delayed clock signal, this output is high.
[0099] Select the nth delayed signal whose phase difference meets the conditions: According to the output results of N-way triggers, determine the number of high-level outputs, for example Figure 4 The clock delay circuit shown and Figure 5 The phase comparison circuit shown generates 8 delayed signals. When the D flip-flop has a high level, it represents a phase deviation of 22.5°.
[0100] Finally, a new receiving clock signal is generated according to the nth delayed signal: the target delayed clock signal is selected and input into the four-phase clock generation circuit to generate the four-phase CLK1-CLK4 sampling clock signals.
[0101] In summary, the present invention recovers the clock of the RX signal from the antenna through a clock recovery circuit, generates multiple continuous phase clock signals inside the chip, and uses a trigger to judge the recovered signal clock and the internal multiple continuous phase signal clock, selects the clock signal whose phase difference meets the set requirements, and determines that this clock signal is the receiving clock signal. There is no need to judge the size of the sampled field strength code value, which simplifies the digital logic of the existing solution and shortens the adjustment time.
[0102] The present invention compares the multi-channel continuous phase-delayed clock signal with the RX signal clock, automatically adjusts the phase of the sampling signal, realizes the maximum difference between the I-channel and Q-channel signal amplitudes, and makes the I-channel (Q-channel) sample the maximum signal amplitude. At the same time, the PCD can detect the signal emitted by the PICC card more tiny, and improves the detection sensitivity.
[0103] The present invention is applied in a near field communication PCD chip circuit and solves the problem of clock phase asynchronism between PICC and PCD by calibrating the sampling clock frequency.
[0104] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A clock phase self-calibration circuit for NFC chip, Features: It includes RX clock extraction circuit, clock delay circuit, phase comparison circuit, digital logic circuit, sampling clock selection circuit, four-phase clock generation circuit and sampling circuit; Among them, the RX clock extraction circuit and the clock delay circuit are connected to the phase comparison circuit, and output CLK to the phase comparison circuit. RX ,CLK D0 ,CLK D1 ,……,CLK D7 The signal, phase comparison circuit, digital logic circuit, sampling clock selection circuit, four-phase clock generation circuit, and sampling circuit are connected in sequence; The RX clock extraction circuit recovers the RX clock from the RX signal and transmits it to the phase comparison circuit; The clock delay circuit generates 7-way continuous phase-delayed clock signals according to the PCD main clock signal, and the clock signals are also transmitted to the phase comparison circuit for comparison; The phase comparison circuit compares the phases of the 7-way continuously phase-delayed clock signals and the clock extracted from the RX signal, and outputs the comparison result to the digital logic circuit; The digital logic circuit selects the nth phase delay signal closest to the RX extraction clock phase according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit; The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the nth phase delay signal and transmits them to the four-phase clock generation circuit; The four-phase clock generation circuit generates sampling clock signals CLK1 to CLK4 according to the selected target phase signal, and outputs the CLK1 to CLK4 signals to the sampling circuit; The sampling circuit removes the carrier according to the sampling clock signal and separates the I-channel and Q-channel signals; The clock delay circuit includes an inverter and a capacitor, the inverters are connected in series and then in parallel with the capacitor, and the clock signal is obtained from between the inverters; CLK PCD is the start signal and the clock signal of PCD. This signal is phase-delayed by the inverter and capacitor to obtain the signal CLK with zero delay. D0 , delay td of signal CLK D1 , delayed by 2td, signal CLK D2 ... and so on, the signal CLK delayed by 7td D7 ; The sampling clock selection circuit is composed of a D flip-flop, a data selector, a buffer and an inverter; CLK D0 ~CLK D7 Divided into four groups and processed by the data selector, according to the binary code value C 0 Selection result: The processed signals are reduced by half to four, and these four signals are divided into two groups and processed by the data selector according to the binary code value C 1 Selection result; after further processing, two signals are generated, which are processed by the data selector according to the binary code value C 2 Select the result; the final signal passes through the buffer BUF 1 Get the target delay phase CLK Dn ;CLK Dn Get the inverted CLK through the inverter Dn , two signals pass through MU2X1 8 Data selector processing, according to the binary code value a 0 As a result of the selection, the processed signal passes through the D flip-flop DFF2 to generate CLK_I, and the other way passes through the inverter and then passes through the D flip-flop DFF1 to generate CLK_Q.
2. The clock phase self-calibration circuit for an NFC chip as claimed in claim 1, Features: The phase comparison circuit is composed of a D flip-flop, which converts the phase-delayed signal CLK D0 ~CLK D7 Respectively with the CLK extracted from the PICC RX The clock signal is compared and the final output is a 0 ~a 7 Eight-bit binary signal.
3. The clock phase self-calibration circuit for an NFC chip as claimed in claim 1, Features: CLK_I and CLK_Q are generated into CLK1 to CLK4 through a four-phase clock generation circuit; among them, CLK1 and CLK2 control the I channel sampling switch, and CLK3 and CLK4 control the Q channel sampling switch.
4. A clock phase self-calibration method for NFC chip, Features: The method uses the clock phase self-calibration circuit for the NFC chip as claimed in claim 1 to realize self-calibration, wherein the self-calibration circuit includes an RX clock extraction circuit, a clock delay circuit, a phase comparison circuit, a digital logic circuit, a sampling clock selection circuit, a four-phase clock generation circuit, and a sampling circuit, and includes the following steps: 101, generating N channels of continuous clock signals with different phases of a chip master clock signal; 102, an RX clock extraction circuit extracts an RX clock from an antenna; 103, the phase comparison circuit performs phase comparison between the RX clock signal and N consecutive clock signals of different phases of the chip; and selects a clock signal whose phase difference with the RX clock signal meets the delay requirement from the N consecutive clock signals of different phases; The phase comparison circuit compares the phases of the clocks of the 7-channel continuous phase delay signals with the phase of the clock extracted from the RX signal, and outputs the comparison result to the digital logic circuit; The digital logic circuit selects the nth phase delay signal closest to the clock phase extracted from the RX signal according to the comparison result output by the phase comparator, and outputs it to the sampling clock selection circuit; 104, determining that the phase of the clock signal selected in step 103 is the receiving clock phase of the near field communication PCD device; 105, generating a sampling clock using the target clock phase; The sampling clock selection circuit generates CLK_I and CLK_Q signals according to the n-th phase delay signal and provides them to the four-phase clock generation circuit; Then the four-phase clock generation circuit generates sampling clock signals CLK_1 to CLK_4 according to the selected target phase signal, and outputs the CLK_1 to CLK_4 signals to the sampling circuit; 106, generating I-channel and Q-channel signals through a sampling circuit.
5. The clock phase self-calibration method for an NFC chip as claimed in claim 4, Features: In step 102, the RX clock extraction circuit inputs the RX signal and the VMID signal, where RX is the signal coupled from the PICC by the PCD through the antenna, and the VMID signal is half the power supply voltage. The RX and VMID signals are compared with each other to extract the PICC clock signal CLK. RX .
6. The clock phase self-calibration method for an NFC chip as claimed in claim 4, Features: In the clock delay circuit, CLK PCD The clock signal of PCD is 27.12MHz. After phase delay by inverter and capacitor, the signal CLK with zero delay is obtained. D0 , delay td of signal CLK D1 , delayed by 2td, signal CLK D2 ... and so on, the signal CLK delayed by 7td D7 ; In step 103, the phase comparison circuit compares the phase-delayed signal CLK D0 ~CLK D7 Respectively with the CLK extracted from the PICC RX The clock signal is compared and the final output is a 0 ~a 7 Eight-bit binary signal; D flip-flop is rising edge triggered, when CLK RX Phase delay exceeds the corresponding generated CLK Dn phase, Q outputs high level, when CLK RX The phase delay does not reach the corresponding generated CLK Dn Phase, Q outputs low level, and a 0 ~a 7 The output high or low state is continuous. The digital logic circuit counts the number of high levels and converts it into a 3-bit binary code value. This code value represents CLK RX Phase corresponding to the nth CLK Dn Signal, n=0...
7.
7. The clock phase self-calibration method for an NFC chip as claimed in claim 6, Features In step 105, the sampling clock selection circuit outputs a parallel three-bit binary code value C through digital logic. 0 ~C 2 , select the target delay phase CLK Dn , through MU2X1 8 Data selector selects CLK Dn and inverted CLK Dn , corresponding to phase lag and lead respectively, and finally through two D flip-flops DFF 1 and DFF 2 Generate CLK_I and CLK_Q, CLK_I and CLK_Q are orthogonal square wave clocks with a phase difference of 90°, which are used for the subsequent four-phase clock generation circuit to generate CLK1~CLK4; among them, CLK1 and CLK2 control the I channel sampling switch, and CLK3 and CLK4 control the Q channel sampling switch.
8. The clock phase self-calibration method for an NFC chip as claimed in claim 7, Features CLK1 and CLK2 control the sampling switch of channel I, and CLK3 and CLK4 control the sampling switch of channel Q; when CLK1 deviates from the carrier phase by 90° and CLK2 deviates from the carrier phase by 270°, the amplitude of the signal sampled by channel I is 0; when CLK1 deviates from the carrier phase by 0° and CLK2 deviates from the carrier phase by 180°, the amplitude of the signal sampled by channel I is the maximum; so that when CLK1 deviates from the carrier phase by 0° and CLK2 deviates from the carrier phase by 180°, the field strength of channel I is the maximum and the field strength of channel Q is 0; or when CLK3 deviates from the carrier phase by 0° and CLK4 deviates from the carrier phase by 180°, the field strength of channel Q is the maximum and the field strength of channel I is 0.
