Clock switching circuit and its precautions
Source: InternetPublisher:拳制龙 Keywords: Power supply DC/DC frequency Updated: 2020/08/01
Now that we have finished talking about the clock synchronization issue, let’s start with another common situation in SOC. Sometimes, in order to consider power consumption and performance issues, a certain module may work at one frequency in one case and another in another case. If you want to work at another frequency, you need to switch the mux at this time. Some people will say, it's not that simple, just add a mux, but is this really the case?
![Clock switching circuit and its precautions](http://www.eeworld.com.cn/circuit/upload/f2d278b69ced42b1cdcde28b6c9299e9/d850aeb7be5245a516c31e2a73c05227.jpg)
As shown in the picture above, everyone will naturally think of a clock switching circuit. However, if you analyze it carefully, you will find that the circuit will have the following problems, glitches! This glitch is not a good thing for either clk0 or clk1, and it does not belong to any For a clock domain, its pulse width cannot be determined at all. The point you switch will affect the width of the glitch.
![Clock switching circuit and its precautions](http://www.eeworld.com.cn/circuit/upload/f2d278b69ced42b1cdcde28b6c9299e9/b5c833f04226ad8bc14a74a2659410b4.jpg)
So how to eliminate burrs and eliminate possible problems later? See the figure below and add a feedback circuit.
![Clock switching circuit and its precautions](http://www.eeworld.com.cn/circuit/upload/f2d278b69ced42b1cdcde28b6c9299e9/590662e68a54a29099b57a18c3252303.jpg)
![Clock switching circuit and its precautions](http://www.eeworld.com.cn/circuit/upload/f2d278b69ced42b1cdcde28b6c9299e9/993f394a97e9d40d61b6c07f4639e97a.jpg)
Feedback is to ensure that the clock is really turned off. For example, select switches from 0 to 1, that is, selects clk1, but at this time it is necessary to ensure that clk0 is completely turned off, so the 1 fed back through the DFF of the clk0 clock domain (if it can be fed back 1 indicates that 0 has entered the DFF of the clk0 clock domain) and is ANDed with the select of the clk1 clock domain.
![Clock switching circuit and its precautions](http://www.eeworld.com.cn/circuit/upload/f2d278b69ced42b1cdcde28b6c9299e9/a4208dbc3a38869044306a1e2bf072e8.jpg)
In addition, in order to solve the cross-clock domain problem (select is different from the clk0 and clk1 clock domains after all), 1-2 levels of DFF are usually added.
In addition, one thing to note when using these circuits is that both clks must oscillate before selecting can be performed. Otherwise, switching may cause the select not to be correctly transmitted to the last level AND gate, thus eliminating glitches. function may not work.
- Cleverly use the electronic ballast of waste energy-saving lamps as power supply transformer
- Using Lead-acid Battery as Power Source for Walkman
- Practical and convenient fax machine power supply control circuit
- Step-down power supply for driving relays
- INA155/INA156 is used to form a single-supply high-side current monitor for detecting load current
- Driving circuit that controls LED brightness using PWM signal
- Detailed explanation of 5v charger circuit diagram
- Principles and precautions of active discharge circuit
- LM317 regulated power supply
- MIC4680 constant current charger
- Digital isolator Si8641 typical circuit and OBC controller system
- Clock switching circuit and its precautions
- Parallel power op amp
- Automatic voltage adjustment circuit of compound-excited DC motor
- Dual-purpose voice-activated switch circuit diagram
- Solar power circuit
- Power circuit of LBO-522 dual trace oscilloscope
- Three-way DC-DC converter circuit
- Commonly used power circuits in printers
- Single phase thyristor slotless nickel plated power circuit