patents.google.com

CN117250551A - Power rail monitoring system and method - Google Patents

  • ️Tue Dec 19 2023

Detailed Description

The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.

As shown in fig. 1, a schematic structural diagram of an embodiment 1 of a power rail monitoring system provided in the present application includes the following structures: a primary monitoring module 101 and a secondary monitoring module 102;

the primary monitoring module 101 is respectively connected with at least two primary power rails and is used for monitoring the primary power rails to obtain a first monitoring result;

the secondary monitoring module 102 is connected with the at least two primary power rails and the at least one secondary power rail respectively, and monitors the primary power rails and the secondary power rails to obtain a second monitoring result;

the secondary monitoring module characterizes that the at least two primary power rails meet a voltage threshold condition based on the first monitoring result to start monitoring.

The primary monitoring module and the secondary monitoring module are integrated modules, and can monitor a plurality of power rails connected with the primary monitoring module and the secondary monitoring module respectively.

The first monitoring result indicates that the primary power rail is running normally, the embedded microcontroller can run normally, if the primary power rail is not running normally, the operation of the embedded microcontroller may be affected, the abnormal operation needs to be responded to, so as to protect the operation safety of the embedded microcontroller, the process will be described in detail in the following embodiments, and the detailed description is omitted in the present embodiment.

The second monitoring result indicates that the secondary power rail is running normally, the embedded microcontroller can run normally, if the primary power rail or the secondary power rail is running abnormally, the operation of the embedded microcontroller may be affected, and the abnormal condition is responded to, so that the operation safety of the embedded microcontroller is protected, the process will be described in detail in the following embodiments, and the detailed description is omitted in the present embodiment.

The primary monitoring module and the secondary monitoring module of the power rail monitoring system are respectively provided with different pins, and the pins can be respectively connected with different power rails.

Wherein, the primary power rail and the secondary power rail that relate to in this application are each power rail that relates to in on-vehicle control chip.

The importance of the primary power rail is higher than that of the secondary power rail, and the secondary power rail is controlled to supply power only after the primary power rail can normally supply power in the running process of the vehicle-mounted embedded microcontroller.

The primary power rail has higher importance and is generally a power rail of a main power rail domain; the importance of the secondary power rail is slightly lower, and the secondary power rail is generally a power rail with a power rail domain or a power rail connected with an external analog interface.

In specific implementation, the first-stage monitoring module and the second-stage monitoring module monitor the first-stage power rail and the second-stage power rail in sequence respectively, the first-stage monitoring module monitors the first-stage power rail first, when the voltage of the first-stage power rail represented by the first monitoring result meets the threshold condition, the first-stage monitoring module continues to detect the first-stage power rail, and then the second-stage monitoring module can start to monitor the first-stage power rail and the second-stage power rail simultaneously until power-down stops detecting.

The threshold condition may specifically be that the voltage of the power rail is not lower than a rated threshold, and in a specific implementation, in order to prevent erroneous judgment, a positive and negative range of the rated threshold may be set, and the voltage of the power rail may be considered to satisfy the threshold condition without being lower than the positive and negative range of the rated threshold.

For example, the positive and negative ranges may be ±10%, and of course, the values of the positive and negative ranges are set according to practical situations, which is not limited in the present application.

For example, the primary power supply rail includes an external input power supply rail V EXT 3.3V rectifier power rail V DDP3 1.1V core power rail V DD Etc. the secondary power supply rail comprises an analog power supply rail V DDSE And V DDM Power supply rail V of internal pre-rectifier EVRSE Etc.

It should be noted that the above-mentioned identifiers of several power supply rails are naming modes of power supply rails in electronic devices, specifically, V EXT Represents an external power supply rail, V DDP3 3.3V supply rail, V, representing the output of the chip internal rectifier DD 1.1V kernel power supply rail representing output of chip internal rectifier and V DDM Refers to a power rail and V for supplying power to an analog part by a chip EVRSB Refers to a chip low-power consumption power supply rail domain power supply rail which is converted into a V of 1.1V through a rectifier DDSB

It should be noted that the power supply rails specifically included in the primary power supply rail and the secondary power supply rail are not limited to the above examples, and may be set according to the specific situation of the vehicle-mounted power supply rail in the specific implementation.

In the schematic diagram shown in fig. 1, two or more power rails may be connected to the primary monitoring module and the secondary monitoring module, and in a specific implementation, each monitoring module may be connected to three power rails, even fewer or more power rails, which is not limited in the number of power rails connected to each monitoring module in this application.

Specifically, the primary monitoring module only monitors a primary power rail of the primary power rail domain, and the primary power rail directly triggers reset once the primary power rail does not meet the condition of the primary monitoring module; the secondary monitoring module monitors all power rails of the primary power rail of the main power rail domain and the secondary power rail of the standby power rail domain, and correspondingly, the monitoring abnormality can be reset or alarmed and the like.

The structures of the primary monitoring module and the secondary monitoring module will be described in detail in the following embodiments, which will not be described in detail in this embodiment.

To sum up, the power rail monitoring system provided in this embodiment includes: the first-stage monitoring modules are respectively connected with at least two first-stage power rails and are used for monitoring the first-stage power rails to obtain a first monitoring result; the second-level monitoring module is respectively connected with the at least two first-level power rails and the at least one second-level power rail, and monitors the first-level power rails and the second-level power rails to obtain a second monitoring result; the secondary monitoring module characterizes that the at least two primary power rails meet a voltage threshold condition based on the first monitoring result to start monitoring. In this embodiment, the system can monitor the first-stage power supply rail and the second-stage power supply rail that the importance is different respectively, and when guaranteeing that the first-stage power supply rail satisfies the voltage threshold condition, the control of just starting second-stage monitoring module need not to set up corresponding comparator to every power supply rail, has simplified monitoring system, and moreover, first-stage monitoring module and second-stage monitoring module can monitor a plurality of power supply rails respectively, have realized the different monitoring scheme to different power supply rails.

As shown in fig. 2, a schematic structural diagram of an embodiment 2 of a power rail monitoring system provided in the present application includes the following structures: a primary monitoring module 201 and a secondary monitoring module 202;

the structural function of the secondary monitoring module is identical to that of the foregoing embodiment 1, and details thereof are omitted in this embodiment.

Wherein, the primary monitoring module 201 comprises: at least two first comparator circuits 2011;

the at least two first comparator circuits 2011 are sequentially and correspondingly arranged with the primary power rail, and compare the voltage of the primary power rail with a corresponding set voltage threshold value to output a normal signal or an abnormal signal.

The number of the first comparator circuits is the same as the number of the first-stage power rails which can be monitored by the first-stage detection module.

In fig. 2, 3 first comparator circuits are taken as an example, and the number of the first comparator circuits is not limited.

The set voltage threshold is used for determining whether the primary power rail is normal or not, and in this embodiment, the set voltage threshold is used for judging whether the primary power rail is under-voltage, if so, the primary power rail is abnormal in power supply, and if not, the primary power rail is normal in power supply.

Specifically, when the voltage of the primary power rail is greater than the corresponding set voltage threshold, the first comparator circuit outputs a normal signal, and the primary monitoring module continues to detect.

Specifically, when the voltage of the primary power rail is smaller than the corresponding set voltage threshold, the first comparator circuit outputs an abnormal signal and triggers the system reset.

The first comparator circuit determines whether the primary power rail is under voltage, and then compares the voltage of the primary power rail with the set voltage threshold, when the voltage of the primary power rail is smaller than the set voltage threshold, the primary power rail is under voltage, and the first comparator circuit outputs an abnormal signal to trigger the system to reset.

Wherein the exception signal is in particular a reset signal for triggering a system reset, which may be a low level, for example, based on which the system triggers a reset.

Wherein the normal signal may be a high level, which the system receives and does not respond to.

In a specific implementation, since any one of the plurality of primary power rails is undervoltage and triggers the system reset, an or gate may be provided, the outputs of the plurality of first comparator circuits are respectively connected with the inputs of the or gate, the outputs of the or gate are connected with the system, any one of the inputs of the or gate is an abnormal signal, and the abnormal signal is output to trigger the system reset.

It should be noted that, because the primary power rail is a power rail belonging to the main power rail domain, the importance degree is higher, and the primary power rail belongs to a power rail for ensuring normal and stable external power supply of the vehicle-mounted control chip, so that once the condition of under-voltage of the first unit is determined, the reset is triggered so as to ensure the safety of the vehicle-mounted control chip.

In specific implementation, the function of the first comparator circuit can be set according to the actual situation, if the first-stage power rail needs to be detected to be overvoltage, the relation between the voltage of the first-stage power rail and the overvoltage upper limit threshold can be set, the output signal represents whether the voltage of the first-stage power rail is larger than the overvoltage upper limit threshold or not, if the voltage of the first-stage power rail is larger than the overvoltage upper limit threshold, an abnormal signal is output, otherwise, a normal signal is output.

Specifically, the output end of the primary monitoring module is connected with the input end of the SAC (Safe alarm control, safety alarm control module) so that the SAC controls the system to reset based on the abnormal signal.

The primary monitoring module can monitor primary power rails with different voltages.

Specifically, this one-level power rail includes: 5V (volt) or 3.3V external input power supply rail V EXT 3.3V rectifier power rail V DDP3 1.1V core power rail V DD And the number of the first-stage power rails is 3, and correspondingly, the number of the first comparator circuits in the first-stage monitoring module is 3.

It should be noted that, the number of the first comparator circuits included in the primary monitoring module is set according to actual conditions, and the number of the first comparator circuits in the primary monitoring module is not limited in the application.

It should be noted that, the voltage of the input power rail connected to each comparator may be set according to the actual situation, and the voltages of the input power rails connected to any two comparators may be the same or different, which is not limited in the present application specifically according to the actual situation.

The first comparator circuit is used for comparing the accessed voltage of the power rail with a corresponding set voltage threshold value, and outputting a reset signal when the accessed voltage of any power rail is smaller than the corresponding set voltage threshold value.

Wherein, be provided with the internal power rail and provide the electric energy for it on, consequently, this internal power rail carries out the reset, is to this embedded microcontroller's whole power on reset.

In an embodiment, the power rail of the embedded microcontroller is also monitored by a comparator unit of the primary monitoring module.

In a specific implementation, if the level of the abnormal signal is a different level than the trigger level that triggers the system reset, for example, the level of the abnormal signal is a high level, and the level of the signal that does not trigger the system reset is a low level, a level turning structure may be set to turn the signal level output by the first comparator circuit, to turn the low level of the normal signal to the not high level, and to turn the high level of the abnormal signal to the low level, so that the service of the system can be triggered based on the abnormal signal.

In a specific implementation, the system reset pin may be a PROST pin, where the PROST is a power-on reset pin of the embedded microcontroller, and is used to keep an external high level, the level adjustment module is a pull-down resistor, and the reset signal output by the first judging unit is pulled down strongly through the pull-down resistor, so that the PROST pin is at a low level, and triggers a system power-on reset in the embedded microcontroller.

Specifically, in order to adjust the set voltage threshold corresponding to any input end in each comparator, a register is set for each input end, and the register is used for adjusting the voltage threshold.

Specifically, in order to achieve accurate adjustment, two registers may be provided, one for adjusting the coarse gear of the voltage and the other for adjusting the fine gear of the voltage. In the following embodiments, the register adjustment voltage threshold will be described in detail by taking the register of the gear adjustment in the second-stage monitoring module as an example, and the setting of the register in the first comparator circuit may refer to the explanation of the second-stage monitoring module in the following embodiments, which will not be described in detail in this embodiment.

It should be noted that the primary monitoring module and the secondary monitoring module collect an integrated module, which has a certain transient response capability and can accurately monitor the transient change of the connected power rail.

To sum up, the power rail monitoring system provided in this embodiment, the first-stage monitoring module includes: and the first comparator circuits compare the voltage of the primary power rail with corresponding set voltage thresholds and output normal signals or abnormal signals. In this embodiment, the primary monitoring module includes a plurality of first comparator circuits, which can monitor each primary power rail respectively, and perform parallel processing, so as to improve the efficiency of the primary monitoring module.

As shown in fig. 3, a schematic structural diagram of embodiment 3 of a power rail monitoring system provided in the present application includes the following structures: a primary monitoring module 301 and a secondary monitoring module 302;

the structural function of the primary monitoring module is identical to that of the foregoing embodiment 1, and details thereof are omitted in this embodiment.

Wherein the secondary monitoring module 302 comprises at least one comparator unit 3021;

wherein the comparator unit 3021 is connected to at least two primary power rails and at least one secondary power rail, respectively;

the comparator unit compares the voltage of the primary power rail and the voltage of the secondary power rail with corresponding set voltage threshold ranges respectively and outputs a normal signal or an abnormal signal.

The secondary monitoring module can monitor the primary power rail and the secondary power rail with different voltages.

Specifically, the secondary power rail includes: 5V or 3.3V analog power supply rail V DDM Analog power supply rail V of 5V or 3.3V EVRSE Power supply rail V of internal pre-rectifier DDSE Etc.

The comparator unit is provided with a plurality of pins which are correspondingly connected with the primary power rail and the secondary power rail respectively.

The number of pins of the comparator units is limited, one comparator unit can be connected with a primary power rail or a secondary power rail, the primary power rail and the secondary power rail can be connected, and the types of the connected power rails can be set according to actual conditions, so that the comparator unit is not limited in the application.

For example, the connection may be made according to the voltage of the power supply rail, and if there are two comparator units, one comparator unit is connected to a higher voltage of the power supply rail and the other comparator unit is connected to a lower voltage of the power supply rail.

For example, the comparator unit 1 can be connected to 2 power supply rails of 5V and 3.3V, respectively, and the comparator unit 2 can be connected to 2 power supply rails of 1.8V and 0.8V, respectively.

It should be noted that the number of power rails connected to each comparator unit may be the same or different, and specifically, the number of power rails connected to each comparator unit is not limited in the present application according to the actual situation.

It should be noted that, the voltage of the input power rail connected to each comparator unit may be set according to the actual situation, and the voltages of the input power rails connected to any two pins may be the same or different, which is not limited in the present application specifically according to the actual situation.

Specifically, the comparator unit compares the accessed power rail voltage with a corresponding set voltage range, and outputs an abnormal signal or a normal signal.

As shown in fig. 4, a schematic diagram of a secondary monitoring module is shown, where the secondary monitoring module includes two comparator circuits 401-402, and further includes a chip power rail 403 and a pull-up resistor 404. The comparator circuit 401 has 4 input terminals 1-4, a ground terminal GND and a reset pin, wherein the input terminal 1 is used for connecting a +5v power supply rail, the input terminal 2 is used for connecting a +3.3v power supply rail, the input terminal 3 is used for connecting a +2.5v power supply rail, the input terminal 4 is used for connecting a +1.2v power supply rail, the input terminal 4 realizes input through two 7.9kΩ (ohm) and 10kΩ voltage dividing resistors, and the reset pin is connected with a reset source input pin of a power supply rail unit; the comparator circuit 402 has 4 inputs 1-4, a ground GND and a reset pin, the input 1 is used to connect to a +1.5v power rail, the input 2 is used to connect to a +3v power rail, the input 3 is used to connect to a +1.8v power rail, the input 4 is used to connect to a +0.9v power rail, wherein the input 1 is used to input the power rail voltage through two resistors (14.1 kΩ and 10kΩ), the input 4 is used to input through two resistors (4.5 kΩ and 10kΩ), and the reset pin is connected to the reset source input pin of the power rail unit; the input power rail VCC of the chip power rail 403 is connected to the input 2 of the first comparator circuit, which comparator circuit 401 also monitors the input power rail of the power rail unit. A pull-up resistor 404 is disposed between the reset output pins of the two comparator units and the reset source input pin of the chip power rail 403, and the other end of the pull-up resistor is connected to the input power rail VCC of the power rail unit.

As shown in fig. 5, a schematic structural diagram of a comparator unit in embodiment 3 of a power rail monitoring system provided in the present application, the comparator unit includes: a second comparator circuit 501 and a register circuit 502;

wherein the second comparator circuit 501 is connected to the primary power rail and the secondary power rail respectively;

wherein the register circuit 502 is connected to the second comparator circuit 501, and is configured to set a voltage threshold range of the connected second comparator circuit;

a second comparator circuit is correspondingly connected with a register circuit.

The structure of each comparator unit in the two-stage monitoring module is identical to that of fig. 4, and the detailed description of the structure of each comparator unit in the two-stage monitoring module is omitted.

Specifically, when the voltage of the primary power rail or the voltage of the secondary power rail belongs to a corresponding set voltage threshold range, the second comparator circuit outputs a normal signal, and the secondary monitoring module continues to detect.

Specifically, when the voltage of the primary power rail or the voltage of the secondary power rail does not belong to the corresponding set voltage threshold range, the second comparator circuit outputs an abnormal signal and triggers the system reset.

In a specific implementation, the second comparator circuit is configured to compare the voltage of the power rail connected to the second-stage monitoring module with a corresponding set voltage threshold range, and if the voltage of the power rail belongs to (falls into) the corresponding set voltage threshold range, the voltage of the power rail is normal, the second comparator circuit outputs a normal signal, and the second-stage monitoring module continues to monitor; otherwise, the second comparator circuit outputs an abnormal signal to trigger the system to reset.

For example, when the voltage of the connected power rail is smaller than the lower limit of the corresponding set voltage range or larger than the upper limit of the corresponding set voltage range, an abnormal signal is output.

In a specific implementation, in order to reduce the burden of the system caused by frequent triggering of the reset, a rule for triggering the reset may be set, and other conditions for receiving the abnormal signal may be increased.

For example, the rule specifies that an alarm is given priority based on an abnormal signal, and an alarm signal is generated to give an alarm based on the reception of the abnormal signal; and recording the times of receiving the abnormal signals and the interval time, and triggering corresponding application reset or system reset of the power rail if the times of receiving the abnormal signals in a short time are larger than a threshold value.

In a specific implementation, the output end of the secondary monitoring module is connected with the input end of the SAC, so that the SAC alarms or triggers system reset based on the set rules.

In a specific implementation, the normal signal output by the comparator unit is a low level, and the abnormal signal is a high level.

In a specific implementation, if the internal power rail is reset at a high level and the reset request signal output by the comparator unit is reset at a low level, in order to ensure the response of the internal power rail to the reset request signal, a pull-up resistor may be connected between an output pin (reset pin) of the comparator unit and a reset source input pin of the internal power rail, and the other end of the pull-up resistor is connected to a power rail pin of the power rail unit, so that the current of the reset pin is pulled up by the high level voltage of the power rail pin, so as to trigger the internal power rail to execute the reset action based on the reset signal.

As shown in fig. 6, a schematic structural diagram of a register circuit in embodiment 3 of a power rail monitoring system provided in the present application, the register circuit includes: a first register 601 and a second register 602;

wherein, the set value of the first register 601 and the set value of the second register 602 form a set voltage threshold range of the second comparator circuit connected with the register circuit;

wherein the voltage threshold range of the first register corresponds to a first adjustment range of a second comparator circuit to which the register circuit is connected; the voltage threshold range of the second register corresponds to a second adjustment range of a second comparator circuit connected to the register circuit, the second adjustment range belonging to the first adjustment range.

Specifically, the first register and the second register can respectively adjust the coarse gear and the fine gear of the voltage so as to adjust the voltage range of the corresponding input end, thereby realizing the configuration of the monitoring range for the input power rail voltage.

Specifically, the value of the first register corresponds to a coarse gear of the regulated voltage, and the value of the second register corresponds to a fine gear of the regulated voltage.

Shown in table 1 below is a gear adjustment table for a secondary monitoring module of 3.3V for a certain power rail.

TABLE 1

TABLE 2

The ALARM in table 1 and table 2 represents the function (ALARM) of the secondary monitoring module.

It should be noted that the above tables are only examples, and specific values of gear adjustment are not limited in the present application.

It should be noted that the structure of the first comparator circuit in the first-stage monitoring module may refer to the structure of the second comparator circuit, which is not described in detail in this application.

It should be noted that, since the gear of each input end in the comparator unit is adjustable, the accuracy of monitoring the power supply rail can be improved, and the self-defined monitoring of the level ranges of a plurality of power supply rails is realized at the same time.

To sum up, the power rail monitoring system provided in this embodiment, the second-stage monitoring module includes: at least one comparator unit; the comparator unit is respectively connected with at least two primary power rails and at least one secondary power rail; the comparator unit compares the voltage of the primary power rail and the voltage of the secondary power rail with corresponding set voltage threshold ranges respectively and outputs a normal signal or an abnormal signal. The comparator unit includes: the second comparator circuit is respectively connected with the primary power rail and the secondary power rail; a register circuit connected to the second comparator circuit for setting a voltage threshold range of the connected second comparator circuit; a second comparator circuit is correspondingly connected with a register circuit. In this embodiment, the secondary monitoring module includes at least one comparator, where the comparator is connected to the primary power rail and the secondary power rail respectively, and monitors and processes the power rails of each stage in parallel, so as to improve efficiency of the secondary monitoring module, and the comparator unit outputs an abnormal signal when the voltage of the input power rail does not belong to a corresponding set voltage threshold value, so as to implement abnormal reminding for the voltage of the power rail of each stage does not belong to a corresponding set voltage range.

Corresponding to the embodiment of the power rail monitoring system provided by the application, the application also provides a scene embodiment of the application of the power rail monitoring system.

As shown in fig. 7, a topology diagram of a power rail monitoring system includes: primary and secondary monitoring modules, 6-way power supply rail (5V or 3.3V external input power supply rail V) EXT 3.3V rectifier power rail V DDP3 1.1V core power rail V DD Analog power supply rail V of 5V or 3.3V DDM Analog power supply rail V of 5V or 3.3V EVRSE Power supply rail V of internal pre-rectifier DDSE ) Wherein, one-stage power rail V EXT 、V DDP3 And V DD Respectively connected with the primary monitoring module and the secondary monitoring module, and the secondary power rail V DDM 、V EVRSE 、V DDSE And the monitoring module is connected with the secondary monitoring module.

The primary monitoring module detects whether the input power rail is under-voltage or not, and the secondary monitoring module monitors whether the input power rail is under-voltage or not.

Wherein, the topology diagram is also provided with a POST pin, and the pin is a power-on reset pin of the embedded microcontroller.

The first-stage monitoring module comprises first comparator circuits 1-3 which are in one-to-one correspondence with three first-stage power rails, wherein the output ends of the three first comparator circuits output cold POST reset through an OR gate (OR), the output end of the OR gate strongly pulls down a PROST pin through a pull-down resistor, the PROST pin is connected with a default weak pull-up resistor, the PROST pin outputs hot PROST reset to an idle request informing state machine, and the hot PROST reset and the cold POST reset realize starting power-on reset through the OR gate.

The output of the second-level monitoring module is used for SAC safety alarm control, the output of the watchdog program and the output of the clock monitor are also used as the input of the SAC safety alarm control, and the SAC safety alarm control outputs an error report and outputs the error report to an error report engine through an error report engine interface.

In the topology diagram, an ESR0 pin, an ESR1 pin and an ERUxx pin are also arranged, and reset signals are also input to the ESR0 pin and the ESR1 pin. The ESR0 pin transmits a device hardware reset and application or system reset signal to the OR gate SW reset trigger signal and also transmits the SAC safety alarm control output signal to the OR gate to trigger application or system reset. The thermal PROST reset signal of the PROST pin and the application or system reset input are an OR gate, and the output end of the OR gate is connected with a pull-down resistor connected with ESR 0.

The non-maskable interrupt signal received by the ESR1 pin is output to an interrupt/trap processor; the signals received by the ERUxx pin are also output to the interrupt/trap processor, and the SAC safety alarm control and watchdog and always monitor output signals are also output to the interrupt/trap processor.

Corresponding to the embodiment of the power rail monitoring system provided by the application, the application also provides an embodiment of a method applied to the power rail monitoring system.

Fig. 8 is a flowchart of an embodiment of a power rail monitoring method provided in the present application, where the method is applied to the power rail monitoring system provided in the foregoing embodiment, and the method includes the following steps:

step S801: after the embedded microcontroller is electrified, controlling the first-stage monitoring module to enable the first-stage monitoring module to monitor at least two first-stage power rails to obtain a first monitoring result;

after the vehicle is powered on, the embedded microcontroller is powered on, and a plurality of power rails on the embedded microcontroller start to supply power.

After the embedded microcontroller is electrified, the first-stage monitoring module is controlled to enable, and monitors a plurality of first-stage power rails input into the first-stage monitoring module to obtain a first monitoring result.

The first monitoring result indicates that the primary power rail is normal in operation, the embedded microcontroller can be normally operated, and if the primary power rail is abnormal in operation, the operation of the embedded microcontroller can be influenced, and the abnormal operation needs to be responded to so as to protect the operation safety of the embedded microcontroller.

Step S802: and based on the first monitoring result, representing that the at least two primary power rails meet a voltage threshold condition, controlling a secondary monitoring module to enable the secondary monitoring module to monitor at least one secondary power rail and the at least two primary power rails, and obtaining a second monitoring result.

After the primary power rail is monitored by the primary monitoring module, the primary power rail meets the voltage threshold condition, the primary power rail is characterized in that the power supply is normal, the secondary monitoring module is controlled to be enabled, and the monitoring function is started to be executed.

In specific implementation, the first-stage monitoring module and the second-stage monitoring module monitor the first-stage power rail and the second-stage power rail in sequence respectively, the first-stage monitoring module monitors the first-stage power rail first, when the voltage of the first-stage power rail represented by the first monitoring result meets the threshold condition, the first-stage monitoring module continues to detect the first-stage power rail, and then the second-stage monitoring module can start to monitor the first-stage power rail and the second-stage power rail simultaneously until power-down stops detecting.

The threshold condition may specifically be that the voltage of the power rail is not lower than a rated threshold, and in a specific implementation, in order to prevent erroneous judgment, a positive and negative range of the rated threshold may be set, and the voltage of the power rail may be considered to satisfy the threshold condition without being lower than the positive and negative range of the rated threshold.

For example, the positive and negative ranges may be ±10%, and of course, the values of the positive and negative ranges are set according to practical situations, which is not limited in the present application.

In specific implementation, the secondary monitoring module is disabled by default, and the secondary monitoring module is enabled after the primary monitoring module completes monitoring the primary power rail, so that monitoring on a plurality of power rails is realized.

The importance of the primary power rail is higher, so that after the embedded microcontroller is electrified, the primary power rail is monitored preferentially, and then the secondary power rail is monitored.

Specifically, the primary monitoring module only monitors a primary power rail of the primary power rail domain, and the primary power rail directly triggers reset once the primary power rail does not meet the condition of the primary monitoring module; the secondary monitoring module monitors all power rails of the primary power rail of the main power rail domain and the secondary power rail of the standby power rail domain, and correspondingly, the monitoring abnormality can be reset or alarmed and the like.

To sum up, the power rail monitoring method provided in this embodiment includes: after the embedded microcontroller is electrified, controlling the first-stage monitoring module to enable the first-stage monitoring module to monitor at least two first-stage power rails to obtain a first monitoring result; and controlling the second-level monitoring module to enable the second-level monitoring module to monitor at least one second-level power rail to obtain a second monitoring result. In this embodiment, the system can monitor the primary power rail and the secondary power rail with different importance degrees respectively, and a corresponding comparator is not required to be set up for each power rail, so that the monitoring system is simplified.

In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. The device provided in the embodiment corresponds to the method provided in the embodiment, so that the description is simpler, and the relevant points refer to the description of the method.

The previous description of the provided embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features provided herein.