Not Applicable.
The preferred embodiments relate to oscillators and more particularly to oscillator fault detection and self-recovery.
Electronic oscillators are well-known devices operable to produce an oscillating output signal for timing and synchronization in numerous electronic circuits, devices, and industries. In many of these applications, various or all of the oscillator components are combined into an integrated circuit. Moreover, the integrated circuit may include various other circuits and functionality, where for example many contemporary processors include an on-chip oscillator for providing a clock signal that is used to operate the processor.
A common type of on-chip oscillator is a crystal oscillator, which has much of its circuitry on an integrated circuit chip, although a few of the components may be external from the chip. By way of further background,
The operation of oscillator 10 is known in the art and, thus, is only briefly discussed here. In general, at start-up, power (i.e., an electric field) is provided by the Other Oscillator Circuitry so as to begin to excite crystal CR. As the signal difference between the oscillator input and output (i.e., PADs EXTAL and EXTAL) crosses a threshold detected by comparator CMP, the output clock CLK will alternate state. At the same time, the PAD XTAL is fed back to PAD EXTAL and the gate of transistor T1, causing a reverse in polarity and thus toward a sinusoidal operation. As this continues, crystal CR will reach its resonance frequency, and thus the output CLK will stabilize at a corresponding digital output frequency. Lastly, note that automatic level control ALC will control adjustable current source ACS, based on a relative comparison to reference REF, thereby controlling the oscillator output amplitude so as to control both power consumption and potential electromagnetic magnetic interference (EMI) of the oscillator.
While the above oscillator 10 and comparable approaches have proven useful and workable in various implementations, the present inventors recognize that such approaches may have drawbacks. Specifically, in various devices, the oscillator output signal CLK can become inoperable (i.e., the oscillator stops oscillating), including once the device has left the manufacturer and reached a customer. Such result may occur from many different factors. For example, failures may occur on the printed circuit board (PCB) on which the layout of
Given the preceding, the present inventors have identified potential improvements to the prior art, as are further detailed below.
In a preferred embodiment, there is circuitry for providing an oscillating output signal in connection with an integrated circuit chip. This circuitry includes a crystal, off the chip and oscillator circuitry, on the chip, for electrically coupling with the off-chip crystal and operable to produce the oscillating output signal. The preferred embodiment further includes testing circuitry, on the chip, for evaluating whether the oscillating output signal is operating within an acceptable range, as well as operational recovery circuitry, on the chip, for attempting to restore the oscillating output signal, in response to the testing circuitry evaluating that the oscillating output signal is not operating within an acceptable range.
Numerous other inventive aspects and preferred embodiments are also disclosed and claimed.
Fault Recovery Methodology also includes various control and signal lines. A first line CL1 is for control of adjustable current source ACS. A second line CL2 is for control of a switch SW that is in the feedback control path from automatic level control ALC to adjustable current source ACS. A third line CL3 is for control of the transconductance (e.g., effective base size) of transistor T1; more specifically, in the preferred embodiment, the transconductance of transistor T1 is adjustable, for example in response to a binary value so as to select from various (e.g., four) different values of transconductance. As detailed later, this adjustability may be used in conjunction with a preferred embodiment methodology for attempting to re-start oscillator 20. Looking at other signals relating to Fault Recovery Methodology, the output of automatic level control ALC is connected to Fault Recovery Methodology (for CHK2), and the output of the Other Oscillator Circuitry comparator CMP is also connected to Fault Recovery Methodology (for CHK3).
Fault Detect/Correction Circuitry also includes, in one preferred embodiment, two generally duplicated blocks BLK1 and BLK2, both connected to receive various control signals from MCU or other processing circuit as may be included on integrated circuit 200 of
Looking at block BLK1, it includes a LOGIC1 block having various circuitry, as may be ascertained by one skilled in the art, that is controlled for accomplishing functionality described in this document. To illustrate such control, two control signals are shown between MCU and LOGIC1, namely: (1) ren1; and (2) rsel1. The LOGIC1 block is connected to the gate of a p-channel transistor T2 and to the gate of an n-channel transistor T3. The source of p-channel transistor T2 is connected to VDD, the source of n-channel transistor T3 is connected to ground (also sometimes referred to as VSS), and the drains of n-channel transistor T2 and p-channel transistor T3 are connected to a node N1, which is further connected through a resistor R2 (e.g., 20 kOhms) to PAD EXTAL. The MCU also has a data in (din1) for the checker CHK0 and associated data in enable (diena1) and a data out (dout1) and associated data out enable (doena1). More particularly: (1) PAD EXTAL is connected as an input to a buffer B1, which may be enabled by diena1 to provide din1 to the MCU; and (2) the MCU is connected to enable a buffer B2 by doena1 to provide dout1 to PAD EXTAL
Looking at block BLK2, it includes a LOGIC2 comparable to LOGIC1 described above, and thus has ascertainable circuitry to accommodate the above-introduced control signals, here between MCU and LOGIC2, namely: (1) ren2; and (2) rsel2. The LOGIC2 block is connected to the gate of a p-channel transistor T4 and to the gate of an n-channel transistor T5. The source of p-channel transistor T4 is connected to VDD, the source of n-channel transistor T5 is connected to ground, and the drains of p-channel transistor T4 and n-channel transistor T5 are connected to a node N2, which is further connected through a resistor R3 to PAD XTAL. As was the case for block BLK1, with respect to block BLK2, the MCU also has a data in (din2) and associated data in enable (diena2) and a data out (dout2) and associated data out enable (doena2). More particularly: (1) PAD XTAL is connected as an input to a buffer B3 which may be enabled by diena2 to provide din2 to the MCU; and (2) the MCU is connected to enable a buffer B4 by doena2 to provide dout2 to PAD XTAL.
Method 300 commences with a start step 310, followed by a looping condition 320 in which testing occurs to determine if there is an irregularity in the CLK signal, as compared to its nominally expected frequency and/or amplitude. For example, if the CLK signal is outside of expected operation, such as outside an acceptable range of frequency, if there is no oscillation (i.e., if the CLK signal is stuck for an unacceptable period of time at either a 0 or 1). More specifically, in a preferred embodiment, the step 320 testing is via either analog or digital testing, by way of example using the Clock Detection block to analyze the oscillator output CLK signal. For example, in an analog approach, the CLK signal may be applied to a capacitor (not shown) within the Clock Detection block for a predetermined period of time, and then the voltage across that capacitor is measured and compared to an expected value for nominally proper operation. As another example, in a digital approach, the number of transitions in the CLK signal (if any) are counted over a period of time, and that count is compared to an expected value for nominally proper operation. In either example, if the comparison is within an acceptable threshold, then step 320 concludes no fault is detected, and a method loop continues by returning to repeat step 320. If, however, a CLK fault is detected, method 300 continues to step 330.
Step 330 sets a status flag to represent that a fault has been detected in the oscillation output signal of oscillator 20. The flag may be accomplished by setting a logical state (or states) in various different types of electronic storage elements, such as a register in any of the Clock Detection block, LOGIC1, LOGIC2, the MCU, or otherwise. This flag may be checked later for purposes of additional diagnostics or the like. Next, method 300 continues from step 330 to step 340.
Step 340 determines if there is a fault related to an on-chip portion of oscillator 20. In a preferred embodiment, first this determination is achieved by block BLK1 outputting either a pull-up or pull-down test pattern from node N1 to PAD EXTAL, while at the same time each of checkers CHK0, CHK1, CHK2, and CHK3 are examined to determine if the binary value of each matches an expected value, indicating proper operation. If any such checker does not match the expected value, then a fault is thereby detected, according to the following Table 1:
After the heading row, the first data two rows of Table 1 illustrate respective pull-up and pull-down test patterns, and the expected binary value of each of the four checkers, while switch SW is open, thereby indicating no detected fault. In each successive row, however, an underlined value indicated a detected error, and the last column for the respective row indicates the fault. For example, in the third data row of Table 1, a value of CHK1=1 indicates a fault, with the particular fault being that T2 and Ibias have a fault. The remaining examples should be apparent to one skilled in the art, given the Table and teachings of this document. Moreover, additional testing may be applied via block BLK2, applying signals to PAD EXTAL.
Given the preceding, if step 340 determines there is an on-chip fault, method 300 continues to step 350; in step 350, in one preferred embodiment, an alternative source is established to provide the CLK signal. Such a source may be from a backup clock or the like, which preferably would be another type of oscillator, such as an relaxation oscillator or other on-chip oscillator without a crystal. Such an alternative oscillator would be provided at a lower cost and accuracy as compared to oscillator 20. Moreover, if this alternative clock source is not requested by MCU peripherals, it would be enabled only when the crystal-based oscillator 20 fails, as demonstrated in this flow chart. Thereafter, method 300 continues from step 350 to step 355, where the method ends (from where it can later return to step 310 if oscillator 20 is re-started). On the other hand, if step 340 determines there is not an on-chip fault, method 300 continues from step 340 to step 360.
Step 360 determines if there is a fault related to an off-chip portion of oscillator 20. In a preferred embodiment, the step 360 test examines one or both of whether there is a fault in a design connection in the oscillator, meaning an undesirable open circuit or closed circuit in the nominally-intended connections shown off of integrated circuit 200 in
A step 360 test for an open circuit off-chip fault may be performed by a preferred embodiment as follows, as described in connection with
In step 380, having been reached due to detection of an off-chip fault, method 300 provides and/or stores an indication of the detected fault. As with step 330, such an indication may set a status flag to represent that a fault has been detected, where here more specifically the flag indicates that the fault is an off-chip fault, and further the flag may be associated with the particular error, such as specifying whether the open circuit relates to capacitor C1 or capacitor C2. From this indication, therefore, the flag may be polled by a user or manufacturer and the failure addressed, such as a repair made to the off-chip open circuit. Additionally or alternatively, a real-time error also may be generated that affirmatively reports to the board user the existence of the fault, without requiring the user to check the status of a flag or the like. Thereafter, method 300 continues from step 380 to step 385, where the method ends.
Returning to step 360, a test for a short circuit off-chip fault may be performed by a preferred embodiment to test one of various possibilities, including: (1) a short between PADs EXTAL and XTAL; (2) a short between PAD EXTAL and ground (e.g., via a short of capacitor C1); and (3) a short between PAD XTAL and ground (e.g., via a short of capacitor C2). Each of these alternatives is described below.
A step 360 test for an off-chip short circuit fault between PADs EXTAL and XTAL is shown generally in the following Table 2:
As shown in the upper box of Table 2, in a first sub-step (1), a digital value of 1 is applied to PAD XTAL, such as by enabling buffer B4 (via doena2) and providing an output value of dout2=1, and at the same time the other pad, that is, PAD EXTAL, is pulled down by LOGIC1 enabling transistor T3. Also in this sub-step, the value of PAD EXTAL is sampled, such as by enabling buffer B1 and sampling the signal din1, and if the value din1=0, then the determination is that no fault is detected, as the expectation is that the pulling down of PAD EXTAL, if not shorted to PAD XTAL, will discharge PAD EXTAL to ground and cause its voltage to be 0. Note, however, that were PADs EXTAL and XTAL shorted, then the forced dout=1 at PAD XTAL will cause a non-zero voltage to appear at PAD EXTAL, that is, the sampled signal at PAD EXTAL will be din1=1, indicating a fault is detected, as shown in sub-step (1) in the lower box of Table 2. Further in the upper box of Table 2, in a second sub-step (2), a digital value of 0 is applied to PAD XTAL, again by enabling buffer B4 (via doena2) and providing an output value of dout2=0, and at the same time the other pad, that is, PAD EXTAL, is pulled up by LOGIC1 enabling transistor T2. Also in this sub-step, the value of PAD EXTAL is sampled, again by enabling buffer B1 and sampling the signal din1, and if the value din1=1, then the determination is that no fault is detected, as the expectation is that the pulling up of PAD EXTAL, if not shorted to PAD XTAL, will maintain PAD EXTAL to VDD and cause its voltage to be a digital 1. Note, however, that were PADs EXTAL and XTAL shorted, then forced dout=0 at PAD XTAL will cause a zero voltage to appear at PAD EXTAL so that if the sampled signal din1=0, a fault is detected, as shown in sub-step (2) in the lower box of Table 2. Note also in this regard that some amount of time is allowed to pass after the pull-up to avoid contention between the 0 on XTAL and the 1 on EXTAL. Moreover, if there is no short, then din is determined by the resistor divider of R1 and R2. Specifically, considering that R1>>R2, for the no short case then din is near zero. Otherwise, if R1 is shorted, then din is high.
A step 360 test for an off-chip short circuit fault between PAD XTAL and ground (i.e., VSS) is shown generally in the following Table 3:
The general details of pulling a PAD either up or down or data in and data out should be understood from earlier discussion, so the following more briefly reviews what one skilled in the art should understand from Table 3. As shown in the upper box of Table 3, in a first sub-step (1), PAD XTAL is pulled up and at the same time the voltage at that same PAD XTAL is sampled, from din2. If the value din2=1, then the determination is that no fault is detected, as the expectation is that the pulling up of PAD EXTAL, if not shorted to VSS, will keep PAD EXTAL at VDD, that is, providing din2=1. Note, however, that were PADs XTAL shorted to VSS, then the pull-up voltage is discharged and din2=0, thereby indicating a detected fault, as shown in sub-step (1) of the lower box of Table 3. Further in the upper box of Table 3, in a second sub-step (2), a similar operation is performed to the first sub-step, but with an analog analysis rather than a digital one. Thus, again PAD XTAL is pulled up, but in sub-step (2) the PAD XTAL voltage is compared with a voltage from a DAC (e.g., 6 bit), such as in
A step 360 test for an off-chip short circuit fault between PAD XTAL and VDD is shown generally in the following Table 4:
As shown in the upper box of Table 4, in a first sub-step (1), PAD XTAL is pulled down and at the same time the voltage at that same PAD XTAL is sampled, from din2. If the value din2=0, then the determination is that no fault is detected, as the expectation is that the pulling down of PAD XTAL, if not shorted to VDD, will keep PAD XTAL pulled down to VSS, that is, providing din2=0. Note, however, that were PAD XTAL shorted to VDD, then despite the pull-down of voltage at PAD XTAL, din2=1, thereby indicating a detected fault, as shown in sub-step (1) of the lower box of Table 4. Further in the upper box of Table 4, in a second sub-step (2), a similar operation is performed to the first sub-step, but with an analog analysis rather than a digital one. Thus, again PAD XTAL is pulled down, but in sub-step (2) the PAD XTAL voltage is again compared with a voltage from a DAC, and also again the DAC input is increased over time so that its corresponding increasing output voltage may be compared to the voltage at PAD XTAL, until the comparator detects a match. The point at which the voltage matches again represents the relative impedance existing at PAD XTAL, which if relatively low is determined by step 360 to indicate the PAD is not shorted to VDD, and conversely if relatively high is determined by step 360 to indicate the PAD is shorted to VDD.
Returning to method 300, recall that step 320 may detect a CLK fault and continue the process toward steps 340 and 360. If, however, step 340 fails to detect an on-chip fault, and step 360 fails to detect an off-chip fault, then in a preferred embodiment method 300 continues to step 370. In general, with neither an on-chip nor off-chip failure detected, a preferred embodiment further endeavors to attempt to re-start the CLK signal to return it to its desirable oscillation frequency and amplitude, such as by way of MCU control of the DAC. For example, since no specific fault other than in the CLK signal has thus been detected, a preferred embodiment proceeds under an estimation that the oscillator may have been merely stuck in a 0 or 1 condition or subject to some influence that may have been removed or can be overcome, and additional methodology proceeds in an effort to restore nominal operation, as is shown in connection with steps 370, 390, 400, 410, 420, 430, and 440, as further explored below.
Step 370 starts a fault-recovery process, in an effort to recover the CLK signal to its normal, nominal operation (e.g., to unstick it from a value of 0 or 1). In a preferred embodiment, this process is iterative, so in this regard step 370 initializes a loop index i to a value of 0. Next, method 300 continues from step 370 to step 390.
Steps 390, 400, 410, and 420 represent the iterative looping introduced above. Thus, step 390 increments the loop counter, i, and method 300 continues from step 390 to step 400. Step 400 determines if the loop has reached a maximum iteration count, which in the example of
In step 410, a combination of a periodic signal applied to PAD EXTAL and a transconductance selection of transistor T1 is provided, in response to the loop index i. For example, where the loop index is first incremented to i=1, then a periodic signal having a first frequency is applied to PAD EXTAL and a first transconductance (or base size) is applied to transistor T1. Moreover, for each incremented value of i, a respective different combination is applied, changing either the frequency or the transconductance. For example, Table 5, below, illustrates an example of a preferred embodiment list of alternative combinations of frequency/transconductance, given a respective index of i:
Table 5 should be readily understood by one skilled in the art. By way of example in comprehending Table 5, its first row illustrates the selected combination for iteration i=1, wherein the combination applies a first frequency f1 and a first transconductance or base size sz1 to oscillator 20. Returning briefly to
Step 420 is comparable to step 320 described above, that is, to determine if the CLK signal is now operating properly per nominal expectations or specifications. In other words, with step 410 having applied the periodic signal to PAD EXTAL and transconductance to transistor T1, and with no on-chip fault (step 340) or off-chip fault (step 360) having been detected, then a preferred embodiment contemplates the applied periodic signal/base combination may excite the oscillator back into proper operation. Step 420, therefore, determines whether the output CLK signal is proper, such as by evaluating its amplitude and/or frequency. If the CLK signal is proper, method 300 continues from step 420 to step 440, in which case the oscillator operation has been successfully restored; also in this instance, therefore, the transconductance of T1 is maintained at the new value from the iteration in which the CLK signal was restored. If, however, the CLK signal is not proper, method 300 returns from step 420 to step 390.
If step 390 is reached by return from step 420 as described above, then again step 390 increments the loop index i, followed by a check of step 400 to determine if that index has reached a maximum. If the iteration loop count is less than the step 400 maximum, step 410 will again apply a combination of periodic signal to PAD EXTAL and base size to transistor T1, but this time at values corresponding to the new index i that has been incremented. One skilled in the art will appreciate, therefore, that the loop including steps 390 to 420 may repeat up until the maximum number of times (e.g., 16) established by step 400, wherein in each repetition a different frequency signal is applied, by a respective instance of step 410, to PAD EXTAL. Thus, a total of 16 different combinations of frequency/transconductance may be attempted, each endeavoring to excite the oscillator back into proper operation. If proper operation in reached in any of these repeated instances, then again step 420 passes control to step 440. If, however, none of the 16 instances is able to excite proper operation, then method 300 concludes with step 430, described earlier.
The specific frequency values for the four different frequencies output by the DAC (i.e., f1 through f4) shown in Table 5 may be selected using various alternatives. In a preferred embodiment, each of these values may be as shown in the following Table 6:
Also noted earlier is that a preferred embodiment sets the DAC amplitude at Vdd/2. In other embodiments, however, different amplitudes may be used. For example, if it is known that the architecture includes an automatic level control ALC as in the illustrated case of
Lastly, the preferred embodiment also may use various different sizes for the four different transistor bases sizes shown in Table 5. In a preferred embodiment, each of these values may be as shown in the following Table 7:
From the above, various embodiments provide numerous improvements to the prior art. Such improvements include an increase in yield of properly operating oscillators, with additional functionality to test and potentially restore operation of oscillators once they are obtained by consumers. Moreover, the preferred embodiments contemplate detection of faults, either or both of on-chip and off-chip, with the storing of information that may be used by consumers and manufacturers for further improvements based on such information. Still further, the fault detection may be achieved with on-chip circuits alone, or based on a combination of on-chip and off-chip circuits, the latter including bench testing before the chip is released by the manufacturer. Still further, various aspects have been described, and still others will be ascertainable by one skilled in the art from the present teachings. Thus, while various alternatives have been provided according to the disclosed embodiments, still others are contemplated. For example, while
This is a continuation of co-pending International Application No. PCT/CN2015/071730, with an international filing date of Jan. 28, 2015, which designated the United States and is hereby fully incorporated herein by reference for all purposes.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2015/071730 | Jan 2015 | US |
Child | 14814738 | US |