External clock synchronization and internal clock bidirectional soft switching circuit and method

By designing the external clock synchronization and internal clock bidirectional soft switching circuits in the PLL&Inter_clk module, the problem of sudden frequency changes in traditional technology is solved, the smooth change of the output of the switching power supply chip is achieved, and the reliability and life are improved.

CN118041349BActive Publication Date: 2024-08-23上海帝迪集成电路设计有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410167729.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2024-08-23
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

When the external clock signal of the traditional PLL&Inter_clk module is switched to the internal clock, the sudden change in frequency causes the DC-DC constant voltage or constant current output by the switching power supply chip to change drastically, affecting the load reliability and life.

Method used

Design a bidirectional soft switching circuit for external clock synchronization and internal clock, using voltage comparator, counting latch, switch control logic circuit, upper current source and lower current source, by continuously detecting and adjusting the input voltage signal of the voltage controlled oscillator , so that it approaches the target voltage to achieve smooth transition switching, and the switching speed and transition zone duration are adjusted through the capacitive low-pass filter.

Benefits of technology

It eliminates the hard switching between the external synchronization frequency and the internal fixed operating frequency, achieves smooth changes in DC-DC output, and improves the reliability and life of the switching power supply chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118041349B
    Figure CN118041349B
Patent Text Reader

Abstract

The present invention discloses a bidirectional soft switching circuit and method for external clock synchronization and internal clock. The bidirectional soft switching circuit is arranged on a PLL∬_clk module, and includes: a voltage comparator, a counting latch, a switch control logic circuit, an upper current source I4, a lower current source I5, a fourth switch S4 and a fifth switch S5. The output end of the voltage comparator is respectively connected to the input end of the counting latch and the switch control logic circuit, the output end of the counting latch is connected to the enable end of the voltage comparator, the output end of the switch control logic circuit is respectively connected to the fourth switch S4 and the fifth switch S5, the fourth switch S4 is also connected to the upper current source I4, and the fifth switch S5 is also connected to the lower current mirror I5. The bidirectional soft switching circuit and method of the present invention eliminate the hard switching between the external synchronization frequency and the internal fixed operating frequency, and the transition zone duration is adjustable, so that the DC-DC constant voltage or constant current output changes are moderated, and the overall reliability and life of the switching power supply chip are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of semiconductor phase-locked loops, and in particular to a circuit and method for bidirectional soft switching of an external clock synchronization and an internal clock. Background Art

[0002] Power management chips are widely used in portable electronics, automobiles, lighting LEDs, home appliances and other fields. Among them, switching power supplies DC-DC occupy a major share due to their high efficiency. Modern switching power supplies are more integrated and systematic, and often need to work with external system controls such as MCUs. At the same time, they also pursue high power and require multiple chips to be connected in parallel. These complex control requirements usually require the integration of a phase-locked loop PLL that can synchronize an external clock in the switching power supply.

[0003] like Figure 1 The following is a simplified diagram of a switching power supply chip with built-in PLL. The built-in PLL&Inter_clk module of the switching power supply is responsible for receiving and synchronizing the clock signal generated by the external system MCU or the master parallel chip master; if there is no external clock signal, the internal clock is generated and sent to the PWM generator, and then through the driver, it drives the power MOS tube to continuously turn on and off, outputting constant voltage or constant current for the load.

[0004] Traditional PLL&Inter_clk module circuit such as Figure 2 As shown, the CLKIN pin is used to receive the external clock input, and the Clk detection module detects whether there is an external clock signal and generates a Clk_det signal. For example, a high level indicates that there is an external clock input at this time, and a low level indicates that there is no external clock input at this time. The phase frequency detector PFD, charge pump CP, capacitor low-pass filter LPF, and voltage-controlled oscillator VCO form a classic charge pump phase-locked loop CPPLL. Among them, the voltage-controlled oscillator VCO is often composed of a voltage-controlled current module Gm and a current-type relaxation oscillator.

[0005] When the system or the main parallel chip sends a clock signal of a specific frequency, after it is sent to the CLKIN pin and the Clk detection module, Clk_det=1 is generated, and the external clock signal will be further sent to the phase frequency detector PFD, and the switch S3 is closed. The phase frequency detector PFD compares the frequency and phase difference between the external clock signal and the original internal operating frequency of the voltage-controlled oscillator VCO, adjusts the on-off time of switches S1 and S2, and changes the V_lpf voltage. A positive and negative voltage difference is generated between this voltage and Vref, thereby changing the current flowing out or drawn by the voltage-controlled current module Gm, and finally changing the frequency of the current-type relaxation oscillator, so that the output frequency of the voltage-controlled oscillator VCO is quickly synchronized and phase-locked to the external clock signal; when the system or the main parallel chip stops sending a clock signal of a specific frequency, the Clk detection module cannot detect the clock signal, and Clk_det=0 is generated, and the switch S3 is immediately disconnected, and the slave chip stops the synchronization function. The current originally flowing out or flowing into the voltage-controlled current module Gm is quickly cut off, and the internal fixed bias current Ib is used to generate the internal clock signal.

[0006] However, the original internal clock frequency and external frequency often differ by several hundred KHz to several MHz. This hard switching will cause the PLL & Inter_clk module to produce a sharp frequency change, such as Figure 3 As shown in the figure, the PWM frequency, constant voltage or constant current output of the driving power MOS tube will also change dramatically, which will have an adverse effect on the load. For example, when the constant voltage is output, there may be voltage overshoot, exceeding the load withstand voltage. If the system control is hard switched for a long time, it is easy to cause reliability problems of the load or even damage the load; when the constant current is driven by the LED, there may be obvious brightness changes or even flicker, which will affect the service life of the LED or the customer's experience. Summary of the invention

[0007] In view of the problems existing in the prior art, the present invention provides a bidirectional soft switching circuit and method of external clock synchronization and internal clock to eliminate the hard switching between the external synchronization frequency and the internal fixed operating frequency, and the transition zone duration is adjustable to ease the change of DC-DC constant voltage or constant current output, thereby improving the overall reliability and life of the switching power supply chip.

[0008] To achieve the above technical objectives, the present invention adopts the following technical solutions: An external clock synchronization and internal clock bidirectional soft-switching circuit is provided on the PLL&Inter_clk module, including: a voltage comparator, a counting latch, a switch control logic circuit, an upper current source I4, a lower current source I5, a fourth switch S4, and a fifth switch S5. The output end of the voltage comparator is respectively connected to the input end of the counting latch and the switch control logic circuit. The output end of the counting latch is connected to the enable end of the voltage comparator. The output end of the switch control logic circuit is respectively connected to the fourth switch S4 and the fifth switch S5. The fourth switch S4 is also connected to the upper current source I4. The fifth switch S5 is also connected to the lower current mirror I5;

[0009] After the external clock signal withdraws, the voltage comparator continuously detects the input voltage signal V_lpf, and compares the input voltage signal V_lpf with Vref. If the input voltage signal V_lpf < Vref, the fourth switch S4 is controlled to conduct through the switch control logic circuit, so that the upper current source I4 charges the input voltage signal V_lpf. If the input voltage signal V_lpf > Vref, the fifth switch is controlled to conduct through the switch control logic circuit, so that the lower circuit source I5 discharges the input voltage signal V_lpf, realizing the soft-switching process;

[0010] The counting latch is used to record the number of times the input voltage signal V_lpf of the voltage-controlled oscillator VCO approaches Vref for adjustment.

[0011] Further, the PLL&Inter_clk module includes: a Clk detection module, a phase-frequency detector PFD, a first switch S1, a second switch S2, a first bias current I A 、a second bias current I B 、a capacitor low-pass filter LPF, a voltage-controlled oscillator VCO. The CLKIN pin of the Clk detection module is used to receive an external clock input. The output end of the Clk detection module is connected to the first input end of the phase-frequency detector PFD. The first output end of the phase-frequency detector PFD is connected in series with one end of the first switch S1 and the output end of the first bias current I A . The input end of the first bias current I A is connected to the working voltage VDD. The second output end of the phase-frequency detector PFD is connected to one end of the second switch S2. One end of the second switch S2 is also connected to the other end of the first switch S1, the capacitor low-pass filter LPF, and the input end of the voltage-controlled oscillator VCO. The other end of the second switch S2 is connected to the input end of the second bias current I B . The input end of the second bias current I BThe output end of the voltage controlled oscillator VCO is connected to the driver in the switching power supply DC-DC and the first input end of the phase frequency detector PFD respectively.

[0012] Furthermore, the voltage-controlled oscillator VCO includes: a voltage-controlled current module Gm, a third switch S3, and a current-type relaxation oscillator. The output end of the voltage-controlled current module Gm is connected to one end of the third switch S3, and the other end of the third switch S3 is connected to the input end of the current-type relaxation oscillator. The output end of the current-type relaxation oscillator is respectively connected to the driver in the switching power supply DC-DC and the first input end of the phase frequency detector PFD.

[0013] Furthermore, a sixth switch S6 is provided, and a first input end of the voltage comparator is respectively connected to the other end of the first switch S1, one end of the second switch S2, the input end of the capacitor low-pass filter LPF, one end of the sixth switch S6, the first input end of the voltage-controlled current module Gm, the input end of the fourth switch S4, and the output end of the fifth switch S5, and a second input end of the voltage comparator is connected to the other end of the sixth switch S6; and a Clk_det signal end of the voltage comparator is connected to a Clk_det signal end of the Clk detection module.

[0014] Furthermore, the output end of the counting latch is also connected to the third switch S3 and the sixth switch S6 respectively.

[0015] Further, the switch control logic circuit includes: a first inverter Inv1, a second inverter Inv2, an OR gate Or2 and an AND gate And2, the input end of the first inverter Inv1 is connected to the Clk_det signal end of the Clk detection module, the output end of the first inverter Inv1 is respectively connected to the input end of the second inverter Inv2 and the first input end of the AND gate And2, the output end of the second inverter Inv2 is connected to the first input end of the OR gate Or2, the second input end of the OR gate Or2 and the second input end of the AND gate And2 are both connected to the output end of the voltage comparator, the output end of the OR gate Or2 is connected to the fourth switch S4, and the output end of the AND gate And2 is connected to the fifth switch S5.

[0016] Furthermore, the fourth switch S4 is a PMOS transistor, the gate of the PMOS transistor is connected to the output end of the OR gate Or2, the source of the PMOS transistor is connected to the output end of the upper current source I4, the input end of the upper current source I4 is connected to the operating voltage VDD; the drain of the PMOS transistor is connected to the first input end of the voltage comparator.

[0017] Further, the fifth switch S5 is an NMOS transistor. The gate of the NMOS transistor is connected to the output terminal of the AND gate And2. The source of the NMOS transistor is connected to the input terminal of the lower current source I5. The output terminal of the lower current source I5 is grounded. The drain of the NMOS transistor is connected to the first input terminal of the voltage comparator.

[0018] Further, the present invention also provides a bidirectional soft switching method for the external clock synchronization and internal clock bidirectional soft switching circuit, and the specific process is as follows:

[0019] After the external clock signal withdraws, the Clk detection module generates a signal of Clk_det = 0, and the external clock synchronization and internal clock bidirectional soft switching circuit is enabled, and starts to continuously detect and adjust the voltage signal V_lpf input to the voltage comparator. Specifically, when the voltage signal V_lpf < Vref, the output result of the voltage comparator controls the conduction of the fourth switch S4 through the OR gate Or2 in the switch control logic circuit, and controls the disconnection of the fifth switch S5 through the AND gate And2. The upper current source I4 continuously charges the capacitor low-pass filter LPF connected to the voltage signal V_lpf, so that the voltage signal V_lpf gradually increases and approaches Vref. When the voltage signal V_lpf > Vref, the output result of the voltage comparator controls the disconnection of the fourth switch S4 and the conduction of the fifth switch S5 through the switch control logic circuit. The lower current source I5 continuously discharges the capacitor low-pass filter LPF connected to the voltage signal V_lpf, so that V_lpf continuously decreases and approaches Vref.

[0020] Finally, the voltage signal V_lpf adjusts back and forth near Vref, the output of the voltage comparator flips between high and low, and is counted by the counting latch. After the counting is full, the latch result is latched, and the third switch S3, the fourth switch S4, and the fifth switch S5 are disconnected, the voltage comparator is turned off, and the sixth switch S6 is turned on. At this time, both ends of the voltage control current module Gm are equal, so that the circuit generated by the PLL&Inter_clk module will not have a sudden change in frequency.

[0021] When the external clock signal is loaded, the Clk detection module generates a signal of Clk_det = 1, keeps the sixth switch S6, the fourth switch S4, and the fifth switch S5 disconnected, turns off the voltage comparator, clears the latch of the counting latch, turns on the third switch S3, and enters the phase-locked loop PLL process of synchronizing the external clock.

[0022] Compared with the prior art, the present invention has the following beneficial effects: when the external clock signal is switched to the internal clock, the external clock synchronization and internal clock bidirectional soft switching circuit of the present invention continuously detects and adjusts the input voltage signal V_lpf of the voltage-controlled oscillator VCO to make it approach the target voltage, thereby realizing a smooth transition switch between the external clock synchronous phase-locked phase and the internal clk, and adjusting the size of the upper current mirror I4 and the lower current mirror I5 by adjusting the capacitance of the capacitor low-pass filter LPF, thereby realizing the adjustable switching speed and transition zone duration of the soft switching, which can greatly improve the abrupt change in the operating frequency of the switching power supply chip caused by hard switching, realize the smooth change of the DC-DC constant voltage or constant current output, and improve the reliability of the switching power supply chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a simplified diagram of a switching power supply chip with built-in PLL;

[0024] Figure 2 It is the schematic diagram of the traditional PLL&Inter_clk module;

[0025] Figure 3 This is a schematic diagram of the frequency abrupt change caused by external clock synchronization and internal clock hard switching in the traditional PLL&Inter_clk module;

[0026] Figure 4 A schematic diagram of a PLL&Inter_clk module that adds an external clock synchronization and an internal clock bidirectional soft switching circuit to the present invention;

[0027] Figure 5 This is a schematic diagram of the external clock synchronization and internal clock bidirectional soft switching circuit of the present invention;

[0028] Figure 6 The effect diagram of the scheme for realizing synchronous phase locking and internal clk soft switching of the present invention;

[0029] Figure 7 This is a diagram of cadence simulation results of the solution for implementing synchronous phase locking and internal clk soft switching in the present invention. DETAILED DESCRIPTION

[0030] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings.

[0031] like Figure 4, the present invention provides an external clock synchronization and internal clock bidirectional soft switching circuit, which is arranged on the PLL&Inter_clk module and includes: a voltage comparator, a counting latch, a switch control logic circuit, an upper current source I4, a lower current source I5, a fourth switch S4 and a fifth switch S5. The output end of the voltage comparator is respectively connected to the input end of the counting latch and the switch control logic circuit. The output end of the counting latch is connected to the enable end of the voltage comparator. The output end of the switch control logic circuit is respectively connected to the fourth switch S4 and the fifth switch S5. The fourth switch S4 is also connected to the upper current source I4, and the fifth switch S5 is also connected to the lower current mirror I5. After the external clock signal is withdrawn, the voltage comparator continuously detects the input voltage signal V_lpf, compares the input voltage signal V_lpf with Vref. If the input voltage signal V_lpf < Vref, the fourth switch S4 is controlled to conduct through the switch control logic circuit, so that the upper current source I4 charges the input voltage signal V_lpf. If the input voltage signal V_lpf > Vref, the fifth switch is controlled to conduct through the switch control logic circuit, so that the lower circuit source I5 discharges the input voltage signal V_lpf, realizing the soft switching process. The counting latch is used to record the number of times the input voltage signal V_lpf of the voltage-controlled oscillator VCO approaches Vref for adjustment. The present invention continuously detects and adjusts the input voltage signal V_lpf of the voltage-controlled oscillator VCO through the external clock synchronization and internal clock bidirectional soft switching circuit, approaches the target voltage, realizes the smooth transition and switching between the external clock synchronization phase lock and the internal clock, and the switching speed and the duration of the transition region are adjustable, improving the drastic change of the DC-DC constant voltage or constant current output of the switching power supply caused by the original hard switching, and improving the reliability of the switching power supply chip.

[0032] As Figure 2 , the PLL&Inter_clk module includes: a Clk detection module, a phase frequency detector PFD, a first switch S1, a second switch S2, a first bias current I A , a second bias current I B , a capacitor low-pass filter LPF, and a voltage-controlled oscillator VCO. The CLKIN pin of the Clk detection module is used to receive the external clock input. The output end of the Clk detection module is connected to the first input end of the phase frequency detector PFD. The first output end of the phase frequency detector PFD is connected in series with one end of the first switch S1 and the output end of the first bias current I A . The input end of the first bias current I A is connected to the operating voltage VDD. The second output end of the phase frequency detector PFD is connected to one end of the second switch S2. One end of the second switch S2 is also connected to the other end of the first switch S1, the capacitor low-pass filter LPF, and the input end of the voltage-controlled oscillator VCO. The other end of the second switch S2 is connected to the input end of the second bias current I B . The input end of the second bias current IB The output end of the voltage-controlled oscillator VCO is grounded; the output end of the voltage-controlled oscillator VCO is respectively connected to the driver in the switching power supply DC-DC and the first input end of the phase frequency detector PFD. The voltage-controlled oscillator VCO includes: a voltage-controlled current module Gm, a third switch S3, and a current-type relaxation oscillator. The output end of the voltage-controlled current module Gm is connected to one end of the third switch S3, and the other end of the third switch S3 is connected to the input end of the current-type relaxation oscillator. The output end of the current-type relaxation oscillator is respectively connected to the driver in the switching power supply DC-DC and the first input end of the phase frequency detector PFD. Figure 3 The internal clock frequency and the external frequency often differ by several hundred KHz to MHz. This hard switching will cause the PLL&Inter_clk module to have a sharp change in frequency, causing the PWM frequency, constant voltage or constant current output of the driving power MOS tube to change dramatically, which will have an adverse effect on the load.

[0033] The present invention is also provided with a sixth switch S6, the first input end of the voltage comparator is respectively connected to the other end of the first switch S1, one end of the second switch S2, the input end of the capacitor low-pass filter LPF, one end of the sixth switch S6, the first input end of the voltage-controlled current module Gm, the input end of the fourth switch S4, and the output end of the fifth switch S5, the second input end of the voltage comparator is connected to the other end of the sixth switch S6; the Clk_det signal end of the voltage comparator is connected to the Clk_det signal end of the Clk detection module. The output end of the counting latch in the present invention is also respectively connected to the third switch S3 and the sixth switch S6. The counting latch is used to record the number of times the input voltage signal V_lpf of the voltage-controlled oscillator VCO approaches the Vref adjustment. When the external clock is withdrawn, the third switch S3 is disconnected and the sixth switch S6 is closed. By continuously detecting the input voltage signal V_lpf and controlling the shutdown of the fourth switch S4 or the fifth switch S5 through the switch control logic circuit, the input voltage signal V_lpf finally approaches the Vref. At this time, because the two ends of the voltage-controlled current module Gm are almost equal, the current flowing out or drawn is 0, and the PLL&Inter_clk module generation circuit will not have a sharp change in frequency; moreover, the input voltage signal V_lpf will always be clamped at Vref. When the subsequent chip switches from the internal clk operation to the need to synchronize the external clock, the entire PLL loop can be adjusted based on this as the starting point, and there will be no sharp change in frequency during the switching; when the external clock signal is loaded, the sixth switch S6 is disconnected, the third switch S3 is closed, and the phase-locked loop PLL process of synchronizing the external clock is entered. When the input voltage signal V_lpf of the voltage-controlled oscillator VCO approaches Vref, it is soft-switched to the internal clock again.

[0034] The switch control logic circuit in the present invention includes: a first inverter Inv1, a second inverter Inv2, an OR gate Or2 and an AND gate And2, the input end of the first inverter Inv1 is connected to the Clk_det signal end of the Clk detection module, the output end of the first inverter Inv1 is respectively connected to the input end of the second inverter Inv2 and the first input end of the AND gate And2, the output end of the second inverter Inv2 is connected to the first input end of the OR gate Or2, the second input end of the OR gate Or2 and the second input end of the AND gate And2 are both connected to the output end of the voltage comparator, the output end of the OR gate Or2 is connected to the fourth switch S4, and the output end of the AND gate And2 is connected to the fifth switch S5. The voltage comparator compares the input voltage signal V_lpf with Vref, and opens the corresponding fourth switch S4 or fifth switch S5 respectively, and adjusts the input voltage signal V_lpf by continuous charging or discharging, so that it eventually approaches Vref.

[0035] In the present invention, the fourth switch S4 is a PMOS transistor, the gate of the PMOS transistor is connected to the output end of the OR gate Or2, the source of the PMOS transistor is connected to the output end of the upper current source I4, the input end of the upper current source I4 is connected to the operating voltage VDD; the drain of the PMOS transistor is connected to the first input end of the voltage comparator.

[0036] In the present invention, the fifth switch S5 is an NMOS transistor, the gate of the NMOS transistor is connected to the output end of the AND gate And2, the source of the NMOS transistor is connected to the input end of the lower current source I5, and the output end of the lower current source I5 is grounded; the drain of the NMOS transistor is connected to the first input end of the voltage comparator.

[0037] The present invention also provides a bidirectional soft switching method of an external clock synchronization and an internal clock bidirectional soft switching circuit, and the specific process is as follows:

[0038] After the external clock signal is withdrawn, the Clk detection module generates a signal with Clk_det = 0, disconnects the first switch S1 and the second switch S2, and keeps the third switch S3 on. The external clock synchronization and internal clock bidirectional soft switching circuit is enabled, and it starts to continuously detect and adjust the voltage signal V_lpf of the input voltage comparator. Specifically, when the voltage signal V_lpf < Vref, the output result of the voltage comparator controls the conduction of the fourth switch S4 through the OR gate Or2 in the switch control logic circuit, and controls the disconnection of the fifth switch S5 through the AND gate And2. The upper current source I4 continuously charges the capacitor low-pass filter LPF connected to the voltage signal V_lpf, causing the voltage signal V_lpf to gradually increase and approach Vref; when the voltage signal V_lpf > Vref, the output result of the voltage comparator controls the disconnection of the fourth switch S4 and the conduction of the fifth switch S5 through the switch control logic circuit. The lower current source I5 continuously discharges the capacitor low-pass filter LPF connected to the voltage signal V_lpf, causing V_lpf to continuously decrease and approach Vref;

[0039] Finally, the voltage signal V_lpf adjusts back and forth near Vref. The output of the voltage comparator flips between high and low, which is counted by the counting latch. After the counting is full, the result is latched, and the third switch S3, the fourth switch S4, and the fifth switch S5 are disconnected, the voltage comparator is turned off, and the sixth switch S6 is turned on. At this time, the two ends of the voltage-controlled current module Gm are equal, and the flowing or extracted current is 0. It completely switches to the internal clock signal generated by the internal second bias current Ib, so that the starting point of the phase-locked synchronization is the internal clock frequency. Starting from this point, it continuously approaches and synchronizes with the external clock signal, so that the circuit generated by the PLL&Inter_clk module will not have a steep frequency change;

[0040] When the external clock signal is loaded, the Clk detection module generates a signal with Clk_det = 1, disconnects the sixth switch S6 (and keeps it disconnected), the fourth switch S4, and the fifth switch S5, turns off the voltage comparator, clears the latch of the counting latch, turns on the third switch S3, and enters the phase-locked loop PLL process of synchronizing with the external clock.

[0041] The present invention successfully realizes the bidirectional soft switching between synchronous phase-locking and internal clk soft switching. During the switching process, it continuously detects and adjusts the input voltage signal V_lpf of the voltage-controlled oscillator VCO, realizes a smooth transition switch between external clock synchronization phase-locking and internal clk, and can adjust the magnitudes of the upper current source I4 and the lower current source I5 according to the capacitance of the capacitor low-pass filter LPF, so as to control the length of the soft switching transition zone. It can greatly improve the steep change of the chip operating frequency caused by hard switching. The effect schematic diagram is as Figure 6 shown, and the Cadence simulation result is as Figure 7As shown, the switching speed and transition zone duration can be adjusted according to the measured results to achieve a smooth change in the constant voltage or constant current output of the switching power supply DC-DC and improve the reliability of the switching power supply DC-DC.

[0042] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A bidirectional soft switching circuit for external clock synchronization and internal clock, characterized in that: It is disposed on the PLL&Inter_clk module and includes: a voltage comparator, a counting latch, a switch control logic circuit, an upper current source I4, a lower current source I5, a fourth switch S4, and a fifth switch S5. The output end of the voltage comparator is respectively connected to the input end of the counting latch and the switch control logic circuit. The output end of the counting latch is connected to the enable end of the voltage comparator. The output end of the switch control logic circuit is respectively connected to the fourth switch S4 and the fifth switch S5. The fourth switch S4 is also connected to the upper current source I4. The fifth switch S5 is also connected to the lower current mirror I5; After the external clock signal is withdrawn, the voltage comparator continuously detects the input voltage signal V_lpf and compares the input voltage signal V_lpf with Vref. If the input voltage signal V_lpf < Vref, the fourth switch S4 is controlled to conduct through the switch control logic circuit, so that the upper current source I4 charges the input voltage signal V_lpf. If the input voltage signal V_lpf > Vref, the fifth switch is controlled to conduct through the switch control logic circuit, so that the lower circuit source I5 discharges the input voltage signal V_lpf to achieve a soft switching process; The counting latch is used to record the number of times the input voltage signal V_lpf of the voltage-controlled oscillator VCO approaches Vref for adjustment; The PLL&Inter_clk module includes: a Clk detection module, a phase frequency detector PFD, a first switch S1, a second switch S2, a first bias current I A , the second bias current I B , a capacitor low-pass filter LPF, a voltage-controlled oscillator VCO, the CLKIN pin of the Clk detection module is used to receive an external clock input, the output end of the Clk detection module is connected to the first input end of the phase frequency detector PFD, the first output end of the phase frequency detector PFD is connected to one end of the first switch S1, the first bias current I A The output terminal is connected in series, the first bias current I A The input end of the first switch S1 is connected to the working voltage VDD, the second output end of the phase frequency detector PFD is connected to one end of the second switch S2, one end of the second switch S2 is also connected to the other end of the first switch S1, the capacitor low-pass filter LPF, and the input end of the voltage-controlled oscillator VCO, and the other end of the second switch S2 is connected to the second bias current I B The second bias current I B The output end of the voltage controlled oscillator VCO is connected to the driver in the switching power supply DC-DC and the first input end of the phase frequency detector PFD respectively; The voltage-controlled oscillator VCO includes: a voltage-controlled current module Gm, a third switch S3, and a current-mode relaxation oscillator. The output end of the voltage-controlled current module Gm is connected to one end of the third switch S3. The other end of the third switch S3 is connected to the input end of the current-mode relaxation oscillator. The output end of the current-mode relaxation oscillator is used as the output end of the voltage-controlled oscillator VCO and is respectively connected to the driver in the switched-mode power supply DC-DC and the first input end of the phase frequency detector PFD; A sixth switch S6 is also provided. The first input end of the voltage comparator is respectively connected to the other end of the first switch S1, one end of the second switch S2, the input end of the capacitor low-pass filter LPF, one end of the sixth switch S6, the first input end of the voltage-controlled current module Gm, the input end of the fourth switch S4, and the output end of the fifth switch S5. The second input end of the voltage comparator is connected to the other end of the sixth switch S6. The Clk_det signal end of the voltage comparator is connected to the Clk_det signal end of the Clk detection module; The output end of the counting latch is also respectively connected to the third switch S3 and the sixth switch S6.

2. The external clock synchronization and internal clock bidirectional soft switching circuit according to claim 1, characterized in that: The switch control logic circuit includes: a first inverter Inv1, a second inverter Inv2, an OR gate Or2, and an AND gate And2. The input terminal of the first inverter Inv1 is connected to the Clk_det signal terminal of the Clk detection module. The output terminal of the first inverter Inv1 is respectively connected to the input terminal of the second inverter Inv2 and the first input terminal of the AND gate And2. The output terminal of the second inverter Inv2 is connected to the first input terminal of the OR gate Or2. The second input terminal of the OR gate Or2 and the second input terminal of the AND gate And2 are both connected to the output terminal of the voltage comparator. The output terminal of the OR gate Or2 is connected to the fourth switch S4, and the output terminal of the AND gate And2 is connected to the fifth switch S5.

3. The external clock synchronization and internal clock bidirectional soft switching circuit according to claim 2, characterized in that: The fourth switch S4 is a PMOS transistor. The gate of the PMOS transistor is connected to the output terminal of the OR gate Or2. The source of the PMOS transistor is connected to the output terminal of the upper current source I4. The input terminal of the upper current source I4 is connected to the operating voltage VDD. The drain of the PMOS transistor is connected to the first input terminal of the voltage comparator.

4. The external clock synchronization and internal clock bidirectional soft switching circuit according to claim 3, characterized in that: The fifth switch S5 is an NMOS transistor. The gate of the NMOS transistor is connected to the output terminal of the AND gate And2. The source of the NMOS transistor is connected to the input terminal of the lower current source I5. The output terminal of the lower current source I5 is grounded. The drain of the NMOS transistor is connected to the first input terminal of the voltage comparator.

5. A bidirectional soft switching method for the external clock synchronization and internal clock bidirectional soft switching circuit according to any one of claims 1 to 4, characterized in that: The specific process is as follows: When the external clock signal is removed, the Clk detection module generates a signal of Clk_det = 0, enabling the external clock synchronization and internal clock bidirectional soft switching circuit. It starts to continuously detect and adjust the voltage signal V_lpf of the input voltage comparator. Eventually, the voltage signal V_lpf adjusts back and forth near Vref. The output of the voltage comparator flips between high and low, which is counted by the counting latch. After the counting is full, the latch result is latched, and the third switch S3, the fourth switch S4, and the fifth switch S5 are turned off, closing the voltage comparator, and the sixth switch S6 is turned on. At this time, both ends of the voltage-controlled current module Gm are equal, so that the circuit generated by the PLL&Inter_clk module will not have a sudden frequency change. When the external clock signal is loaded, the Clk detection module generates a signal of Clk_det = 1. Keep the sixth switch S6, the fourth switch S4, and the fifth switch S5 turned off, close the voltage comparator, and clear the latch of the counting latch. Turn on the third switch S3 and enter the phase-locked loop PLL process of synchronizing the external clock.

6. The bidirectional soft switching method of the external clock synchronization and internal clock bidirectional soft switching circuit according to claim 5, characterized in that: When it is detected that the voltage signal V_lpf of the input voltage comparator < Vref, the output result of the voltage comparator controls the conduction of the fourth switch S4 through the OR gate Or2 in the switch control logic circuit, and controls the disconnection of the fifth switch S5 through the AND gate And2. The upper current source I4 continuously charges the capacitor low-pass filter LPF connected to the voltage signal V_lpf, making the voltage signal V_lpf gradually increase and approach Vref. When it is detected that the voltage signal V_lpf>Vref of the input voltage comparator, the output result of the voltage comparator controls the disconnection of the fourth switch S4 and the conduction of the fifth switch S5 through the switch control logic circuit, and the lower current source I5 continuously discharges the capacitor low-pass filter LPF hung on the voltage signal V_lpf, so that V_lpf is continuously reduced and approaches Vref.