Abnormality detection circuit and audio chip
By introducing an anomaly detection circuit into the audio PWM module and using a logic control module for reset, the problem of abnormal operation caused by external interference in the audio PWM module is solved, achieving stable audio signal output and improving the user experience.
Patent Information
- Application Number
- CN202423032444.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2034-12-09
AI Technical Summary
Audio PWM modules are susceptible to external interference, which can cause malfunctions, output incorrect audio signals, and affect the user experience.
An anomaly detection circuit was designed, including a logic control module, an audio PWM module, an anomaly detection module, and an output module. The anomaly detection module detects anomalies in the audio PWM module, and the logic control module resets the module to restore normal operation.
It effectively solves the problem of abnormal operation of the audio PWM module caused by external interference, ensures stable output of audio signals, and improves the application experience.
Smart Images

Figure CN223503014U_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of audio, specifically relating to an anomaly detection circuit and an audio chip. Background Technology
[0002] Currently, in the audio field, due to the advantages of PWM (Pulse Width Modulation) technology such as high sound quality output, high efficiency, low power consumption, and strong adaptability, more and more audio outputs are using audio PWM modules to achieve output in the form of PWM modulated signals.
[0003] However, audio PWM modules are susceptible to external interference, which can cause them to malfunction and output incorrect audio signals. This results in continuous noise and other abnormalities in the played audio, which greatly affects the user experience. Utility Model Content
[0004] This application provides an anomaly detection circuit and an audio chip, which can solve the problem of abnormal operation of audio PWM modules caused by external interference in related technologies.
[0005] In a first aspect, embodiments of this application provide an anomaly detection circuit, including:
[0006] The system comprises a logic control module, an audio PWM module, an anomaly detection module, and an output module.
[0007] The logic control module has a first control terminal, a detection terminal, and a second control terminal. The audio PWM module has an input terminal, an output terminal, and a reset terminal. The first control terminal of the logic control module is connected to the input terminal of the audio PWM module, and the output terminal of the audio PWM module is connected to the output module.
[0008] The output terminal of the audio PWM module is also connected to the input terminal of the anomaly detection module, the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module.
[0009] Secondly, embodiments of this application provide an audio chip, including the anomaly detection circuit described in the first aspect.
[0010] In this embodiment, the anomaly detection circuit includes a logic control module, an audio PWM module, an anomaly detection module, and an output module. The logic control module has a first control terminal, a detection terminal, and a second control terminal. The audio PWM module has an input terminal, an output terminal, and a reset terminal. The first control terminal of the logic control module is connected to the input terminal of the audio PWM module, and the output terminal of the audio PWM module is connected to the output module. The output terminal of the audio PWM module is also connected to the input terminal of the anomaly detection module, the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module. In this way, since the output terminal of the audio PWM module is connected to the input terminal of the anomaly detection module, anomalies in the audio PWM module can be detected through the anomaly detection module. Furthermore, since the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module, when the anomaly detection module detects abnormal operation of the audio PWM module, the logic control module can reset the audio PWM module and restore its normal operation. Thus, the problem of abnormal operation of the audio PWM module due to external interference in related technologies is solved. Attached Figure Description
[0011] Figure 1 A schematic structural diagram of an anomaly detection circuit provided in an embodiment of this application;
[0012] Figure 2 A schematic structural diagram of another anomaly detection circuit provided in an embodiment of this application;
[0013] Figure 3 A partial structural diagram of an anomaly detection circuit provided in an embodiment of this application;
[0014] Figure 4 A partial schematic diagram of another anomaly detection circuit provided in an embodiment of this application;
[0015] Figure 5 A schematic structural diagram of another anomaly detection circuit provided in an embodiment of this application;
[0016] Figure 6 A partial schematic diagram of another anomaly detection circuit provided in an embodiment of this application;
[0017] Figure 7 A schematic structural diagram of another anomaly detection circuit provided in an embodiment of this application;
[0018] Figure 8 This is a schematic structural diagram of an audio chip provided in an embodiment of this application.
[0019] Explanation of reference numerals in the attached figures:
[0020] 10 - Anomaly detection circuit; 100 - Logic control module; A1 - First detection terminal; A2 - Second detection terminal; 200 - Audio PWM module; 210 - Audio data processing module; 220 - PWM modulation module; 300 - Anomaly detection module; 310 - PWM demodulation module; 311 - Counting unit; 312 - Edge detection unit; 313 - Latch unit; 320 - Data comparison module; 321 - Buffer; 322 - Data comparator; 330 - Edge counting module; 331 - Rising edge counter; 332 - Falling edge counter; 333 - Accumulator; 334 - Comparator; 400 - Output module; 800 - Audio chip. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0022] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0023] To address the issue of audio PWM modules malfunctioning due to external interference in related technologies, the anomaly detection circuit provided in this application can be equipped with an anomaly detection module. The output terminal of the audio PWM module is connected to the input terminal of the anomaly detection module, enabling anomaly detection of the audio PWM module. Furthermore, the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module. When the anomaly detection module detects abnormal operation of the audio PWM module, the logic control module can reset the audio PWM module, restoring its normal operation. This solves the problem of audio PWM modules malfunctioning due to external interference in related technologies.
[0024] The anomaly detection circuit and audio chip provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0025] Figure 1 This is a schematic structural diagram of an anomaly detection circuit provided in an embodiment of this application.
[0026] like Figure 1 As shown, the anomaly detection circuit 10 provided in this application embodiment may include: a logic control module 100, an audio PWM module 200, an anomaly detection module 300, and an output module 400;
[0027] The logic control module 100 has a first control terminal, a detection terminal, and a second control terminal. The audio PWM module 200 has an input terminal, an output terminal, and a reset terminal. The first control terminal of the logic control module 100 is connected to the input terminal of the audio PWM module 200, and the output terminal of the audio PWM module 200 is connected to the output module 400.
[0028] The output terminal of the audio PWM module 200 is also connected to the input terminal of the abnormality detection module 300, the output terminal of the abnormality detection module 300 is connected to the detection terminal of the logic control module 100, and the second control terminal of the logic control module 100 is connected to the reset terminal of the audio PWM module 200.
[0029] In this embodiment, the logic control module 100 can send a control signal to the audio PWM module 200 through the first control terminal to control the audio PWM module 200 to work.
[0030] In this embodiment, the PWM modulation signal output by the audio PWM module 200 is susceptible to external interference. However, in the anomaly detection circuit provided in this embodiment, since the output terminal of the audio PWM module 200 is connected to the input terminal of the anomaly detection module 300, the anomaly detection module 300 can be used to detect anomalies in the PWM modulation signal output by the audio PWM module.
[0031] In this embodiment, the output module 400 can be the IO output module of the audio chip, which can amplify the voltage or power of the PWM modulation signal to enhance the driving capability and output it to the outside of the chip to drive external chips or external audio circuits.
[0032] In this embodiment, when the abnormal detection module detects abnormal operation of the audio PWM module, a reset signal can be sent from the second control terminal of the logic control module to the reset terminal of the audio PWM module to reset the audio PWM module and restore its normal operation. This solves the problem of abnormal operation of the audio PWM module due to external interference in related technologies.
[0033] In this embodiment, the working principle of the anomaly detection circuit 10 is as follows: the logic control module 100 sends a control signal to the audio PWM module 200 through the first control terminal to control the audio PWM module 200 to start working; the PWM modulation signal output by the audio PWM module 200 can be simultaneously output to the anomaly detection module 300 and the output module 400; after receiving the PWM modulation signal, the anomaly detection module 300 can detect whether the PWM modulation signal (e.g., the audio PWM signal) is normal through logical operations; then, it sends the detection result to the detection terminal of the logic control module 100; in the case of an anomaly in the PWM modulation signal, the logic control module 100 can send a reset signal to the reset terminal of the audio PWM module 200 through the second control terminal to reset the audio PWM module 200. Specifically, the logic control module 100 determines whether to send a reset signal to the audio PWM module 200 by processing the anomaly detection result output by the anomaly detection module 300.
[0034] For example, when the audio PWM module 200 malfunctions, the fault detection module 300 can detect the abnormal state and send an fault indication signal to the logic control module 100. Upon receiving the fault indication signal, the logic control module 100 can identify and determine that the output of the audio PWM module 200 has malfunctioned, and send a reset signal to the audio PWM module 200. After the reset, the audio PWM module 200 can resume normal operation.
[0035] The anomaly detection circuit provided according to an embodiment of this application includes a logic control module, an audio PWM module, an anomaly detection module, and an output module. The logic control module has a first control terminal, a detection terminal, and a second control terminal. The audio PWM module has an input terminal, an output terminal, and a reset terminal. The first control terminal of the logic control module is connected to the input terminal of the audio PWM module, and the output terminal of the audio PWM module is connected to the output module. The output terminal of the audio PWM module is also connected to the input terminal of the anomaly detection module, the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module. In this way, since the output terminal of the audio PWM module is connected to the input terminal of the anomaly detection module, anomalies in the audio PWM module can be detected through the anomaly detection module. Furthermore, since the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module, when the anomaly detection module detects abnormal operation of the audio PWM module, the logic control module can reset the audio PWM module and restore its normal operation. Thus, the problem of abnormal operation of the audio PWM module due to external interference in related technologies is solved.
[0036] In one specific embodiment, to ensure the anomaly detection module functions effectively, this application embodiment may reset the anomaly detection module. For example, as... Figure 1 As shown, in the anomaly detection circuit 100 provided in this application embodiment, the anomaly detection module 300 has a reset terminal, and the second control terminal of the logic control module 100 is also connected to the reset terminal of the anomaly detection module 300.
[0037] It is understandable that when the logic control module 100 sends a reset signal to the reset terminal of the audio PWM module 200 through the second control terminal to reset the audio PWM module 200, the logic control module 100 can simultaneously send a reset signal to the abnormality detection module 300 through the second control terminal to initialize the abnormality detection module 300 and enable the abnormality detection module 300 to start working again.
[0038] In this way, since the second control terminal of the logic control module 100 is also connected to the reset terminal of the abnormality detection module 300, the logic control module 100 can send a reset signal to the abnormality detection module 300 at the same time through the second control terminal, thereby realizing the reset of the audio PWM module 200 and the abnormality detection module 300, and keeping the abnormality detection module working effectively.
[0039] In one specific embodiment, the audio PWM module 200 of this application can output audio in the form of a PWM modulation signal. For example, as Figure 2 As shown, in the abnormal detection circuit 100 provided in this application embodiment, the audio PWM module 200 may include an audio data processing module 210 and a PWM modulation module 220; the first control terminal of the logic control module 100 is connected to the input terminal of the audio data processing module 210, the output terminal of the audio data processing module 210 is connected to the input terminal of the PWM modulation module 220, and the output terminal of the PWM modulation module 220 is connected to the output module 400;
[0040] The output of the PWM modulation module 220 is also connected to the input of the anomaly detection module 300.
[0041] The audio data processing module 210 can be used to amplify and reduce noise in the audio data to be output, thereby improving the sound quality.
[0042] The PWM modulation module 220 modulates the audio data to be output into a PWM modulation signal and outputs it to the output module 400. The PWM modulation signal, after being shaped by the peripheral circuits of the chip such as the output module 400, can be heard by the human ear.
[0043] Thus, since the audio PWM module includes an audio data processing module and a PWM modulation module, the audio data processing module improves the sound quality, and the PWM modulation module outputs the audio data in the form of a PWM modulated signal.
[0044] In practical applications, the anomaly detection module 300 can use a variety of anomaly detection methods to detect anomalies in the audio PWM modulation signal. Therefore, the anomaly detection module 300 can be implemented with different structures, as illustrated below.
[0045] In one specific embodiment, the anomaly detection module 300 can use PWM demodulation and data comparison to detect anomalies in the PWM modulated signal. For example, as... Figure 2 As shown, in the anomaly detection circuit 100 provided in this application embodiment, the anomaly detection module 300 may include a PWM demodulation module 310 and a data comparison module 320; the data comparison module 320 has a first input terminal, a second input terminal and an output terminal, and the detection terminal of the logic control module 100 includes a first detection terminal A1;
[0046] The output of the PWM modulation module 220 is connected to the input of the PWM demodulation module 310, the output of the PWM demodulation module 310 is connected to the first input of the data comparison module 320, the output of the audio data processing module 210 is also connected to the second input of the data comparison module 320, and the output of the data comparison module 320 is connected to the first detection terminal A1 of the logic control module 110.
[0047] The PWM demodulation module 310 can be used to demodulate the PWM modulation signal output by the audio PWM module 200 back into the original audio data.
[0048] The data comparison module 320 can be used to compare the audio data output by the PWM demodulation module 310 with the original audio data output by the audio data processing module 210 to determine whether the two audio data are consistent, thereby determining whether the PWM modulation module 220 is in normal working condition.
[0049] For example, if the PWM modulation module 220 is malfunctioning due to external interference, its output PWM modulation signal, after being re-demodulated by the PWM demodulation module 310, will be inconsistent with the original audio data output by the audio data processing module 210, thus identifying the malfunction.
[0050] In this embodiment, the PWM modulation signal output by the audio PWM module 200 can be demodulated into audio data by the PWM demodulation module 310. Then, the data comparison module 320 compares the demodulated audio data with the original audio data output by the audio data processing module 210 to determine whether the PWM modulation signal is abnormal, thereby realizing the abnormal detection of the PWM modulation signal.
[0051] For example, such as Figure 3 As shown, in the anomaly detection circuit 100 provided in this application embodiment, the PWM demodulation module 310 includes a counting unit 311, an edge detection unit 312, and a latching unit 313; the counting unit 311 and the edge detection unit 312 are respectively connected to the latching unit 313.
[0052] The output of the PWM modulation module 220 is connected to the edge detection unit 312, and the latch unit 313 is connected to the first input of the data comparison module 320.
[0053] The counting unit 311 can be a synchronous counter, such as a cyclic counter synchronized with the PWM modulation module 220.
[0054] The edge detection unit 312 can be used to detect the rising edge of the PWM modulation signal or the falling edge of the PWM modulation signal. This application does not impose any specific limitations on this.
[0055] The latch unit 313 can be used to lock the count value of the synchronous cyclic counter when the edge of the PWM modulation signal changes, thereby obtaining the value of the input audio signal.
[0056] For example, the working principle of the PWM demodulation module 310 is the opposite of that of the PWM modulation module 220. The PWM modulation module 220 compares the input audio signal with the count value of a loop counter, and obtains the corresponding high and low level signals as the PWM modulation signal based on the magnitude. Therefore, the duty cycle contains the amplitude information of the input audio signal.
[0057] In the case of PWM modulation for up-counting and down-counting, the PWM modulation signal output by the PWM modulation module 220 is reset at the beginning of a cycle. Therefore, the corresponding input signal amplitude can be obtained by calculating the duration of the high level within a cycle.
[0058] For center-aligned PWM modulation signals, the starting point of their period is difficult to determine, but the count value at the edge transition of the PWM modulation signal is the value of the input audio signal.
[0059] Based on this, the PWM demodulation module 310 can construct a loop counter (i.e., counting unit 311) synchronized with the PWM modulation module 220. By locking the count value of the loop counter synchronized when the edge transition of the PWM modulation signal, the value of the input audio signal can be obtained. For example, the PWM demodulated value and the valid PWM demodulated value signal.
[0060] Since the synchronous cyclic counter (i.e., the counting unit 311) needs to take into account the time delay from when the PWM modulation signal passes through the edge detection unit 312 to when the latch signal is sent to the counter, it has a certain delay with the counter of the PWM modulation module, so it can also be called a pseudo-synchronous cyclic counter.
[0061] In this way, the PWM demodulation module 310 can obtain the demodulated value of the input audio signal by locking the count value of the synchronous cyclic counter when the edge of the PWM modulation signal transitions.
[0062] For example, such as Figure 4As shown, in the anomaly detection circuit 100 provided in this application embodiment, the data comparison module 320 may include a buffer 321 and a data comparator 322. The output terminal of the PWM demodulation module 310 is connected to the data comparator 322. The output terminal of the audio data processing module 210 is connected to the data comparator 322 via the buffer 321. The data comparator 322 is connected to the first detection terminal A1 of the logic control module 100.
[0063] The data comparison module 320 receives an audio signal and a PWM demodulated signal. The audio signal is stored in a buffer 321 (e.g., a first-in-first-out buffer queue). The buffer 321 can also be connected to the PWM demodulation module 310 to store the valid PWM demodulated value signal output by the PWM demodulation module 310. Then, the valid PWM demodulated value signal is used to retrieve the queue value and enable the data comparator 322, thereby achieving matching between the audio signal and the PWM demodulated value.
[0064] The data comparator 322 can compare whether the PWM demodulated value and the audio signal are consistent. If they are inconsistent, it outputs a data abnormality indication signal to the first detection terminal A1 of the logic control module 100, thereby realizing the abnormal detection of the PWM modulation signal.
[0065] In this way, the original audio signal and the valid signal of PWM demodulation value are cached by the buffer 321, and the audio signal is extracted by the valid signal of PWM demodulation value, so as to realize the synchronous matching of audio signal and PWM demodulation value. Then, the data comparator 322 compares whether the PWM demodulation value and the audio signal are consistent, so as to realize the abnormal detection of PWM modulation signal.
[0066] In another specific embodiment, the anomaly detection module 300 can use edge detection to detect anomalies in the PWM modulation signal. For example, as Figure 5 As shown, in the anomaly detection circuit 100 provided in this application embodiment, the anomaly detection module 300 may include an edge counting module 330, and the detection terminal of the logic control module 100 includes a second detection terminal A2.
[0067] The output terminal of the PWM modulation module 220 is connected to the input terminal of the edge counting module 330, and the output terminal of the edge counting module 330 is connected to the second detection terminal A2 of the logic control module 100.
[0068] The edge counting module 330 can be used to calculate whether there are any abnormalities in the edge transitions of the PWM modulation signal output by the PWM modulation module 220, such as abnormal number of edges or abnormal edge duty cycle.
[0069] Thus, in this embodiment of the application, the edge counting module 330 can perform edge detection on the PWM modulation signal output by the audio PWM module 200. By determining whether the number of edges of the PWM modulation signal is within a preset reasonable range, or by determining whether the edge duty cycle of the PWM modulation signal is within a preset reasonable threshold range, the abnormality detection of the PWM modulation signal can be achieved.
[0070] For example, the working principle of the edge counting module 330 is described by taking the determination of whether the number of edges of the PWM modulation signal is within a preset reasonable range. Figure 6 As shown, in the anomaly detection circuit 100 provided in this application embodiment, the edge counting module 330 includes a rising edge counter 331, a falling edge counter 332, an accumulator 333, and a comparator 334;
[0071] The output of the PWM modulation module 220 is connected to the rising edge counter 331 and the falling edge counter 332. The rising edge counter 331 and the falling edge counter 332 are connected to the accumulator 333. The accumulator 333 is connected to the comparator 334. The comparator 334 is connected to the second detection terminal A2 of the logic control module 100.
[0072] It should be noted that a normally functioning PWM modulation signal undergoes one high-low level transition within one cycle of the loop counter, corresponding to one or two edge transitions. However, potential anomalies in the PWM modulation module 220, such as malfunctions of the loop counter within the module or misalignment between the counter cycle start and the data cycle start, can ultimately lead to multiple high-low level transitions in the output PWM modulation signal within one counter cycle. Therefore, this embodiment can determine whether the PWM modulation module 220 is malfunctioning by calculating the cumulative number of edges during level transitions within one counter cycle and comparing this number to a reasonable range.
[0073] Specifically, the rising edge counter 331 is used to detect the number of rising edges of the PWM modulation signal within one cycle of the counter. The falling edge counter 332 is used to detect the number of falling edges of the PWM modulation signal within one cycle of the counter. The accumulator 333 is used to accumulate the number of rising edges and the number of falling edges within one cycle of the counter to calculate the total number of edges accumulated during level transitions within one counter cycle. The comparator 334 is used to compare whether this total number of edges is within a reasonable range. If the comparator 334 determines that the total number of edges is outside the reasonable range, it outputs an edge count abnormality indication signal to the second detection terminal A2 of the logic control module 100, thereby realizing the abnormal detection of the PWM modulation signal.
[0074] Thus, in this embodiment of the application, a rising edge counter 331, a falling edge counter 332, an accumulator 333, and a comparator 334 can be used to calculate the abnormal number of edges of the PWM modulation signal output by the PWM modulation module 220, thereby determining whether the PWM modulation signal is abnormal and thus realizing the abnormal detection of the PWM modulation signal.
[0075] In practical applications, to increase the coverage of anomaly detection, the anomaly detection module can simultaneously employ multiple detection methods, such as... Figure 7 As shown, the anomaly detection circuit 100 provided in this application embodiment may include a logic control module 100, an audio PWM module 200, an anomaly detection module 300, and an output module 400;
[0076] The logic control module 100 has a first control terminal, a first detection terminal A1, a second detection terminal A2, and a second control terminal. The first control terminal of the logic control module 100 is connected to the input terminal of the audio data processing module 210, the output terminal of the audio data processing module 210 is connected to the input terminal of the PWM modulation module 220, and the output terminal of the PWM modulation module 220 is connected to the output module 400.
[0077] The anomaly detection module 300 may include a PWM demodulation module 310, a data comparison module 320, and an edge counting module 330.
[0078] The output of the PWM modulation module 220 is connected to the input of the PWM demodulation module 310, the output of the PWM demodulation module 310 is connected to the first input of the data comparison module 320, the output of the audio data processing module 210 is also connected to the second input of the data comparison module 320, and the output of the data comparison module 320 is connected to the first detection terminal A1 of the logic control module 110.
[0079] The output terminal of the PWM modulation module 220 is connected to the input terminal of the edge counting module 330, and the output terminal of the edge counting module 330 is connected to the second detection terminal A2 of the logic control module 100.
[0080] Thus, when the PWM modulation module 220 malfunctions, its output PWM modulation signal, after passing through the data comparison module 320 and the edge counting module 330, can output anomaly detection results to the first detection terminal A1 and the second detection terminal A2 of the logic control module 100, respectively. If either of the two detection results indicates an anomaly, the logic control module 100 can send a reset signal to the PWM modulation module 220 to restore the normal operating state of the audio PWM module 200. Furthermore, since the anomaly detection module can use both PWM demodulation followed by data comparison and edge counting, the coverage of anomaly detection can be increased, ensuring the normal operation of the audio PWM module as much as possible.
[0081] Based on the same technical concept as the anomaly detection circuit provided in the above embodiments, this application also provides an audio chip, including the anomaly detection circuit provided in any of the above embodiments.
[0082] Figure 8 This is a schematic diagram of an audio chip provided in an embodiment of this application.
[0083] like Figure 8 As shown, the audio chip 800 provided in this application embodiment includes the anomaly detection circuit 10 provided in any of the above embodiments.
[0084] It should be noted that the audio chip provided in this application embodiment includes the anomaly detection circuit provided in any of the above embodiments, and can realize all the functions of the anomaly detection circuit provided in any of the above embodiments. To avoid repetition, it will not be described again here.
[0085] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0086] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An anomaly detection circuit, characterized in that, include: The system comprises a logic control module, an audio PWM module, an anomaly detection module, and an output module. The logic control module has a first control terminal, a detection terminal, and a second control terminal. The audio PWM module has an input terminal, an output terminal, and a reset terminal. The first control terminal of the logic control module is connected to the input terminal of the audio PWM module, and the output terminal of the audio PWM module is connected to the output module. The output terminal of the audio PWM module is also connected to the input terminal of the anomaly detection module, the output terminal of the anomaly detection module is connected to the detection terminal of the logic control module, and the second control terminal of the logic control module is connected to the reset terminal of the audio PWM module.
2. The anomaly detection circuit according to claim 1, characterized in that, The anomaly detection module has a reset terminal, and the second control terminal of the logic control module is also connected to the reset terminal of the anomaly detection module.
3. The anomaly detection circuit according to claim 1, characterized in that, The audio PWM module includes an audio data processing module and a PWM modulation module; the first control terminal of the logic control module is connected to the input terminal of the audio data processing module, the output terminal of the audio data processing module is connected to the input terminal of the PWM modulation module, and the output terminal of the PWM modulation module is connected to the output module. The output of the PWM modulation module is also connected to the input of the anomaly detection module.
4. The anomaly detection circuit according to claim 3, characterized in that, The anomaly detection module includes a PWM demodulation module and a data comparison module; the data comparison module has a first input terminal, a second input terminal, and an output terminal, and the detection terminal of the logic control module includes a first detection terminal; The output of the PWM modulation module is connected to the input of the PWM demodulation module, the output of the PWM demodulation module is connected to the first input of the data comparison module, the output of the audio data processing module is also connected to the second input of the data comparison module, and the output of the data comparison module is connected to the first detection terminal of the logic control module.
5. The anomaly detection circuit according to claim 4, characterized in that, The PWM demodulation module includes a counting unit, an edge detection unit, and a latching unit; the counting unit and the edge detection unit are respectively connected to the latching unit. The output of the PWM modulation module is connected to the edge detection unit, and the latch unit is connected to the first input of the data comparison module.
6. The anomaly detection circuit according to claim 5, characterized in that, The counting unit is a cyclic counter synchronized with the PWM modulation module.
7. The anomaly detection circuit according to claim 4, characterized in that, The data comparison module includes a buffer and a data comparator. The output of the PWM demodulation module is connected to the data comparator. The output of the audio data processing module is connected to the data comparator via the buffer. The data comparator is connected to the first detection terminal of the logic control module.
8. The anomaly detection circuit according to claim 3, characterized in that, The anomaly detection module includes an edge counting module, and the detection end of the logic control module includes a second detection end; The output terminal of the PWM modulation module is connected to the input terminal of the edge counting module, and the output terminal of the edge counting module is connected to the second detection terminal of the logic control module.
9. The anomaly detection circuit according to claim 8, characterized in that, The edge counting module includes a rising edge counter, a falling edge counter, an accumulator, and a comparator; The output of the PWM modulation module is connected to the rising edge counter and the falling edge counter, the rising edge counter and the falling edge counter are connected to the accumulator, the accumulator is connected to the comparator, and the comparator is connected to the second detection terminal of the logic control module.
10. An audio chip, characterized in that, Includes the anomaly detection circuit as described in any one of claims 1 to 9.