Recently, a product was designed using the CY7C68013A chip. In fact, there is a 51 microcontroller inside to control USB communication. During the test process, it was found that after some circuit boards were powered on, the computer could not find the new USB hardware, nor did it prompt that it could not be recognized, and there was no prompt of UNKNOW DEVICE in the device manager. After careful investigation, it was suspected that the internal 51 microcontroller was not working.
After checking the crystal oscillator, power supply, IO pins, etc., no problems were found. Finally, it was suspected that there was a problem with the circuit reset.
According to the chip data: the VCC rise time cannot be too fast, at least 200us is required. When using a passive crystal oscillator, the reset time must be about 5MS after VCC reaches 3.0V. If it is an external clock, the power-on reset time is about 200us.
When we usually use a single-chip microcomputer, the reset circuit design in the hardware circuit is shown in the figure below. This reset circuit is for low-level effective reset, in which the diode plays the role of quickly releasing the voltage across the capacitor in the event of a power outage, preparing for the next power-on reset.
The initial voltage across the capacitor is U0 (usually set to 0V), and the voltage across the capacitor at time T is UT. The 3.3V voltage is set to VCC.
From the relationship between the current I flowing through the capacitor and the voltage change across the capacitor: I=C*dUt/dt,
we can get: I*dt=C*dU t
. Integrating both sides can get: I*T=∫(0-1)C*dUt; that is, I*T=C*UtC*U0
(where U0=0V), and
from VCC=UR+UT, we can get the formula: VCC=R1*(C*UT/T)+UT.
The capacitor is charged to 0.9*VCC to complete the reset. At this time, we can get T=9*RC, and T is the required reset time. According to the parameters in my own circuit, the reset time
T=900MS is calculated;
but in the actual process, the trigger function of LOTO's OSCA02 oscilloscope is used to capture the waveform state of the reset signal when the normal working USB circuit board is powered on; as shown in the figure below (yellow is the voltage VCC waveform, and blue-green is the reset signal waveform):
Observe the waveform state. When the USB circuit board is powered on normally, the VCC rise time is about 100us and the RESET reset signal is 500us.
When the unresponsive USB circuit board is powered on, the waveform captured by the oscilloscope is shown in Figure 5. VCC can rise from 0V to 3.3V in 100US, while the RESET signal rise time lasts for 400MS and never reaches 3.3V.
When encountering this phenomenon, it is helpful to use an oscilloscope to observe the delay relationship between the power-on reset waveform and the VCC voltage waveform. Of course, it is also convenient to use a USB oscilloscope on a computer. Check whether there are any errors such as cold soldering and leaking soldering around the RESET pin. This time the fault should be the capacitor soldering error. It is normal after replacing a capacitor. The fault is eliminated.