A MCU chip fault safety protection circuit, method and startup method

By designing the MCU fail-safe protection circuit and using the power module, OR gate and controllable delay voltage comparator, the MCU chip status monitoring and fail-safe mode switching are realized, which solves the problems of low automation and large resource occupation in the existing technology. , improving system reliability and cost-effectiveness.

CN113672414BActive Publication Date: 2024-09-24GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010405380.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-14
Publication Date
2024-09-24
Estimated Expiration
2040-05-14

AI Technical Summary

Technical Problem

The fault protection circuit of the MCU chip in the existing vehicle system is not highly automated and cannot effectively diagnose and implement Failsafe strategies. Moreover, the complex circuit occupies a lot of AD pins and MCU hardware resources, resulting in low reliability.

Method used

An MCU fail-safe protection circuit is designed, including a power module, an OR gate, a controllable delay voltage comparator and a Class D flip-flop. Through voltage comparison and timing control, the status monitoring and fail-safe mode switching of the MCU chip are realized. Fewer ports and resources, low cost.

Benefits of technology

It realizes automatic monitoring of MCU chip status and execution of fail-safe strategies, improves the reliability and automation of the system, and reduces costs and resource occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present invention provides a MCU chip fault safety protection circuit, which at least includes a power module connected to the MCU chip, an OR gate, a first voltage comparator, a second voltage comparator and a D-type trigger, and a triode and an inverter connected to the D-type trigger. The present invention also provides a corresponding MCU chip fault safety protection method and a startup method. The implementation of the present invention can protect the startup and fault safety of the MCU chip, which is easy to implement and has good reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle-mounted MCU chip protection, and in particular to a MCU chip fault safety protection circuit, method and startup method. Background Art

[0002] In-vehicle systems with functional safety level requirements have very high requirements for circuit reliability design. They usually require the ability to monitor the system power supply status and implement failsafe processing strategies. Some manufacturers generally recommend power chip solutions with high integration. Some solutions integrate failsafe strategies, voltage and current status monitoring, startup timing control, etc., but the chip cost is high and usually requires to be used in conjunction with the brand's chip solution;

[0003] In the prior art, there are also some fault protection methods when the power chip is reset. For example, in one solution, an external button can be used to determine different reset modes for two SoC chips according to the button pressing time. However, this solution has the disadvantages of low automation, inability to diagnose, and no failsafe strategy.

[0004] In some other solutions, the MCU, FPGA, and reset module share a power supply. However, when the power supply is abnormal, the abnormality cannot be recorded or reset, and the reliability is not high.

[0005] However, other existing implementation schemes all have more or less deficiencies. For example, some circuits are very complex, and monitoring multiple power supplies will occupy more AD pins and MCU hardware resources. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide an MCU chip fault safety protection circuit, method and startup method, which can protect the startup and fault safety of the MCU chip, are easy to implement and have good reliability.

[0007] In order to solve the above technical problems, as one aspect of the present invention, an MCU fault safety protection circuit is provided, which at least includes a power module connected to the MCU chip, an OR gate, a first voltage comparator, a second voltage comparator and a D-type trigger, and a triode and an inverter connected to the D-type trigger, wherein:

[0008] The output end of the power supply module is respectively connected to the first input end of the first voltage comparator, the first input end of the second voltage comparator, the power input end of the MCU chip and the power input end of the D-type trigger;

[0009] The second input ends of the first voltage comparator and the second voltage comparator are both grounded through a reference power supply; the output end of the first voltage comparator is respectively connected to the reset end of the MCU chip and the input end of the inverter; the output end of the second voltage comparator is respectively connected to the clock input end of the D-type trigger and the base of the triode;

[0010] The reset output terminal of the MCU chip is connected to the data input terminal of the D-type trigger, and its general input and output port is connected to an input terminal of an OR gate;

[0011] The synchronous enable terminal of the D-type flip-flop is connected to the output terminal of the inverter; and the data latch output terminal thereof is connected to the emitter of the transistor;

[0012] The collector of the triode is connected to the enable terminal of the power module, and the base of the triode is connected to the output terminal of the power module through a pull-up resistor;

[0013] The other input end of the OR gate is connected to an external control signal, and its output end is connected to the first end of the first voltage-dividing resistor R1, the second end of the first voltage-dividing resistor is respectively connected to the first end of the second voltage-dividing resistor and the enable end of the power module, and the second end of the second voltage-dividing resistor is grounded.

[0014] Wherein, the first voltage comparator and the second voltage comparator are both voltage comparators with controllable delayed output; when the voltage at the first input terminal of the first voltage comparator is lower than the reference voltage at the second input terminal, its output terminal outputs a low level after a first delay time;

[0015] When the voltage at the first input terminal of the second voltage comparator is lower than the reference voltage at the second input terminal, the output terminal thereof outputs a low level after a second delay time;

[0016] Among them, the detection voltage threshold value of the second voltage comparator is lower than the detection voltage threshold value of the first voltage comparator; the second time is greater than the first time, and is greater than the longest time for the MCU chip to complete internal reset.

[0017] Wherein, the enable terminal of the power module is effective at a high level.

[0018] Among them, before the MCU chip completes the internal reset, its reset output terminal (RESET_OUT) outputs a low level; when the MCU chip completes the internal reset, its reset output terminal (RESET_OUT) outputs a high level.

[0019] Correspondingly, another aspect of the present invention further provides an MCU chip startup method, which is implemented by the aforementioned circuit and is characterized in that it includes the following steps:

[0020] After the MCU chip is powered on normally, before the clock input end of the D-type trigger U0 receives the rising edge signal output by the second voltage comparator, the data latch output end of the D-type trigger is in a high-impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high-impedance state;

[0021] When the clock input end of the D-type trigger U0 receives the rising edge signal output by the second voltage comparator, the reset output end (RESET_OUT) of the MCU chip is at a high level, the output of the D-type trigger is at a high level, and the transistor is in the on state, controlling the enable end of the power module to remain in a high level state, and controlling the power module to maintain a normal power supply state.

[0022] Correspondingly, another aspect of the present invention further provides a MCU chip fault safety protection method, which is implemented by the aforementioned circuit and includes the following steps:

[0023] After the power module supplies power to the MCU chip, when the MCU fails and cannot be powered on, the reset output terminal (RESET_OUT) of the MCU chip is in a locked state and keeps a low level output after the MCU chip is reset;

[0024] Before the clock input terminal of the D-type flip-flop U0 receives the rising edge signal output by the second voltage comparator, the data latch output terminal of the D-type flip-flop is in a high impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high impedance state;

[0025] When the clock input terminal of the D-type trigger U0 receives the rising edge signal output by the second voltage comparator, the reset output terminal (RESET_OUT) of the MCU chip outputs a low level, so that the data latch output terminal of the trigger outputs a low level; the base voltage of the transistor changes from a low level to a high level, the transistor is turned on, so that its collector outputs a low level, the power module is controlled by the latch data latch output terminal, the power module is turned off, and the MCU chip automatically enters a fail-safe mode;

[0026] After the power module is turned off, when its output voltage drops to the threshold value of the first voltage comparator, the output terminal of the first voltage comparator outputs a level, and the data latch output terminal of the D-type trigger is in a high impedance state;

[0027] When the output voltage of the power module drops below the threshold value of the second voltage comparator, the collector of the transistor is in a high-impedance state; the general input and output port (GPIO) signal of the MCU chip and / or the external control signal pass through the OR gate, so that the enable terminal of the power module is pulled back to a high level, the power module is powered on again, and the MCU chip exits the fail-safe mode.

[0028] The implementation of the embodiments of the present invention has the following beneficial effects:

[0029] The present invention provides a MCU chip fault safety protection circuit, method and startup method, which can automatically monitor the state of the MCU chip and its power supply, and when the power supply voltage is abnormal, the MCU chip enters a safe state and automatically executes a failsafe strategy. The present invention is easy to implement, occupies few ports of the MCU chip, occupies few resources inside the MCU chip, has low implementation cost, and has high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying creative labor, other drawings obtained based on these drawings still belong to the scope of the present invention.

[0031] Figure 1 A schematic diagram of the structure of an embodiment of a MCU chip fault safety protection circuit provided by the present invention;

[0032] Figure 2 This is a timing diagram of the MCU chip involved in the present invention when it is normally started;

[0033] Figure 3 This is a timing diagram of the MCU chip involved in the present invention when a safety failure occurs. DETAILED DESCRIPTION

[0034] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.

[0035] like Figure 1As shown, a schematic diagram of the structure of an embodiment of a MCU chip fault safety protection circuit provided by the present invention is shown; in this embodiment, the MCU fault safety protection circuit at least includes a power module (POW) connected to the MCU chip, an OR gate (OR), a first voltage comparator (DT1), a second voltage comparator (DT2) and a D-type trigger (U0), and a triode (Q0) and an inverter (W1) connected to the D-type trigger, wherein:

[0036] The output end of the power module is respectively connected to the first input end (end A) of the first voltage comparator, the first input end (end A) of the second voltage comparator, the power input end (VCC) of the MCU chip, and the power input end (VCC) of the D-type trigger;

[0037] The second input terminals (B terminals) of the first voltage comparator and the second voltage comparator are both grounded through a reference power supply (DC); the output terminal of the first voltage comparator is respectively connected to the reset terminal (RESET) of the MCU chip and the input terminal of the inverter; the output terminal of the second voltage comparator is respectively connected to the clock input terminal (CLK) of the D-type trigger and the base of the triode;

[0038] The reset output terminal (RESET_OUT) of the MCU chip is connected to the data input terminal (D terminal) of the D-type trigger;

[0039] The synchronous enable terminal (OE terminal) of the D-type trigger is connected to the output terminal of the inverter; its data latch output terminal (Q terminal) is connected to the emitter of the transistor;

[0040] The collector of the triode is connected to the enable terminal (EN) of the power module, and the base thereof is connected to the output terminal of the power module via a pull-up resistor Rp;

[0041] One input end of the OR gate is connected to an external control signal (IGON / ACC), and the other input end is connected to a general input and output end (GPIO end) of the MCU chip. The output end of the OR gate is connected to a first end of a first voltage-dividing resistor R1, and a second end of the first voltage-dividing resistor R1 is respectively connected to a first end of a second voltage-dividing resistor R2 and an enable end of the power module, and a second end of the second voltage-dividing resistor R2 is grounded.

[0042] Wherein, the first voltage comparator and the second voltage comparator are both voltage comparators with controllable delayed output; when the voltage at the first input terminal of the first voltage comparator is lower than the reference voltage at the second input terminal, its output terminal outputs a low level after a first delay time;

[0043] When the voltage at the first input terminal of the second voltage comparator is lower than the reference voltage at the second input terminal, the output terminal thereof outputs a low level after a second delay time;

[0044] Among them, the detection voltage threshold value of the second voltage comparator is lower than the detection voltage threshold value of the first voltage comparator; the second time is greater than the first time, and is greater than the longest time for the MCU chip to complete internal reset.

[0045] Wherein, the enable terminal of the power module is effective at a high level.

[0046] Among them, before the MCU chip completes the internal reset, its reset output terminal (RESET_OUT) outputs a low level; when the MCU chip completes the internal reset, its reset output terminal (RESET_OUT) outputs a high level.

[0047] It can be understood that the circuit provided by the present invention has the following working principles of each component:

[0048] Input IGON or ACC control signal to the OR gate externally. After the output of the OR gate OR is divided by resistors R1 and R2, the EN port of the power module POW is controlled. The EN port of the power module POW is high level effective, and the power supply POW is output to the VCC port of the MCU chip and other chips.

[0049] The first voltage comparator (DT1) collects the voltage of port A, and when the voltage of port A collected by the comparator is greater than the reference voltage of port B, it delays for a first time (T1) and outputs a low level signal;

[0050] The second voltage comparator (DT2) collects the voltage of port A, and when the voltage of port A collected by the second voltage comparator is greater than the reference voltage of port B, it outputs a low level signal after a second delay (T2); in the present invention, the second time (T2) must be greater than the first time (T1), and greater than the maximum time for the MCU to complete the internal reset RESET_OUT;

[0051] The detection voltage threshold value of the second voltage comparator (DT2) in the present invention must be lower than the detection voltage threshold value of the first voltage comparator (DT1);

[0052] The signal output by the first voltage comparator (DT1) is input to the RESET port of the MCU as the power-on reset control of the MCU. Before the MCU completes the internal reset, the RESET_OUT port outputs a low level; when the MCU completes the internal reset, the RESET_OUT port is released and outputs a high level;

[0053] The D-type trigger is an information storage device with memory function. Its principle is that when the trigger OE port is high level, the Q port of the D-type trigger outputs a high-impedance state; when the trigger OE port is low level and a rising edge trigger signal appears on the CLK port, the Q port of the D-type trigger will output the current level of the D port; when the OE port of the D-type trigger is low level and the CLK port is low level, the Q port of the D-type trigger outputs an unknown level.

[0054] The function of the pull-up resistor Rp is to pull the base of the transistor Q0 to a high level state when there is no external signal control.

[0055] In the present invention, after the MCU chip is powered on and reset externally, if the MCU chip completes self-test and outputs a high level to the outside within a certain period of time, the system operates normally. If the MCU chip cannot complete self-test, it outputs a default low level to the outside, and the external monitoring circuit automatically cuts off the power supply of the MCU chip, allowing the MCU chip to enter a safe state.

[0056] When the MCU chip is operating normally, if the power supply is abnormal, the monitoring circuit can also reset the MCU chip and put the MCU chip into a safe state. The D-type trigger performs a reset process based on the received comparator and the output of the MCU chip when the power supply output to the MCU chip fails, so that the MCU automatically enters a safe state.

[0057] Correspondingly, another aspect of the present invention further provides an MCU chip startup method, which is implemented by the aforementioned circuit and combined with Figure 2 As shown in the timing diagram in, the method specifically includes the following steps:

[0058] After power-on is normal, before the clock input end of the D-type flip-flop U0 receives the rising edge signal output by the second voltage comparator, the data latch output end of the D-type flip-flop is in a high impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high impedance state; at this time, it is not controlled by the output Q of the D-type latch U0; for this process, please refer to Figure 2 Timing diagram before time point ④;

[0059] When the clock input of the D-type flip-flop U0 receives the rising edge signal output by the second voltage comparator, the reset output (RESET_OUT) of the MCU chip is at a high level, the output of the D-type flip-flop is at a high level, and the transistor is in a conducting state, controlling the enable end of the power module to remain at a high level, and controlling the power module to maintain a normal power supply state. For this process, please refer to Figure 2 Timing diagram at time point ④ and thereafter.

[0060] Correspondingly, another aspect of the present invention also provides a MCU chip fault safety protection method, which is implemented by the aforementioned circuit and combined with Figure 3 As shown in the timing diagram in, the method specifically includes the following steps:

[0061] After the power module supplies power to the MCU chip, when the MCU fails and cannot be powered on, the reset output terminal (RESET_OUT) of the MCU chip is in a locked state and keeps a low level output after the MCU chip is reset;

[0062] Before the clock input terminal of the D-type flip-flop U0 receives the rising edge signal output by the second voltage comparator, the data latch output terminal of the D-type flip-flop is in a high impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high impedance state;

[0063] When the clock input terminal of the D-type flip-flop U0 receives the rising edge signal output by the second voltage comparator, the reset output terminal (RESET_OUT) of the MCU chip outputs a low level, so that the data latch output terminal of the flip-flop outputs a low level; the base voltage of the transistor changes from a low level to a high level, and a forward voltage is generated on the VBE of the transistor, so that the transistor is turned on, so that its collector outputs a low level, and the power module is controlled by the latch data latch output terminal, and the power module is turned off. At this time, although the external input IGON and ACC control signals are input, the voltage-dividing potential of the OR gate OR after passing through R1 and R2 has been pulled to a low level by Q0, so the EN port of the power supply POW is a low level, and POW will shut down and power off, so that the MCU chip automatically enters the fail-safe mode; for this process, please refer to Figure 3 Timing diagram of time point ④ and before;

[0064] After the power module is turned off, when its output voltage drops to the threshold value of the first voltage comparator, the output terminal of the first voltage comparator outputs a level, and the data latch output terminal of the D-type trigger is in a high impedance state; for this process, please refer to Figure 3 Timing diagram at time point ⑤;

[0065] When the output voltage of the power module drops below the threshold value of the second voltage comparator, the collector of the transistor is in a high impedance state; the general input and output port (GPIO) signal of the MCU chip or / and the external control signal pass through the OR gate, so that the enable terminal of the power module is pulled back to a high level, so that the power module is powered on again, and the MCU chip exits the fail-safe mode. For this process, please refer to Figure 3 The timing diagram of time point ⑥ in the figure. Figure 3 The process from time point ② to time point ⑥ is the entire process of the circuit provided by the present invention automatically monitoring the status and automatically executing the failsafe strategy.

[0066] The implementation of the embodiments of the present invention has the following beneficial effects:

[0067] The present invention provides a MCU chip fault safety protection circuit, method and startup method, which can automatically monitor the state of the MCU chip and its power supply, and when the power supply voltage is abnormal, the MCU chip enters a safe state and automatically executes a failsafe strategy. The present invention is easy to implement, occupies few ports of the MCU chip, occupies few resources inside the MCU chip, has low implementation cost, and has high reliability.

[0068] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0070] The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A MCU chip fault safety protection circuit, characterized in that: At least includes a power module connected to the MCU chip, an OR gate, a first voltage comparator, a second voltage comparator and a D-type trigger, and a triode and an inverter connected to the D-type trigger, wherein: The output end of the power supply module is respectively connected to the first input end of the first voltage comparator, the first input end of the second voltage comparator, the power input end of the MCU chip and the power input end of the D-type trigger; The second input ends of the first voltage comparator and the second voltage comparator are both grounded through a reference power supply; the output end of the first voltage comparator is respectively connected to the reset end of the MCU chip and the input end of the inverter; the output end of the second voltage comparator is respectively connected to the clock input end of the D-type trigger and the base of the triode; The reset output terminal of the MCU chip is connected to the data input terminal of the D-type trigger, and its general input and output port is connected to an input terminal of an OR gate; The synchronous enable terminal of the D-type flip-flop is connected to the output terminal of the inverter; and the data latch output terminal thereof is connected to the emitter of the transistor; The collector of the triode is connected to the enable terminal of the power module, and the base of the triode is connected to the output terminal of the power module through a pull-up resistor; The other input end of the OR gate is connected to an external control signal, and its output end is connected to the first end of the first voltage-dividing resistor R1, the second end of the first voltage-dividing resistor is respectively connected to the first end of the second voltage-dividing resistor and the enable end of the power module, and the second end of the second voltage-dividing resistor is grounded.

2. The circuit according to claim 1, characterized in that in: The first voltage comparator and the second voltage comparator are both voltage comparators with controllable delayed output; when the voltage at the first input terminal of the first voltage comparator is lower than the reference voltage at the second input terminal, its output terminal outputs a low level after a first delay time; When the voltage at the first input terminal of the second voltage comparator is lower than the reference voltage at the second input terminal, the output terminal thereof outputs a low level after a second delay time; Among them, the detection voltage threshold value of the second voltage comparator is lower than the detection voltage threshold value of the first voltage comparator; the second time is greater than the first time, and is greater than the longest time for the MCU chip to complete internal reset.

3. The circuit according to claim 2, characterized in that The enable terminal of the power module is effective at a high level.

4. The circuit according to claim 3, characterized in that Before the MCU chip completes the internal reset, its reset output terminal outputs a low level; when the MCU chip completes the internal reset, its reset output terminal outputs a high level.

5. A method for starting an MCU chip, implemented by the circuit according to any one of claims 1 to 4, characterized in that: The steps include: After the MCU chip is powered on normally, before the clock input end of the D-type trigger receives the rising edge signal output by the second voltage comparator, the data latch output end of the D-type trigger is in a high-impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high-impedance state; When the clock input end of the D-type trigger receives the rising edge signal output by the second voltage comparator, the reset output end of the MCU chip is at a high level, the output of the D-type trigger is at a high level, and the transistor is in the on state, the enable end of the power supply module is controlled to remain in a high level state, and the power supply module is controlled to maintain a normal power supply state.

6. A method for protecting an MCU chip from fault safety, implemented by the circuit according to any one of claims 1 to 4, characterized in that: The steps include: After the power module supplies power to the MCU chip, when the MCU fails and cannot be powered on, the reset output terminal of the MCU chip is in a locked state and keeps a low level output after the MCU chip is reset; Before the clock input terminal of the D-type flip-flop receives the rising edge signal output by the second voltage comparator, the data latch output terminal of the D-type flip-flop is in a high impedance state; the base of the transistor is at a low level, the transistor is in a cut-off state, and its collector maintains an output high impedance state; When the clock input terminal of the D-type trigger receives the rising edge signal output by the second voltage comparator, the reset output terminal of the MCU chip outputs a low level, so that the data latch output terminal of the trigger outputs a low level; the base voltage of the transistor changes from a low level to a high level, the transistor is turned on, so that its collector outputs a low level, the power module is controlled by the latch data latch output terminal, the power module is turned off, and the MCU chip automatically enters a fail-safe mode; After the power module is turned off, when its output voltage drops to the threshold value of the first voltage comparator, the output terminal of the first voltage comparator outputs a level, and the data latch output terminal of the D-type trigger is in a high impedance state; When the output voltage of the power module drops below the threshold value of the second voltage comparator, the collector of the transistor is in a high-impedance state; the general input and output port signal of the MCU chip and / or the external control signal pass through the OR gate, so that the enable terminal of the power module is pulled back to a high level, the power module is powered on again, and the MCU chip exits the fail-safe mode.