Dual-mode switching frequency control system
By adopting a dual-mode switching frequency control system in the switching power supply, using components such as oscillators, phase detectors, and loop filters to achieve rapid switching between RT mode and PLL mode, the problem of single-mode switching frequency control in the existing technology is solved. , improving the efficiency of frequency synchronization.
Patent Information
- Application Number
- CN202111462723.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-12-02
AI Technical Summary
The switching frequency control system in the existing switching power supply has a single mode, which is difficult to meet the needs of various application scenarios. It cannot quickly switch between RT mode and PLL mode, causing the frequency of the clock signal output by the oscillator to be synchronized to the frequency of the external clock signal. The setup time required is longer.
A dual-mode switching frequency control system is adopted, including an oscillator, phase detector and loop filter, and RT is realized through components such as a mode conversion circuit, a current mirror circuit, a minimum frequency circuit, a frequency maintenance circuit, a ramp voltage generation circuit and a comparator. Switch between mode and PLL mode, and control the voltage VCONT to synchronize the oscillator to the external clock signal when exiting from the lowest frequency operating state in PLL mode.
It realizes fast switching between RT mode and PLL mode, shortens the establishment time required to synchronize the clock signal frequency output by the oscillator to the external clock signal frequency, solves the problem of single mode control of switching frequency, and improves the flexibility and flexibility of the system. efficiency.
Smart Images

Figure CN113992004B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a dual-mode switching frequency control system. Background Art
[0002] Switching power supplies are widely used in the field of integrated circuits. Switching power supplies are high-frequency power conversion devices that convert a voltage level into the voltage or current required by the user through different forms of architecture. The switching frequency control system mode in existing switching power supplies is single and difficult to meet the needs of various application scenarios.
[0003] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0004] The object of the present invention is to provide a dual-mode switching frequency control system, which adopts dual modes to control the switching frequency.
[0005] To achieve the above objective, an embodiment of the present invention provides a dual-mode switching frequency control system, including: an oscillator, a phase detector, and a loop filter.
[0006] In RT mode, the oscillator can output a clock signal CLOCK of a preset frequency; in PLL mode, the oscillator can output a clock signal CLOCK synchronized with an external clock signal CLK_SYNC; in RT mode and / or PLL mode, and when the oscillator operates in the lowest frequency operating state, it can output a clock signal CLOCK of the lowest frequency.
[0007] In the PLL mode, the phase detector is used to compare the clock signal CLOCK with the external clock signal CLK_SYNC to generate an error voltage corresponding to the phase difference between the clock signal CLOCK and the external clock signal CLK_SYNC.
[0008] In PLL mode, the loop filter is used to eliminate high-frequency signals and noise signals in the error voltage and output a control voltage VCONT_PRE for controlling the oscillator. Under the control of the control voltage VCONT_PRE, the clock signal CLOCK output by the oscillator can be synchronized to the external clock signal CLK_SYNC.
[0009] In one or more embodiments of the present invention, the oscillator includes a mode conversion circuit, a current mirror circuit, a minimum frequency circuit, a frequency maintenance circuit, a ramp voltage generation circuit, a comparator, a logic circuit and a buffer BUFFER; wherein the mode conversion circuit is used to output a corresponding current through the current mirror circuit according to a corresponding control voltage in RT mode and / or PLL mode; the minimum frequency circuit is used to make the oscillator output a clock signal CLOCK with a minimum frequency; the frequency maintenance circuit is used to maintain the frequency corresponding to the control voltage VCONT_PRE in RT mode; the ramp voltage generation circuit is used to output a corresponding ramp voltage V according to the current output by the current mirror circuit RAMP The comparator is used to convert the ramp voltage V RAMP and reference voltage V REF_OSC After comparison, the clock signal CLOCK is output through the logic circuit and buffer BUFFER in sequence.
[0010] In one or more embodiments of the present invention, the minimum frequency circuit includes a PMOS transistor P7, a resistor R3, a capacitor C3, a PMOS transistor P4 and a bias current source IBIAS2_FMIN;
[0011] Among them, the drain of the PMOS tube P7 is grounded through the resistor R3, the gate of the PMOS tube P7 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the gate of the PMOS tube P7 is also connected to the drain of the PMOS tube P4, the source of the PMOS tube P7 is connected to the gate of the PMOS tube P4, the current mirror circuit and the frequency maintenance circuit, and the source of the PMOS tube P4 is connected to the power supply VDD.
[0012] In one or more embodiments of the present invention, the mode conversion circuit includes a resistor R2, an NMOS tube N3, a bias current source IBIAS1, an operational amplifier, a switch S3, a switch S4, a switch S5, a switch S6, a resistor R SET , resistor R PLL , NMOS tube N4;
[0013] The positive input terminal of the operational amplifier is connected to the reference voltage V via switch S3. REF One end of the resistor R2 is connected to the power supply VDD, and the other end is connected to the drain of the NMOS tube N3. The gate of the NMOS tube N3 is connected to the control voltage VCONT_PRE. The source of the NMOS tube N3 is grounded through the bias current source IBIAS1. The source of the NMOS tube N3 is connected to the positive input terminal of the operational amplifier through the switch S4. The negative input terminal of the operational amplifier is connected to the resistor R through the switch S5. SET Connect the resistor RSET The other end of the op amp is grounded, and the negative input terminal of the op amp is connected to the resistor R through the switch S6. PLL Connect the resistor R PLL The other end of the NMOS tube N4 is grounded, the drain of the NMOS tube N4 is connected to the current mirror circuit, the gate of the NMOS tube N4 is connected to the output end of the operational amplifier, and the source of the NMOS tube N4 is connected to the negative input end of the operational amplifier.
[0014] In one or more embodiments of the present invention, the current mirror circuit includes a PMOS tube P3 and a PMOS tube P6, the source of the PMOS tube P3 is connected to the power supply VDD, the drain and the gate of the PMOS tube P3 are short-circuited and connected to the gate of the PMOS tube P6 as well as the frequency maintenance circuit, the minimum frequency circuit and the mode conversion circuit, the source of the PMOS tube P6 is connected to the power supply VDD, and the drain of the PMOS tube P6 is connected to the ramp voltage generating circuit and the positive input terminal of the comparator.
[0015] In one or more embodiments of the present invention, the frequency maintaining circuit includes a PMOS tube P5, an NMOS tube N5, a resistor R4 and a switch S7, the source of the PMOS tube P5 is connected to a power supply VDD, the gate of the PMOS tube P5 is connected to the current mirror circuit and the minimum frequency circuit, the drain of the PMOS tube P5 is connected to the output end of the loop filter and the input end of the oscillator, the drain and the gate of the NMOS tube N5 are short-circuited and connected to the drain of the PMOS tube P5 through the switch S7, the source of the NMOS tube N5 is grounded through the resistor R4, and in the RT mode, the switch S7 is in a closed state.
[0016] In one or more embodiments of the present invention, the ramp voltage generating circuit includes an NMOS tube N6 and a capacitor Cosc, one end of the capacitor Cosc is connected to the drain of the NMOS tube N6 and the positive input terminal of the comparator, and the other end is connected to the source of the NMOS tube N6 and grounded at the same time, and the gate of the NMOS tube N6 is connected to the output terminal of the logic circuit.
[0017] In one or more embodiments of the present invention, in RT mode, the frequency f1 of the clock signal CLOCK is expressed as:
[0018] f1=K*[V REF / (R SET *C OSC *V REF_OSC )];
[0019] In the PLL mode, the frequency f2 of the clock signal CLOCK is expressed as:
[0020] f2=K*[VCONT / (R PLL *C OSC *V REF_OSC )]=f CLK_SYNC ;
[0021] Among them, K is the ratio of the number of PMOS tubes P6 and PMOS tubes P3, V CONT is the control voltage at the source of NMOS tube N3, f CLK_SYNC is the frequency of the external clock signal CLK_SYNC.
[0022] The present invention also discloses a dual-mode switching frequency control system, comprising: a first phase-locked loop, wherein the first phase-locked loop comprises a phase detector, a loop filter and a first oscillator;
[0023] In the PLL mode, the first oscillator can output a clock signal CLOCK synchronized with the external clock signal CLK_SYNC; in the RT mode and / or PLL mode, when the first oscillator operates in the lowest frequency operating state, it can output the lowest frequency clock signal CLOCK;
[0024] A second oscillator, capable of forming a second phase-locked loop with the first oscillator through switching;
[0025] The second oscillator can output a clock signal CLK_OSC2 synchronized to an external clock signal CLK_SYNC, and the second oscillator provides a control voltage VCONT corresponding to the frequency of the external clock signal CLK_SYNC; through the control voltage VCONT, the clock signal CLOCK output by the first oscillator when it is in PLL mode and exits from the lowest frequency working state can skip the abnormal state and synchronize to the external clock signal CLK_SYNC.
[0026] In one or more other embodiments of the present invention, in the RT mode, the first oscillator can output a clock signal CLOCK of a preset frequency.
[0027] In another one or more embodiments of the present invention, the dual-mode switching frequency control system also includes a first selector and a second selector, the I0 input and output of the first selector are connected to the first oscillator, the I1 input of the first selector is connected to the second oscillator, the I0 input of the second selector is connected to the output of the first oscillator, the I1 input of the second selector is connected to the output of the second oscillator, and the output of the second selector is connected to the input of the phase detector, and switching between the first oscillator and the second oscillator can be achieved through the first selector and the second selector.
[0028] In another one or more embodiments of the present invention, the first oscillator includes a mode conversion circuit, a first current mirror circuit, a minimum frequency circuit, a frequency maintaining circuit, a first ramp voltage generating circuit, a first comparator, a first logic circuit and a buffer BUFFER2, the mode conversion circuit, the first ramp voltage generating circuit and the first comparator are all connected to the first current mirror circuit, and the first current mirror circuit, the minimum frequency circuit and the frequency maintaining circuit are all connected to the first selector;
[0029] The mode conversion circuit is used to output the corresponding mirror current through the first current mirror circuit in the RT mode; the minimum frequency circuit is used to enable the first oscillator to output the clock signal CLOCK with the lowest frequency; the frequency maintenance circuit is used to maintain the frequency corresponding to the control voltage VCONT in the RT mode; the first ramp voltage generating circuit is used to output the corresponding ramp voltage V according to the mirror current output by the first current mirror circuit. RAMP1 The first comparator is used to convert the ramp voltage V RAMP1 and reference voltage V REF_OSC After comparison, the clock signal CLOCK is output through the first logic circuit and the buffer BUFFER2.
[0030] In one or more embodiments of the present invention, the mode conversion circuit includes an operational amplifier, a switch S3, a resistor R SET and NMOS tube N5;
[0031] The positive input terminal of the op amp is connected to the reference voltage V REF The negative input terminal of the operational amplifier is connected to the resistor R through the switch S3. SET One end of the resistor R SET The other end of the operational amplifier is grounded, the negative input end of the operational amplifier is connected to the source of the NMOS tube N5, the gate of the NMOS tube N5 is connected to the output end of the operational amplifier, the drain of the NMOS tube N5 is connected to the first current mirror circuit, and in the RT mode, the switch S3 is in a closed state.
[0032] In another one or more embodiments of the present invention, the first current mirror circuit includes a PMOS tube P5 and a PMOS tube P8, the source of the PMOS tube P5 is connected to the power supply VDD, the drain and the gate of the PMOS tube P5 are short-circuited and connected to the mode conversion circuit and the I0 input end of the first selector, the gate of the PMOS tube P8 is connected to the output end of the first selector, the source of the PMOS tube P8 is connected to the power supply VDD, and the drain of the PMOS tube P8 is connected to the positive input end of the first comparator.
[0033] In another one or more embodiments of the present invention, the minimum frequency circuit includes a PMOS transistor P9, a resistor R3, a capacitor C3, a PMOS transistor P6 and a bias current source IBIAS2_FMIN;
[0034] Among them, the drain of the PMOS tube P9 is grounded through the resistor R3, the gate of the PMOS tube P9 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the source of the PMOS tube P9 is connected to the I0 input end of the first selector, the gate of the PMOS tube P9 is connected to the drain of the PMOS tube P6, the gate of the PMOS tube P6 is connected to the I0 input end of the first selector, and the source of the PMOS tube P6 is connected to the power supply VDD.
[0035] In another one or more embodiments of the present invention, the frequency maintaining circuit includes a PMOS transistor P7, a switch S4, an NMOS transistor N6 and a resistor R4;
[0036] Among them, the source of the PMOS tube P7 is connected to the power supply VDD, the gate of the PMOS tube P7 is connected to the I0 input end of the first selector, the drain of the PMOS tube P7 is connected to one end of the switch S4 and the output end of the loop filter, the drain and the gate of the NMOS tube N6 are short-circuited and connected to the other end of the switch S4, the source of the NMOS tube N6 is grounded through the resistor R4, and in the RT mode, the switch S4 is in a closed state.
[0037] In one or more embodiments of the present invention, the first ramp voltage generating circuit includes an NMOS transistor N7 and a capacitor C OSC1 , the capacitor C OSC1 One end is connected to the drain of the NMOS tube N7 and the positive input end of the first comparator, the other end is connected to the source of the NMOS tube N7 and is grounded at the same time, and the gate of the NMOS tube N7 is connected to the output end of the first logic circuit.
[0038] In one or more embodiments of the present invention, the second oscillator includes an NMOS transistor N3, a resistor R2, a PMOS transistor P3, a PMOS transistor P4, an NMOS transistor N4, a capacitor C OSC2 , a second comparator, a second logic circuit and a buffer BUFFER3;
[0039] The gate of the NMOS tube N3 is connected to the output end of the loop filter, the source of the NMOS tube N3 is grounded through the resistor R2, the source of the NMOS tube N3 is connected to the input end I1 of the first selector, the drain and gate of the PMOS tube P3 are short-circuited and connected to the drain of the NMOS tube N3 and the gate of the PMOS tube P4, the source of the PMOS tube P3 is connected to the power supply VDD, the source of the PMOS tube P4 is connected to the power supply VDD, the drain of the PMOS tube P4 is connected to the positive input end of the second comparator, and the capacitor C OSC2 One end of the capacitor C is connected to the drain of the NMOS tube N4 and the positive input terminal of the second comparator. OSC2 The other end of the NMOS tube N4 is connected to the source and grounded, the gate of the NMOS tube N4 is connected to the output end of the second logic circuit, and the negative input end of the second comparator is connected to the reference voltage V REF_OSC The output end of the second comparator is connected to the input end of the buffer BUFFER3 through the second logic circuit, and the output end of the buffer BUFFER3 is connected to the I1 input end of the second selector.
[0040] Compared with the prior art, the dual-mode switching frequency control system and the improved control system of the embodiments of the present invention can realize mutual switching between the RT mode and the PLL mode, and the phase-locked loop has a fast establishment speed, which can shorten the establishment time required for the frequency of the clock signal CLOCK output by the oscillator to be synchronized to the frequency of the external clock signal CLK_SYNC when switching between the two modes, and effectively solves the problem of single-mode control of the switching frequency in general switching power supplies. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a circuit schematic diagram of a dual-mode switching frequency control system according to an embodiment of the present invention;
[0042] Figure 2 is a circuit schematic diagram of a phase detector according to an embodiment of the present invention;
[0043] Figure 3 is a circuit schematic diagram of a loop filter according to an embodiment of the present invention;
[0044] Figure 4 is a circuit diagram of an oscillator according to an embodiment of the present invention;
[0045] Figure 5 is a circuit timing diagram of a dual-mode switching frequency control system according to an embodiment of the present invention;
[0046] Figure 6is a circuit schematic diagram of a dual-mode switching frequency control system according to another embodiment of the present invention;
[0047] Figure 7 is a circuit schematic diagram of a phase detector and a second selector according to another embodiment of the present invention;
[0048] Figure 8 is a circuit schematic diagram of a loop filter according to another embodiment of the present invention;
[0049] Fig. 9 is a circuit schematic diagram of a first oscillator according to another embodiment of the present invention;
[0050] Fig.10 is a circuit schematic diagram of a second oscillator according to another embodiment of the present invention;
[0051] Fig.11 is a circuit timing diagram of a dual-mode switching frequency control system according to another embodiment of the present invention. DETAILED DESCRIPTION
[0052] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.
[0053] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0054] Example 1
[0055] like Figure 1 As shown, a dual-mode switching frequency control system includes: an enabling circuit 10, a mode determination circuit 20, a phase detector 30, a loop filter 40 and an oscillator 50.
[0056] The enable circuit 10 outputs an enable signal EN according to the input signal EN_CK. The enable signal EN is the enable signal of the entire switching frequency control system. When the input signal EN_CK and the enable signal EN are equal, and both are "1", the entire switching frequency control system works normally. When the enable signal EN is "0", the entire switching frequency control system does not work. Therefore, the following analysis is based on the premise that the enable signal EN is "1". The input signal FORCE_FMIN is used to characterize whether the system works at the lowest frequency and outputs the enable signal EN1 through the enable circuit 10 at the same time. When the input signal FORCE_FMIN is "1", the enable signal EN1 will be set to "0", indicating that the system works at the lowest frequency state.
[0057] The mode determination circuit 20 has an RT / SYNC terminal for determining whether the oscillator 50 operates in the RT mode and / or the PLL mode. The mode determination circuit 20 can output an external clock signal CLK_SYNC, a control signal RT_MODE for switching the oscillator 50 to the RT mode, and a control signal PLL_MODE for switching the oscillator 50 to the PLL mode. The mode determination circuit 20 is controlled by an enable signal EN.
[0058] In this embodiment, when only a resistor R is connected between the RT / SYNC terminal and the ground SET , resistor R SET is an external resistor, then the mode determination circuit 20 outputs the control signal RT_MODE as "1" and the control signal PLL_MODE as "0", and the oscillator 50 operates in the RT mode. At this time, if the input signal FORCE_FMIN is "0", the operating frequency of the oscillator 50 is determined by the resistor R SET The value of ; when the external clock signal CLK_SYNC is directly connected to the RT / SYNC terminal, the mode determination circuit outputs the control signal PLL_MODE as "1" and the control signal RT_MODE as "0". At this time, the oscillator 50 operates in the PLL mode. If the input signal FORCE_FMIN is "0", the frequency of the clock signal CLOCK output by the oscillator 50 is synchronized to the frequency of the external clock signal CLK_SYNC through the phase detector 30 and the loop filter 40. If both exist at the same time, the PLL mode will cover the RT mode through automatic detection, the mode determination circuit 20 outputs the control signal PLL_MODE as "1" and the control signal RT_MODE as "0", and the oscillator 50 operates in the PLL mode.
[0059] In this embodiment, the phase detector 30 is a phase comparison module. The phase detector 30 can compare the clock signal CLOCK with the external clock signal CLK_SYNC to generate an error voltage corresponding to the phase difference between the clock signal CLOCK and the external clock signal CLK_SYNC.
[0060] like Figure 2 As shown, the phase detector 30 includes a D flip-flop D1, a D flip-flop D2, an AND gate AND1, an inverter INV1, a PMOS transistor P1, a PMOS transistor P2, an NMOS transistor N1, an NMOS transistor N2, a switch S1, a switch S2 and a unit gain amplifier A1.
[0061] Specifically, the input CK terminal of the D flip-flop D1 is connected to the mode determination circuit 20 to receive the external clock signal CLK_SYNC, and the input D terminal of the D flip-flop D1 is connected to the power supply VDD. The input CK terminal of the D flip-flop D2 is connected to the output terminal of the oscillator 50 to receive the clock signal CLOCK output by the oscillator 50, and the input D terminal of the D flip-flop D2 is connected to the power supply VDD. The output Q terminal of the D flip-flop D1 is connected to the A1 input terminal of the AND gate AND1, and the output Q terminal of the D flip-flop D2 is connected to the A2 input terminal of the AND gate AND1. The output terminal of the AND gate AND1 is connected to the input terminal of the inverter INV1, and the output terminal of the inverter INV1 is simultaneously connected to the R reset terminals of the D flip-flop D1 and the D flip-flop D2. The output QN terminal of the D flip-flop D1 is connected to the gate of the PMOS tube P2, and the output Q terminal of the D flip-flop D2 is connected to the gate of the NMOS tube N1. The source of the PMOS tube P2 is connected to the drain of the PMOS tube P1, the source of the PMOS tube P1 is connected to the power supply VDD, and the gate of the PMOS tube P1 is connected to the bias voltage VB1. The source of the NMOS tube N1 is connected to the drain of the NMOS tube N2, the source of the NMOS tube N2 is grounded, and the gate of the NMOS tube N2 is connected to the bias voltage VB2. The source of the PMOS tube P2 is connected to one end of the switch S1, the drain of the NMOS tube N2 is connected to one end of the switch S2, and the other end of the switch S1 is connected to the other end of the switch S2 and connected to the output end of the unit gain amplifier A1. The drain of the NMOS tube N1 is connected to the drain of the PMOS tube P2 and is connected to the input end of the unit gain amplifier A1 and the loop filter 40, so as to output an error voltage corresponding to the phase difference between the clock signal CLOCK and the external clock signal CLK_SYNC to the loop filter 40.
[0062] In this embodiment, the loop filter 40 is used to eliminate the high-frequency signal and noise signal in the error voltage and output the control voltage VCONT_PRE for controlling the oscillator 50. The high-frequency signal and noise signal in the error voltage are eliminated to meet the performance required by the loop in the PLL mode, thereby increasing the stability of the system.
[0063] like Figure 3 As shown, the loop filter 40 includes a resistor R1, a capacitor C1 and a capacitor C2. Specifically, one end of the capacitor C1 and the capacitor C2 are both grounded, the other end of the capacitor C1 is connected to one end of the resistor R1, the other end of the resistor R1 is connected to the other end of the capacitor C2 and connected to the output end of the phase detector 30 to receive the error voltage, and is also connected to the input end of the oscillator 50 to output the control voltage VCONT_PRE to the oscillator 50.
[0064] In this embodiment, the oscillator 50 can operate in the RT mode and / or the PLL mode. The RT mode and the PLL mode can be switched with each other. In the RT mode or the PLL mode, the switching frequency of the switching power supply can be generated.
[0065] like Figure 4 As shown, the oscillator 50 includes a mode conversion circuit 51, a current mirror circuit 52, a minimum frequency circuit 53, a frequency maintaining circuit 54, a ramp voltage generating circuit 55, a comparator, a logic circuit and a buffer BUFFER.
[0066] The mode conversion circuit 51 is used to output a corresponding current through the current mirror circuit 52 according to a corresponding control voltage in the RT mode and / or the PLL mode.
[0067] like Figure 4 As shown, the mode conversion circuit 51 includes a resistor R2, an NMOS tube N3, a bias current source IBIAS1, an operational amplifier, a switch S3, a switch S4, a switch S5, a switch S6, a resistor R SET , resistor R PLL , NMOS tube N4.
[0068] Specifically, the positive input terminal of the op amp is connected to the reference voltage V via switch S3. REF One end of the resistor R2 is connected to the power supply VDD, and the other end is connected to the drain of the NMOS tube N3. The gate of the NMOS tube N3 is connected to the control voltage VCONT_PRE, and the source of the NMOS tube N3 is grounded through the bias current source IBIAS1. The source of the NMOS tube N3 is also connected to the positive input terminal of the op amp through the switch S4. The negative input terminal of the op amp is connected to the resistor R through the switch S5. SET Connection, resistor R SET The other end of the op amp is connected to the ground through switch S6 and resistor R PLL Connection, resistor R PLL The other end of the NMOS tube N4 is grounded. The drain of the NMOS tube N4 is connected to the current mirror circuit 52, the gate of the NMOS tube N4 is connected to the output end of the operational amplifier, and the source of the NMOS tube N4 is connected to the negative input end of the operational amplifier.
[0069] In this embodiment, the operational amplifier is controlled by the enable signal EN1. When the input signal FORCE_FMIN is "1", the enable signal EN1 is set to "0". At this time, the operational amplifier is turned off and the oscillator 50 operates at the lowest frequency state.
[0070] In the RT mode, the switch S3 and the switch S5 are in the closed state, and the switch S4 and the switch S6 are in the open state. The switch S3 and the switch S5 are both controlled by the control signal RT_MODE. When the control signal RT_MODE is "1" and the control signal PLL_MODE is "0", the switch S3 and the switch S5 are both closed, so that the mode conversion circuit 51 enters the RT mode.
[0071] In the PLL mode, the switch S4 and the switch S6 are in a closed state, and the switch S3 and the switch S5 are in an open state. The switch S4 and the switch S6 are both controlled by the control signal PLL_MODE. When the control signal PLL_MODE is "1" and the control signal RT_MODE is "0", the switch S4 and the switch S6 are both closed, so that the mode conversion circuit 51 enters the PLL mode. At this time, the source of the NMOS tube N3 outputs the control voltage VCONT to the positive input terminal of the operational amplifier.
[0072] like Figure 4 As shown, the current mirror circuit 52 includes a PMOS tube P3 and a PMOS tube P6. The source of the PMOS tube P3 is connected to the power supply VDD, the drain and the gate of the PMOS tube P3 are short-circuited and connected to the gate of the PMOS tube P6, the frequency maintenance circuit 54, the minimum frequency circuit 54 and the mode conversion circuit 51. Specifically, the drain and the gate of the PMOS tube P3 are short-circuited and connected to the drain of the NMOS tube N4. The source of the PMOS tube P6 is connected to the power supply VDD, and the drain of the PMOS tube P6 is connected to the ramp voltage generating circuit 55 and the positive input terminal of the comparator.
[0073] In this embodiment, the minimum frequency circuit 53 is used to make the oscillator 50 output the clock signal CLOCK with the minimum frequency. When the operational amplifier is turned off, the oscillator 50 is adjusted by the minimum frequency circuit 53 to operate at the minimum frequency.
[0074] like Figure 4 As shown, the minimum frequency circuit 53 includes a PMOS transistor P7, a resistor R3, a capacitor C3, a PMOS transistor P4 and a bias current source IBIAS2_FMIN.
[0075] Among them, the drain of the PMOS tube P7 is grounded through the resistor R3, the gate of the PMOS tube P7 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the gate of the PMOS tube P7 is also connected to the drain of the PMOS tube P4, the source of the PMOS tube P7 is connected to the gate of the PMOS tube P4, the current mirror circuit 52 and the frequency maintenance circuit 54. Specifically, the source of the PMOS tube P7 is simultaneously connected to the drain and gate short-circuit terminals of the PMOS tube P3, and the source of the PMOS tube P4 is connected to the power supply VDD.
[0076] In this embodiment, in the RT mode, the frequency maintaining circuit 54 is used to maintain the frequency corresponding to the control voltage VCONT_PRE.
[0077] like Figure 4 and Figure 1As shown, the frequency maintaining circuit 54 includes a PMOS tube P5, an NMOS tube N5, a resistor R4 and a switch S7. The source of the PMOS tube P5 is connected to the power supply VDD, and the gate of the PMOS tube P5 is connected to the current mirror circuit 52. Specifically, the gate of the PMOS tube P5 is connected to the drain and the gate short-circuited end of the PMOS tube P3. The drain of the PMOS tube P5 is connected to the output end of the loop filter 40 and the input end of the oscillator 50. Specifically, the drain of the PMOS tube P5 is connected to the drain of the PMOS tube P2, the drain of the NMOS tube N1, the gate of the NMOS tube N3, the resistor R1 and the capacitor C2. The drain and gate of the NMOS tube N5 are short-circuited and connected to the drain of the PMOS tube P5 through the switch S7, and the source of the NMOS tube N5 is grounded through the resistor R4.
[0078] In RT mode, switch S7 is in a closed state. Switch S7 is controlled by control signal RT_MODE. When control signal RT_MODE is "1", switch S7 is closed, so that frequency maintenance circuit 54 enters RT mode. At this time, the control voltage VCONT_PRE at the input end of oscillator 50 is consistent with the voltage at the drain of PMOS tube P5. Finally, it is ensured that the control voltage VCONT output at the source of NMOS tube N3 is maintained at the corresponding frequency. As a result, when oscillator 50 switches from RT mode to PLL mode, control voltage VCONT does not need to gradually increase from "0", which speeds up the establishment of phase-locked loop and shortens the establishment time required for the frequency of clock signal CLOCK output by oscillator 50 to be synchronized to the frequency of external clock signal CLK_SYNC when oscillator 50 switches between two modes.
[0079] In this embodiment, the ramp voltage generating circuit 55 is used to output a corresponding ramp voltage V according to the current output by the current mirror circuit 52. RAMP .
[0080] like Figure 4 As shown, the ramp voltage generating circuit 55 includes an NMOS transistor N6 and a capacitor Cosc. One end of the capacitor Cosc is connected to the drain of the NMOS transistor N6 and the positive input end of the comparator, and the other end is connected to the source of the NMOS transistor N6 and grounded at the same time. The gate of the NMOS transistor N6 is connected to the output end of the logic circuit.
[0081] like Figure 4 As shown, the comparator is used to convert the ramp voltage V RAMP and reference voltage V REF_OSC After comparison, a clock signal CLOCK is output through a logic circuit and a buffer BUFFER. The output end of the comparator is connected to the input end of the logic circuit, and the output end of the logic circuit is connected to the input end of the buffer BUFFER.
[0082] When the oscillator 50 operates in RT mode, the control signal RT_MODE is "1", and the positive input terminal of the operational amplifier is connected to the reference voltage V REF From the characteristics of the op amp, we know that the voltage at the positive input of the op amp is equal to the voltage at the negative input. Therefore, the voltage applied to the resistor R SET The voltage across the two ends is equal to the reference voltage V REF . From this, we can get the current flowing through the resistor R SET The current is equal to V REF / R SET , which is equal to the current flowing through the NMOS tube N4 and the current flowing through the PMOS tube P3. This current is mirrored by the current mirror circuit 52 so that the current flowing through the PMOS tube P6 is equal to K*(V REF / R SET ), where the proportionality coefficient K is the ratio of the number of PMOS tubes P6 to the number of PMOS tubes P3. The current flowing through the PMOS tube P6 has an effect on the capacitor C OSC The voltage is charged to obtain a linearly increasing ramp voltage, and the reset signal RST generated by the logic circuit switches the capacitor C OSC The voltage at both ends is discharged, thus obtaining a slope voltage V RAMP . V RAMP Voltage and reference voltage V REF_OSC The signal obtained by comparison is output as a clock signal CLOCK through a logic circuit and a buffer BUFFER. The frequency f1 of the clock signal CLOCK is expressed as f1 = K*[V REF / (R SET *C OSC *V REF_OSC )], where K is the ratio of the number of PMOS tubes P6 to the number of PMOS tubes P3.
[0083] When the oscillator 50 works in the PLL mode, the control signal PLL_MODE is "1", and the positive input terminal of the operational amplifier is connected to the source of the NMOS tube N3, thereby receiving the control voltage VCONT. According to the characteristics of the operational amplifier, the voltage at the positive input terminal of the operational amplifier is equal to the voltage at the negative input terminal, so the voltage applied to the resistor R PLL The voltage across the two ends is equal to the control voltage VCONT. Similarly, the frequency f2 of the clock signal CLOCK output by the oscillator 50 can be expressed as f2=K*[V CONT / (R PLL *C OSC *V REF_OSC )]=f CLK_SYNC , where K is the ratio of the number of PMOS tubes P6 to PMOS tubes P3, V CONT is the control voltage VCONT, f CLK_SYNCThe clock signal CLOCK is fed back to the input CK terminal of the D flip-flop D2 in the phase detector 30. At this time, the phase-locked loop circuit composed of the phase detector 30, the loop filter 40 and the oscillator 50 will gradually synchronize the frequency f2 of the clock signal CLOCK to the frequency f2 of the external clock signal CLK_SYNC. CLK_SYNC , so the frequency f2 of the clock signal CLOCK is equal to the frequency f of the external clock signal CLK_SYNC CLK_SYNC From the above expression, we can see that the frequency f of the external clock signal CLK_SYNC is CLK_SYNC When different, the corresponding control voltage VCONT can be obtained through loop regulation.
[0084] like Figure 5 As shown, the figure represents the timing diagram of the switching frequency control system powered on in RT mode and PLL mode, and the input signal EN_CK and the enable signal EN are both "1".
[0085] It can be seen that if the system is powered on in RT mode, the control signal RT_MODE is "1" and the control signal PLL_MODE is "0". When the input signal FORCE_FMIN is "1", the enable signal EN1 is "0", the system works at the lowest frequency, and the voltage value of the control voltage VCONT is established and maintained at the voltage value corresponding to the lowest frequency; then when the input signal FORCE_FMIN is "0", the enable signal EN1 becomes "1", and the system is powered on with the resistor R SET The control voltage VCONT is established and maintained at the corresponding frequency.
[0086] If the system is powered on in PLL mode, the control signal RT_MODE is "0" and the control signal PLL_MODE is "1". When the input signal FORCE_FMIN is "1", the enable signal EN1 is "0", and the system works in the lowest frequency working state; then when the FORCE_FMIN signal is "0" and the enable signal EN1 becomes "1", the system will behave abnormally when it just exits the lowest frequency working state. That is, Figure 5In the PLL mode, when the input signal FORCE_FMIN changes from "1" to "0", the frequency of the clock signal CLOCK is higher than the external clock signal CLK_SYNC at first, and then gradually decreases and synchronizes to the frequency of the external clock signal CLK_SYNC. The reason is that in the PLL mode, since the input signal FORCE_FMIN is "1" at the beginning, the frequency of the clock signal CLOCK output by the oscillator 50 is equal to the minimum frequency. Since the clock signal CLOCK at this time is less than the frequency of the external clock signal CLK_SYNC, the end of the phase detector 30 fed back to the phase-locked loop, that is, Figure 1 When the input CK terminal of the D flip-flop D2 of the middle phase detector 30 is on, the value of the control voltage VCONT will be continuously increased through the adjustment of the loop filter 40. In this way, when exiting the lowest frequency working state, since the voltage value of the control voltage VCONT is very high, the system will work at a high frequency determined by the voltage value of the control voltage VCONT, and then gradually reduce and synchronize to the external clock signal frequency through the phase-locked loop adjustment.
[0087] Example 2
[0088] In order to solve the problem in Example 1 that the system may have abnormal behavior when just exiting the lowest frequency working state, as shown in FIG. Figure 6 As shown, this embodiment provides another dual-mode switching frequency control system, including: a first phase-locked loop and a second phase-locked loop. The first phase-locked loop includes a phase detector 100, a loop filter 200 and a first oscillator 300; the second oscillator 400 and the first oscillator 300 can form a second phase-locked loop by switching, that is, the first phase-locked loop and the second phase-locked loop share the phase detector 100 and the loop filter 200.
[0089] The dual-mode switching frequency control system further includes a first selector and a second selector, wherein the I0 input and output of the first selector are connected to the first oscillator 300, and the I1 input of the first selector is connected to the second oscillator 400. The I0 input of the first selector receives a signal PG, and the output of the first selector outputs a signal PGATE. The I0 input of the second selector is connected to the output of the first oscillator 300 to receive a clock signal CLOCK, the I1 input of the second selector is connected to the output of the second oscillator 400 to receive a clock signal CLK_OSC2, and the output of the second selector is connected to the input of the phase detector 100 to output a signal CLK_IN to the phase detector 100. The switching between the first oscillator 300 and the second oscillator 400 can be realized by the first selector and the second selector.
[0090] In this embodiment, the RT mode and the PLL mode are two working modes that can be switched to each other. The lowest frequency working state is the working state corresponding to when the system is just powered on and counted.
[0091] In RT mode and / or PLL mode, when the first oscillator 300 operates in the lowest frequency operating state, it can output the lowest frequency clock signal CLOCK. That is, no matter it is powered on in RT mode or in PLL mode, the first oscillator 300 only outputs the lowest frequency clock signal CLOCK.
[0092] In this embodiment, when the first oscillator 300 operates in the lowest frequency operating state, the second oscillator 400 outputs a clock signal CLK_OSC2 that can be synchronized to the external clock signal CLK_SYNC, and the second oscillator 400 provides a control voltage VCONT corresponding to the frequency of the external clock signal CLK_SYNC; through the control voltage VCONT, the clock signal CLOCK output by the first oscillator 300 when it is in the PLL mode and exits from the lowest frequency operating state can skip the abnormal state and synchronize to the external clock signal CLK_SYNC.
[0093] After the system is started, in the RT mode, the first oscillator 300 can output a clock signal CLOCK of a preset frequency. In the PLL mode, the first oscillator 300 can output a clock signal CLOCK synchronized with an external clock signal CLK_SYNC.
[0094] like Figure 6 As shown, the dual-mode switching frequency control system also includes a mode determination circuit and an enable circuit. The mode determination circuit has an RT / SYNC input, an EN input, a CLK_SYNC output, an RT_MODE output, and a PLL_MODE output. The enable circuit has an EN_CK input, a FORCE_FMIN input, a LOCK_OSC1 input, an EN output, an EN1 output, and an EN2 output. The EN output of the enable circuit is connected to the EN input of the mode determination circuit. The enable circuit receives an input signal FORCE_FMIN through the FORCE_FMIN input, and the input signal FORCE_FMIN is used to indicate whether the system is operating in the lowest frequency output mode.
[0095] The enable circuit receives an input signal EN_CK according to the EN_CK input terminal and outputs an enable signal EN according to the EN output terminal. The enable circuit receives an input signal FORCE_FMIN through the FORCE_FMIN input terminal and outputs an enable signal EN1 according to the EN1 output terminal and outputs an enable signal EN2 according to the EN2 output terminal. The enable signal EN is equal to the input signal EN_CK. The enable signal EN is used to control the working state of the switching frequency control system. When the enable signal EN is "1", the switching frequency control system works normally. The analysis in this embodiment is based on the premise that the enable signal EN is "1". The enable signal EN1 and the enable signal EN2 respectively correspond to the working state of some circuits in the improved switching frequency control system. When the enable signal EN1 and the enable signal EN2 are "0", the corresponding parts of the circuit do not work. When the enable signal EN1 and the enable signal EN2 are "1", the corresponding parts of the circuit work.
[0096] The mode determination circuit determines the working mode of each oscillator through the state of the RT / SYNC input terminal. The mode determination circuit outputs the external clock signal CLK_SYNC through the CLK_SYNC output terminal, the control signal RT_MODE for switching the first oscillator 300 to the RT mode through the RT_MODE output terminal, and the control signal PLL_MODE for switching the first oscillator 300 to the PLL mode through the PLL_MODE output terminal.
[0097] In this embodiment, when only a resistor R is connected between the RT / SYNC input terminal and ground SET , resistor R SET If the input signal FORCE_FMIN is "0", the frequency of the clock signal CLOCK output by the first oscillator 300 is controlled by the resistor R SET When the external clock signal CLK_SYNC is directly connected to the RT / SYNC terminal, the mode determination circuit outputs the control signal PLL_MODE as "1" and the control signal RT_MODE as "0". At this time, the first oscillator 300 operates in the PLL mode. Similarly, if the input signal FORCE_FMIN is "0", the clock signal CLOCK output by the first oscillator 300 is synchronized to the external clock signal CLK_SYNC through the first phase-locked loop. If both exist at the same time, then through automatic detection, the PLL mode will cover the RT mode, the mode determination circuit outputs the control signal PLL_MODE as "1" and the control signal RT_MODE as "0", and the first oscillator 300 operates in the PLL mode.
[0098] like Figure 7 As shown, the phase detector 100 is a phase comparison module, and the phase detector 100 includes a D flip-flop D1, a D flip-flop D2, an AND gate AND1, an inverter INV3, a PMOS tube P1, a PMOS tube P2, an NMOS tube N1, an NMOS tube N2, a switch S1, a switch S2 and a unit gain amplifier A1.
[0099] Specifically, the input CK terminal of the D flip-flop D1 is connected to the CLK_SYNC output terminal of the mode determination circuit 20 to receive the external clock signal CLK_SYNC, and the input D terminal of the D flip-flop D1 is connected to the power supply VDD. The input CK terminal of the D flip-flop D2 is connected to the output terminal of the second selector to receive the signal CLK_IN, and the input D terminal of the D flip-flop D2 is connected to the power supply VDD. The output Q terminal of the D flip-flop D1 is connected to the A1 input terminal of the AND gate AND1, and the output Q terminal of the D flip-flop D2 is connected to the A2 input terminal of the AND gate AND1. The output terminal of the AND gate AND1 is connected to the input terminal of the inverter INV3, and the output terminal of the inverter INV3 is simultaneously connected to the R reset terminals of the D flip-flop D1 and the D flip-flop D2. The output QN terminal of the D flip-flop D1 is connected to the gate of the PMOS tube P2, and the output Q terminal of the D flip-flop D2 is connected to the gate of the NMOS tube N1. The source of the PMOS transistor P2 is connected to the drain of the PMOS transistor P1, the source of the PMOS transistor P1 is connected to the power supply VDD, and the gate of the PMOS transistor P1 is connected to the bias voltage VB1. The source of the NMOS transistor N1 is connected to the drain of the NMOS transistor N2, the source of the NMOS transistor N2 is grounded, and the gate of the NMOS transistor N2 is connected to the bias voltage VB2. The source of the PMOS transistor P2 is connected to one end of the switch S1, the drain of the NMOS transistor N2 is connected to one end of the switch S2, and the other end of the switch S1 is connected to the other end of the switch S2 and connected to the output end of the unit gain amplifier A1. The drain of the NMOS transistor N1 is connected to the drain of the PMOS transistor P2 and is connected to the input end of the unit gain amplifier A1 and the loop filter 200, so as to output an error voltage corresponding to the phase difference between the clock signal CLOCK or the clock signal CLK_OSC2 and the external clock signal CLK_SYNC to the loop filter 200.
[0100] The phase detector 100 can compare the clock signal CLOCK output by the first oscillator 300 with the external clock signal CLK_SYNC in the PLL mode, and generate an error voltage corresponding to the phase difference between the clock signal CLOCK and the external clock signal CLK_SYNC. At the same time, the phase detector 100 can also compare the clock signal CLK_OSC2 output by the second oscillator 400 with the external clock signal CLK_SYNC, and generate an error voltage corresponding to the phase difference between the clock signal CLK_OSC2 and the external clock signal CLK_SYNC.
[0101] like Figure 8 As shown, the loop filter 200 is used to eliminate the high-frequency signal and the noise signal in the error voltage and output the control voltage VCONT_PRE for controlling the first oscillator 300 or the second oscillator 400. The high-frequency signal and the noise signal in the error voltage are eliminated to meet the performance required by each phase-locked loop in the PLL mode, thereby increasing the stability of the system.
[0102] Specifically, the loop filter 200 includes a resistor R1, a capacitor C1, and a capacitor C2. Specifically, one end of the capacitor C1 and the capacitor C2 are both grounded, the other end of the capacitor C1 is connected to one end of the resistor R1, the other end of the resistor R1 is connected to the other end of the capacitor C2 and connected to the drain of the PMOS tube P2 and the drain of the NMOS tube N1 to receive the error voltage, and is also connected to the second oscillator 400 to output the control voltage VCONT_PRE.
[0103] like Fig. 9 As shown, the first oscillator 300 can operate in RT mode and / or PLL mode, the RT mode and the PLL mode can be switched with each other, and the switching frequency of the switching power supply can be generated in the RT mode and / or the PLL mode.
[0104] Specifically, the first oscillator 300 includes a mode conversion circuit 310, a first current mirror circuit 320, a minimum frequency circuit 330, a frequency maintaining circuit 340, a first ramp voltage generating circuit 350, a first comparator, a first logic circuit and a buffer BUFFER2. The mode conversion circuit 310, the first ramp voltage generating circuit 350 and the first comparator are all connected to the first current mirror circuit 320, and the first current mirror circuit 320, the minimum frequency circuit 330 and the frequency maintaining circuit 340 are all connected to the first selector.
[0105] like Fig. 9 As shown, the mode conversion circuit 310 is used to output the corresponding mirror current through the first current mirror circuit 320 in the RT mode.
[0106] Specifically, the mode conversion circuit 310 includes an operational amplifier, a switch S3, a resistor R SET and NMOS tube N5;
[0107] Among them, the positive input terminal of the op amp is connected to the reference voltage V REF , the negative input terminal of the op amp is connected to the resistor R through switch S3 SET One end of the resistor R SETThe other end of is grounded, the negative input end of the operational amplifier is simultaneously connected to the source of the NMOS tube N5, the gate of the NMOS tube N5 is connected to the output end of the operational amplifier, and the drain of the NMOS tube N5 is connected to the first current mirror circuit 320. The operational amplifier is controlled by the enable signal EN1. When the enable signal EN1 is "1", the operational amplifier works normally; when the enable signal EN1 is "0" and EN is "1", it is equivalent to the system just being powered on and the operational amplifier does not work. In RT mode, switch S3 is in a closed state. Switch S3 is controlled by the control signal RT_MODE. When the control signal RT_MODE is "1" and the control signal PLL_MODE is "0", switch S3 is closed, so that the mode conversion circuit 310 enters the RT mode. When the control signal RT_MODE is "0" and the control signal PLL_MODE is "1", switch S3 is open.
[0108] like Fig. 9 As shown, the first current mirror circuit 320 includes a PMOS tube P5 and a PMOS tube P8. The source of the PMOS tube P5 is connected to the power supply VDD, the drain and the gate of the PMOS tube P5 are short-circuited and connected to the mode conversion circuit 310 and the I0 input terminal of the first selector. Specifically, the drain and the gate of the PMOS tube P5 are short-circuited and connected to the drain of the NMOS tube N5. The gate of the PMOS tube P8 is connected to the output terminal of the first selector, the source of the PMOS tube P8 is connected to the power supply VDD, and the drain of the PMOS tube P8 is connected to the positive input terminal of the first comparator.
[0109] like Fig. 9 As shown, the minimum frequency circuit 330 is used to enable the first oscillator to output a clock signal CLOCK with a minimum frequency.
[0110] Specifically, the minimum frequency circuit 330 includes a PMOS transistor P9, a resistor R3, a capacitor C3, a PMOS transistor P6 and a bias current source IBIAS2_FMIN.
[0111] The drain of the PMOS tube P9 is grounded through the resistor R3, the gate of the PMOS tube P9 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the source of the PMOS tube P9 is connected to the I0 input terminal of the first selector and the drain and gate short-circuit terminal of the PMOS tube P5. The gate of the PMOS tube P9 is connected to the drain of the PMOS tube P6, the gate of the PMOS tube P6 is connected to the I0 input terminal of the first selector, and the source of the PMOS tube P6 is connected to the power supply VDD.
[0112] like Fig. 9 As shown, the frequency maintaining circuit 340 is used to maintain the frequency corresponding to the control voltage VCONT in the RT mode. The frequency maintaining circuit 340 includes a PMOS transistor P7, a switch S4, an NMOS transistor N6 and a resistor R4.
[0113] Specifically, the source of the PMOS tube P7 is connected to the power supply VDD, the gate of the PMOS tube P7 is connected to the I0 input terminal of the first selector, the drain of the PMOS tube P7 is connected to one end of the switch S4 and the output end of the loop filter 200, and specifically, the drain of the PMOS tube P7 is connected to the connection end where the resistor R1 and the capacitor C2 are connected. The drain and gate of the NMOS tube N6 are short-circuited and connected to the other end of the switch S4, and the source of the NMOS tube N6 is grounded through the resistor R4.
[0114] In RT mode, switch S4 is in a closed state. Switch S4 is controlled by control signal RT_MODE. When control signal RT_MODE is "1" and control signal PLL_MODE is "0", switch S4 is closed, so that frequency maintaining circuit 340 enters RT mode. At this time, the control voltage VCONT_PRE output by loop filter 200 is consistent with the voltage at the drain of PMOS tube P7.
[0115] like Fig. 9 As shown, the first slope voltage generating circuit 350 is used to output a corresponding slope voltage V according to the mirror current output by the first current mirror circuit 320. RAMP1 .
[0116] Specifically, the first ramp voltage generating circuit 350 includes an NMOS transistor N7 and a capacitor C OSC1 , capacitor C OSC1 One end is connected to the drain of the NMOS tube N7 and the positive input end of the first comparator, the other end is connected to the source of the NMOS tube N7 and is grounded at the same time, and the gate of the NMOS tube N7 is connected to the output end of the first logic circuit.
[0117] like Fig. 9 As shown, the first comparator is used to convert the ramp voltage V RAMP1 and reference voltage V REF_OSC After comparison, the clock signal CLOCK is output through the first logic circuit and the buffer BUFFER2. The output end of the first comparator is connected to the input end of the first logic circuit, and the output end of the first logic circuit is connected to the input end of the buffer BUFFER2. The positive input end of the first comparator is connected to the first current mirror circuit 320 and the first ramp voltage generating circuit 350. Specifically, the positive input end of the first comparator is connected to the drain of the PMOS tube P8 and the capacitor C OSC1 , the negative input terminal of the first comparator is connected to the reference voltage V REF_OSC The output terminal of the buffer BUFFER2 is connected to the I0 input terminal of the second selector. The first logic circuit has a LOCK_OSC1 output terminal for outputting a control signal LOCK_OSC1.
[0118] like Fig. 9 As shown, the first selector has a control terminal for receiving a control signal SEL_PLL, and the control terminal of the first selector is connected to the output terminal of the AND gate circuit AND2. The A1 input terminal of the AND gate circuit AND2 is connected to the output terminal of the inverter INV1, the A2 input terminal of the AND gate circuit AND2 is connected to the input terminal of the first logic circuit and transmits the control signal PLL_MODE at the same time, and the input terminal of the inverter INV1 is connected to the input terminal of the first logic circuit and transmits the input signal FORCE_FMIN at the same time.
[0119] like Fig.10 As shown, the second oscillator 400 includes an NMOS transistor N3, a resistor R2, a PMOS transistor P3, a PMOS transistor P4, an NMOS transistor N4, and a capacitor C OSC2 , a second comparator, a second logic circuit and a buffer BUFFER3. The PMOS transistor P3 and the PMOS transistor P4 form a second current mirror circuit. The NMOS transistor N4 and the capacitor COSC2 form a second ramp voltage generating circuit.
[0120] Among them, the gate of the NMOS tube N3 is connected to the output end of the loop filter 200, specifically, the gate of the NMOS tube N3 is connected to the connection end where the resistor R1 and the capacitor C2 are connected. The source of the NMOS tube N3 is grounded through the resistor R2, and the source of the NMOS tube N3 is connected to the input end I1 of the first selector. The drain and gate of the PMOS tube P3 are short-circuited and connected to the drain of the NMOS tube N3 and the gate of the PMOS tube P4, the source of the PMOS tube P3 is connected to the power supply VDD, the source of the PMOS tube P4 is connected to the power supply VDD, and the drain of the PMOS tube P4 is connected to the positive input end of the second comparator. Capacitor C OSC2 One end of the capacitor C is connected to the drain of the NMOS tube N4 and the positive input terminal of the second comparator. OSC2 The other end of is connected to the source of NMOS tube N4 and grounded. The gate of NMOS tube N4 is connected to the output end of the second logic circuit. The negative input end of the second comparator is connected to the reference voltage V REF_OSC The output of the second comparator is connected to the input of the buffer BUFFER3 through the second logic circuit, and the output of the buffer BUFFER3 is connected to the I1 input of the second selector to output the clock signal CLK_OSC2. The second comparator is controlled by the enable signal EN2. When the enable signal EN2 is "1", the second comparator works normally, and when the enable signal EN2 is "0", the second comparator does not work.
[0121] like Figure 7 and Figure 6As shown, the control end of the second selector is connected to the output end of the inverter INV2, and the input end of the inverter INV2 is connected to the LOCK_OSC1 input end of the enabling circuit and receives the control signal LOCK_OSC1.
[0122] In this embodiment, the first selector connects the signal PG at the input terminal I0 to the output terminal by default, and the output PGATE signal is used as the gate input signal of the PMOS tube P8; therefore, the frequency of the clock signal CLOCK output by the first oscillator 300 is determined by the resistor R in the RT mode. SET The resistance value setting is or the minimum frequency when the input signal FORCE_FMIN is "1". When the input signal FORCE_FMIN is "0" and the control signal PLL_MODE is "1", the control signal SEL_PLL is set to "1". At this time, the first selector will connect the control voltage VCONT at the input end of I1 to the output end, and the output signal PGATE is used as the gate input signal of the PMOS tube P8. Therefore, at this time, the frequency of the clock signal CLOCK output by the first oscillator 300 is synchronized to the frequency of the external clock signal CLK_SYNC through the first phase-locked loop adjustment.
[0123] The second selector connects the signal at the input terminal I0 (i.e., the clock signal CLOCK output by the first oscillator 300) to the output terminal by default, and the output signal CLK_IN is used as the input clock signal of the D flip-flop D2 in the phase detector 100. At this time, the first phase-locked loop synchronizes the frequency of the clock signal CLOCK output by the first oscillator 300 to the frequency of the external clock signal CLK_SYNC. When the control signal LOCK_OSC1 is "0", the second selector connects the signal at the input terminal I1 (i.e., the clock signal CLK_OSC2 output by the second oscillator 400) to the output terminal, and the output signal CLK_IN is used as the input clock signal of the D flip-flop D2 in the phase detector 100. At this time, the second phase-locked loop synchronizes the frequency of the clock signal CLK_OSC2 output by the second oscillator 400 to the frequency of the external clock signal CLK_SYNC.
[0124] In this embodiment, since the first phase-locked loop and the second phase-locked loop can be switched by switching the first oscillator 300 and the second oscillator 400, the voltage value of the control voltage VCONT is always maintained at the value corresponding to the frequency of the external clock CLK_SYNC, and the problem of abnormal behavior of the system just exiting the lowest frequency working state similar to that in Embodiment 1 will not occur. In this embodiment, when the system just exits the lowest frequency working state, that is, when the input signal FORCE_FMIN changes from "1" to "0", the frequency of the clock signal CLOCK is immediately synchronized to the frequency of the external clock signal CLK_SYNC. The specific implementation is as follows:
[0125] In this embodiment, in the PLL mode, if the system operates in the lowest frequency state, that is, when the input signal FORCE_FMIN is "1", the control signal LOCK_OSC1 is set to "0", and the enable signal EN2 is set to "1". At this time, the frequency of the clock signal CLOCK output by the first oscillator 300 is equal to the lowest frequency, and the clock signal CLK_OSC2 output by the second oscillator 400 will be fed back to the input end of the D flip-flop D2 in the phase detector, so the second phase-locked loop synchronizes the frequency of the clock signal CLK_OSC2 output by the second oscillator 400 to the frequency of the external clock signal CLK_SYNC, and makes the voltage value of the control voltage VCONT establish and maintain at the voltage value of the control voltage VCONT determined by the frequency of the external clock signal CLK_SYNC. In this way, when the system exits the lowest frequency operating state, that is, the FORCE_FMIN signal becomes "0", the control signal LOCK_OSC1 signal is set to "1", and the enable signal EN2 is set to "0", the clock signal CLOCK output by the first oscillator 300 is fed back to the input end of the D flip-flop D2 in the phase detector. Since the voltage value of the control voltage VCONT has been established and maintained, the first phase-locked loop will immediately synchronize the frequency of the clock signal CLOCK output by the first oscillator 300 to the frequency of the external clock signal CLK_SYNC.
[0126] like Fig.11 As shown, it is the circuit timing diagram of this embodiment, which respectively represents the timing diagram of the system being powered on in RT mode and PLL mode, wherein the enable signal EN_CK and the enable signal EN are both "1". It can be seen that if the system is powered on in RT mode, the control signal RT_MODE is "1", the control signal PLL_MODE is "0", the control signal SEL_PLL is "0", the control signal LOCK_OSC1 is "0", and the enable signal EN2 is "0". When the input signal FORCE_FMIN is "1", the enable signal EN1 is "0", the frequency of the clock signal CLOCK is equal to the minimum frequency, and the voltage value of the control voltage VCONT is established and maintained at the voltage value corresponding to the minimum frequency. Then when the input signal FORCE_FMIN is "0", the enable signal EN1 becomes "1", and the frequency of the clock signal CLOCK is controlled by the resistor R SET The value is set, and the voltage value of the control voltage VCONT is established and maintained at the corresponding frequency.
[0127] If the system is powered on in PLL mode, the control signal RT_MODE is "0", the control signal PLL_MODE is "1", and the enable signal EN1 is "0". When the input signal FORCE_FMIN is "1", the control signal SEL_PLL is "0", the control signal LOCK_OSC1 is "0", the enable signal EN2 is "1", the frequency of the clock signal CLOCK is equal to the minimum frequency, the frequency of the clock signal CLOCK_OSC2 is synchronized to the frequency of the external clock signal CLK_SYNC, and at this time the voltage value of the control voltage VCONT will be established and maintained at the voltage value of the control voltage VCONT corresponding to the frequency of the external clock signal CLK_SYNC. Then when the input signal FORCE_FMIN is "0", the control signal SEL_PLL is "1", the control signal LOCK_OSC1 is "1", and the enable signal EN2 is "0". Since the voltage value of the control voltage VCONT has been established and maintained at the voltage value of the control voltage VCONT corresponding to the frequency of the external clock signal CLK_SYNC, the frequency of the clock signal CLOCK will be immediately synchronized to the external clock signal frequency.
[0128] It can be seen that when the first oscillator 300 works in the PLL mode, even if the system starts working in the lowest frequency working state, that is, the input signal FORCE_FMIN is "1", the frequency of the clock signal CLOCK output by the first oscillator 300 is equal to the lowest frequency, because the control signal LOCK_OSC1 is set to "0" and the enable signal EN2 is set to "1" at this time, the clock signal CLK_OSC2 output by the second oscillator 400 will be fed back to the input end of the D flip-flop D2 in the phase detector. At this time, the second phase-locked loop synchronizes the frequency of the clock signal CLK_OSC2 output by the second oscillator 400 to the frequency of the external clock signal CLK_SYNC, so that the voltage value of the control voltage VCONT is established and maintained at the voltage value of the control voltage VCONT determined by the frequency of the external clock signal CLK_SYNC. In this way, when exiting the lowest frequency working state, the frequency of the clock signal CLOCK output by the first oscillator will be immediately synchronized to the frequency of the external clock signal CLK_SYNC through the first phase-locked loop.
[0129] Depend on Fig.11 It can be seen that the solution in this embodiment effectively solves the problem in Embodiment 1 that the system behaves abnormally when just exiting the lowest frequency working state in PLL mode. In this embodiment, when the input signal FORCE_FMIN changes from "1" to "0", the frequency of the clock signal CLOCK is immediately synchronized to the frequency of the external clock signal CLK_SYNC.
[0130] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A dual-mode switching frequency control system, characterized in that: include: An oscillator, in RT mode, the oscillator can output a clock signal CLOCK of a preset frequency; In the PLL mode, the oscillator can output a clock signal CLOCK synchronized with the external clock signal CLK_SYNC; in the RT mode and / or PLL mode, when the oscillator operates in the lowest frequency working state, it can output the lowest frequency clock signal CLOCK; a phase detector, in the PLL mode, for comparing the clock signal CLOCK with the external clock signal CLK_SYNC to generate an error voltage corresponding to the phase difference between the clock signal CLOCK and the external clock signal CLK_SYNC; and The loop filter, in the PLL mode, is used to eliminate high-frequency signals and noise signals in the error voltage and output a control voltage VCONT_PRE for controlling the oscillator. Under the control of the control voltage VCONT_PRE, the clock signal CLOCK output by the oscillator can be synchronized to the external clock signal CLK_SYNC.
2. The dual-mode switching frequency control system according to claim 1, characterized in that: The oscillator includes a mode conversion circuit, a current mirror circuit, a minimum frequency circuit, a frequency maintenance circuit, a ramp voltage generation circuit, a comparator, a logic circuit and a buffer BUFFER; wherein the mode conversion circuit is used to output a corresponding current through the current mirror circuit according to a corresponding control voltage in RT mode and / or PLL mode; the minimum frequency circuit is used to make the oscillator output a clock signal CLOCK with a minimum frequency; the frequency maintenance circuit is used to maintain the frequency corresponding to the control voltage VCONT_PRE in RT mode; the ramp voltage generation circuit is used to output a corresponding ramp voltage V according to the current output by the current mirror circuit RAMP The comparator is used to convert the ramp voltage V RAMP and reference voltage V REF_OSC After comparison, the clock signal CLOCK is output through the logic circuit and buffer BUFFER.
3. The dual-mode switching frequency control system according to claim 2, characterized in that: The minimum frequency circuit includes a PMOS tube P7, a resistor R3, a capacitor C3, a PMOS tube P4 and a bias current source IBIAS2_FMIN; Among them, the drain of the PMOS tube P7 is grounded through the resistor R3, the gate of the PMOS tube P7 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the gate of the PMOS tube P7 is also connected to the drain of the PMOS tube P4, the source of the PMOS tube P7 is connected to the gate of the PMOS tube P4, the current mirror circuit and the frequency maintenance circuit, and the source of the PMOS tube P4 is connected to the power supply VDD.
4. The dual-mode switching frequency control system according to claim 2, characterized in that: The mode conversion circuit includes a resistor R2, an NMOS tube N3, a bias current source IBIAS1, an operational amplifier, a switch S3, a switch S4, a switch S5, a switch S6, a resistor R SET , resistor R PLL , NMOS tube N4; The positive input terminal of the operational amplifier is connected to the reference voltage V via switch S3. REF One end of the resistor R2 is connected to the power supply VDD, and the other end is connected to the drain of the NMOS tube N3. The gate of the NMOS tube N3 is connected to the control voltage VCONT_PRE. The source of the NMOS tube N3 is grounded through the bias current source IBIAS1. The source of the NMOS tube N3 is connected to the positive input terminal of the operational amplifier through the switch S4. The negative input terminal of the operational amplifier is connected to the resistor R through the switch S5. SET Connect the resistor R SET The other end of the op amp is grounded, and the negative input terminal of the op amp is connected to the resistor R through the switch S6. PLL Connect the resistor R PLL The other end of the NMOS tube N4 is grounded, the drain of the NMOS tube N4 is connected to the current mirror circuit, the gate of the NMOS tube N4 is connected to the output end of the operational amplifier, and the source of the NMOS tube N4 is connected to the negative input end of the operational amplifier.
5. The dual-mode switching frequency control system according to claim 4, characterized in that: The current mirror circuit includes a PMOS tube P3 and a PMOS tube P6, the source of the PMOS tube P3 is connected to the power supply VDD, the drain and the gate of the PMOS tube P3 are short-circuited and connected to the gate of the PMOS tube P6 as well as the frequency maintenance circuit, the minimum frequency circuit and the mode conversion circuit, the source of the PMOS tube P6 is connected to the power supply VDD, and the drain of the PMOS tube P6 is connected to the ramp voltage generating circuit and the positive input terminal of the comparator.
6. The dual-mode switching frequency control system according to claim 5, characterized in that: The frequency maintaining circuit includes a PMOS tube P5, an NMOS tube N5, a resistor R4 and a switch S7, the source of the PMOS tube P5 is connected to a power supply VDD, the gate of the PMOS tube P5 is connected to the current mirror circuit and the minimum frequency circuit, the drain of the PMOS tube P5 is connected to the output end of the loop filter and the input end of the oscillator, the drain and the gate of the NMOS tube N5 are short-circuited and connected to the drain of the PMOS tube P5 through the switch S7, the source of the NMOS tube N5 is grounded through the resistor R4, and in the RT mode, the switch S7 is in a closed state.
7. The dual-mode switching frequency control system according to claim 6, characterized in that: The ramp voltage generating circuit includes an NMOS tube N6 and a capacitor Cosc, one end of the capacitor Cosc is connected to the drain of the NMOS tube N6 and the positive input end of the comparator, and the other end is connected to the source of the NMOS tube N6 and grounded at the same time, and the gate of the NMOS tube N6 is connected to the output end of the logic circuit.
8. The dual-mode switching frequency control system according to claim 7, characterized in that: In RT mode, the frequency f1 of the clock signal CLOCK is expressed as: f1=K*[V REF / (R SET *C OSC *V REF_OSC )]; In the PLL mode, the frequency f2 of the clock signal CLOCK is expressed as: f2=K*[V CONT / (R PLL *C OSC *V REF_OSC )]=f CLK_SYNC ; Among them, K is the ratio of the number of PMOS tubes P6 and PMOS tubes P3, V CONT is the control voltage at the source of NMOS tube N3, f CLK_SYNC is the frequency of the external clock signal CLK_SYNC.
9. A dual-mode switching frequency control system, characterized in that: include: A first phase-locked loop, the first phase-locked loop comprising a phase detector, a loop filter and a first oscillator; In the PLL mode, the first oscillator can output a clock signal CLOCK synchronized with the external clock signal CLK_SYNC; in the RT mode and / or PLL mode, when the first oscillator operates in the lowest frequency operating state, it can output the lowest frequency clock signal CLOCK; A second oscillator, capable of forming a second phase-locked loop with the first oscillator through switching; The second oscillator can output a clock signal CLK_OSC2 synchronized to an external clock signal CLK_SYNC, and the second oscillator provides a control voltage VCONT corresponding to the frequency of the external clock signal CLK_SYNC; through the control voltage VCONT, the clock signal CLOCK output by the first oscillator when it is in PLL mode and exits from the lowest frequency working state can skip the abnormal state and synchronize to the external clock signal CLK_SYNC.
10. The dual-mode switching frequency control system according to claim 9, characterized in that: In the RT mode, the first oscillator can output a clock signal CLOCK of a preset frequency.
11. The dual-mode switching frequency control system according to claim 9, characterized in that: The dual-mode switching frequency control system also includes a first selector and a second selector, the I0 input and output of the first selector are connected to the first oscillator, the I1 input of the first selector is connected to the second oscillator, the I0 input of the second selector is connected to the output of the first oscillator, the I1 input of the second selector is connected to the output of the second oscillator, and the output of the second selector is connected to the input of the phase detector, and switching between the first oscillator and the second oscillator can be achieved through the first selector and the second selector.
12. The dual-mode switching frequency control system according to claim 11, characterized in that: The first oscillator includes a mode conversion circuit, a first current mirror circuit, a minimum frequency circuit, a frequency maintaining circuit, a first slope voltage generating circuit, a first comparator, a first logic circuit and a buffer BUFFER2, the mode conversion circuit, the first slope voltage generating circuit and the first comparator are all connected to the first current mirror circuit, and the first current mirror circuit, the minimum frequency circuit and the frequency maintaining circuit are all connected to the first selector; The mode conversion circuit is used to output the corresponding mirror current through the first current mirror circuit in the RT mode; the minimum frequency circuit is used to enable the first oscillator to output the clock signal CLOCK with the lowest frequency; the frequency maintenance circuit is used to maintain the frequency corresponding to the control voltage VCONT in the RT mode; the first ramp voltage generating circuit is used to output the corresponding ramp voltage V according to the mirror current output by the first current mirror circuit. RAMP1 The first comparator is used to convert the ramp voltage V RAMP1 and reference voltage V REF_OSC After comparison, the clock signal CLOCK is output through the first logic circuit and the buffer BUFFER2.
13. The dual-mode switching frequency control system according to claim 12, characterized in that: The mode conversion circuit includes an operational amplifier, a switch S3, a resistor R SET and NMOS tube N5; The positive input terminal of the operational amplifier is connected to the control voltage V REF The negative input terminal of the operational amplifier is connected to the resistor R through the switch S3. SET One end of the resistor R SET The other end of the operational amplifier is grounded, the negative input end of the operational amplifier is connected to the source of the NMOS tube N5, the gate of the NMOS tube N5 is connected to the output end of the operational amplifier, the drain of the NMOS tube N5 is connected to the first current mirror circuit, and in the RT mode, the switch S3 is in a closed state.
14. The dual-mode switching frequency control system according to claim 12, wherein: The first current mirror circuit includes a PMOS tube P5 and a PMOS tube P8, the source of the PMOS tube P5 is connected to the power supply VDD, the drain and the gate of the PMOS tube P5 are short-circuited and connected to the mode conversion circuit and the I0 input end of the first selector, the gate of the PMOS tube P8 is connected to the output end of the first selector, the source of the PMOS tube P8 is connected to the power supply VDD, and the drain of the PMOS tube P8 is connected to the positive input end of the first comparator.
15. The dual-mode switching frequency control system according to claim 12, wherein: The minimum frequency circuit includes a PMOS tube P9, a resistor R3, a capacitor C3, a PMOS tube P6 and a bias current source IBIAS2_FMIN; Among them, the drain of the PMOS tube P9 is grounded through the resistor R3, the gate of the PMOS tube P9 is grounded through the bias current source IBIAS2_FMIN and connected to the power supply VDD through the capacitor C3, the source of the PMOS tube P9 is connected to the I0 input end of the first selector, the gate of the PMOS tube P9 is connected to the drain of the PMOS tube P6, the gate of the PMOS tube P6 is connected to the I0 input end of the first selector, and the source of the PMOS tube P6 is connected to the power supply VDD.
16. The dual-mode switching frequency control system of claim 12, wherein: The frequency maintaining circuit includes a PMOS tube P7, a switch S4, an NMOS tube N6 and a resistor R4; Among them, the source of the PMOS tube P7 is connected to the power supply VDD, the gate of the PMOS tube P7 is connected to the I0 input end of the first selector, the drain of the PMOS tube P7 is connected to one end of the switch S4 and the output end of the loop filter, the drain and the gate of the NMOS tube N6 are short-circuited and connected to the other end of the switch S4, the source of the NMOS tube N6 is grounded through the resistor R4, and in the RT mode, the switch S4 is in a closed state.
17. The dual-mode switching frequency control system of claim 12, wherein: The first ramp voltage generating circuit includes an NMOS tube N7 and a capacitor C OSC1 , the capacitor C OSC1 One end is connected to the drain of the NMOS tube N7 and the positive input end of the first comparator, the other end is connected to the source of the NMOS tube N7 and is grounded at the same time, and the gate of the NMOS tube N7 is connected to the output end of the first logic circuit.
18. The dual-mode switching frequency control system of claim 11, wherein: The second oscillator includes an NMOS tube N3, a resistor R2, a PMOS tube P3, a PMOS tube P4, an NMOS tube N4, a capacitor C OSC2 , a second comparator, a second logic circuit and a buffer BUFFER3; The gate of the NMOS tube N3 is connected to the output end of the loop filter, the source of the NMOS tube N3 is grounded through the resistor R2, the source of the NMOS tube N3 is connected to the input end I1 of the first selector, the drain and gate of the PMOS tube P3 are short-circuited and connected to the drain of the NMOS tube N3 and the gate of the PMOS tube P4, the source of the PMOS tube P3 is connected to the power supply VDD, the source of the PMOS tube P4 is connected to the power supply VDD, the drain of the PMOS tube P4 is connected to the positive input end of the second comparator, and the capacitor C OSC2 One end of the capacitor C is connected to the drain of the NMOS tube N4 and the positive input terminal of the second comparator. OSC2 The other end of the NMOS tube N4 is connected to the source and grounded, the gate of the NMOS tube N4 is connected to the output end of the second logic circuit, and the negative input end of the second comparator is connected to the reference voltage V REF_OSC The output end of the second comparator is connected to the input end of the buffer BUFFER3 through the second logic circuit, and the output end of the buffer BUFFER3 is connected to the I1 input end of the second selector.
