CN115309580A - Watchdog management method, intelligent cabin and readable storage medium - Google Patents
Watchdog management method, intelligent cabin and readable storage medium Download PDFInfo
- Publication number
- CN115309580A CN115309580A CN202211030091.4A CN202211030091A CN115309580A CN 115309580 A CN115309580 A CN 115309580A CN 202211030091 A CN202211030091 A CN 202211030091A CN 115309580 A CN115309580 A CN 115309580A
- Authority
- CN
- China
- Prior art keywords
- microprocessor
- watchdog
- microcontroller
- starting
- failure times
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/0757—Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
- B60R16/02—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
- B60R16/023—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mechanical Engineering (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application provides a watchdog management method, an intelligent cabin and a readable storage medium. In some embodiments of the present application, the control system includes a microprocessor and a watchdog, and the watchdog management method may include: adjusting the running state of the watchdog according to the starting failure times of the microprocessor; and responsive to the operational status of the watchdog being adjusted, starting the microprocessor.
Description
Technical Field
The embodiment of the application relates to the technical field of vehicles, in particular to a watchdog management method, an intelligent cabin and a readable storage medium.
Background
In order to ensure safe operation of the vehicle, a watchdog is usually installed on the vehicle to monitor the operation state of the application program of the vehicle. The application program of the vehicle is fed with dogs at certain time intervals during the running process to indicate that the application program runs normally. If the watchdog does not receive the dog feeding signal of a certain application program within a certain time, the watchdog considers that the operation of the application program fails and needs to be repaired in a restarting mode or the like so as to reduce the occurrence of safety accidents.
However, due to the complex environment of the whole vehicle, the current management modes of some watchdog cannot meet the requirement of safe operation of the vehicle.
Disclosure of Invention
Embodiments of the present application provide a watchdog management method, a smart car, and a readable storage medium that may solve, at least in part, the above problems or other problems in the prior art.
The embodiment of the application provides a management method of a watchdog of a control system of an intelligent cabin, wherein the control system comprises a microprocessor and the watchdog, and the management method of the watchdog comprises the following steps: adjusting the running state of the watchdog according to the starting failure times of the microprocessor; and responsive to the running state of the watchdog being adjusted, starting the microprocessor.
An embodiment of the present application further provides an intelligent cabin, including: at least one microcontroller; and a memory communicatively coupled to the at least one microcontroller; wherein the memory stores instructions executable by the at least one microcontroller to enable the at least one microcontroller to perform the method of managing a watchdog as mentioned in the above embodiments.
Embodiments of the present application further provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a microcontroller of an intelligent cockpit, the watchdog management method according to the above embodiments is implemented.
According to the implementation mode of the application, before the intelligent cabin starts the microprocessor, the running state of the watchdog is dynamically adjusted by combining the starting failure times of the microprocessor, so that the watchdog can dynamically monitor the starting process of the microprocessor, the intelligent cabin can restart the microprocessor in time under the condition that the microprocessor fails to start, the repeated restarting condition of the microprocessor by the watchdog under the condition that the microprocessor cannot be normally started can be reduced, and the use safety of the vehicle is improved.
Drawings
Other features, objects, and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings. Wherein:
figure 1 is a schematic block diagram of a control system of a smart cabin according to some embodiments of the present application;
figure 2 is a flow chart of a method of managing a watchdog of a control system of a smart car according to some embodiments of the present application;
FIG. 3 is a flow diagram of a watchdog management method according to further embodiments of the present application;
FIG. 4 is a flow diagram of a watchdog management method according to further embodiments of the present application;
figure 5 is a schematic block diagram of a smart cockpit according to some embodiments of the present application.
Detailed Description
For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that the detailed description is merely illustrative of exemplary embodiments of the present application and does not limit the scope of the present application in any way. Like reference numerals refer to like elements throughout the specification. The expression "and/or" includes any and all combinations of one or more of the associated listed items.
It will be further understood that terms such as "comprising," "including," "having," "including," and/or "containing" are used in this specification to specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof. Furthermore, when a statement such as "at least one of" appears after a list of listed features, it modifies that entire list of features rather than merely individual elements of the list. Furthermore, when describing embodiments of the present application, the use of "may" mean "one or more embodiments of the present application. Also, the term "exemplary" is intended to refer to examples or illustrations.
Unless otherwise defined, all terms (including engineering and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. In addition, unless explicitly defined or contradicted by context, the specific steps included in the methods described herein are not necessarily limited to the order described, but can be performed in any order or in parallel. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Further, in this application, when "connected" or "coupled" is used, it may mean either direct contact or indirect contact between the respective components, unless there is an explicit other limitation or can be inferred from the context.
In order to ensure safe operation of the vehicle, a watchdog is usually installed on the vehicle to monitor the operation state of the application program of the vehicle. The application program of the vehicle is fed with dogs at certain time intervals during the running process to indicate that the application program runs normally.
In some embodiments, the watchdog is managed in a manner including, but not limited to:
mode A: after a microcontroller (Micro, controller Unit, MCU) is started up, a watchdog is closed by default, and after the microprocessor (Micro Processor Unit, MPU) is started up, the watchdog is opened by pulling a General Purpose Input/Output Port (General Purpose Input/Output Port, gpio) or based on a predetermined communication protocol or the like;
mode B: a watchdog is started by default after a microcontroller (Micro, controller Unit, MCU) is started;
mode C: and the MCU is started up after the program is upgraded and the watchdog is opened by default.
However, in the method a, since the MCU is turned on and closes the watchdog by default, the watchdog monitoring function cannot cover the period from the power-on of the MPU to the time of turning on the watchdog. The whole vehicle environment is complex, sometimes the phenomenon of instable and even instantaneous interruption of the starting voltage occurs, once the phenomenon occurs, because the watchdog is not started, the microcontroller cannot monitor the phenomenon and cannot restart, the problem of black screen of the vehicle occurs, the vehicle safety is affected, and the customer complaints are easy to suffer. In the mode B, if the MCU is turned on to default to open the watchdog, the MPU may have requirements for upgrading and flashing after the MCU is upgraded because the MPU software development progress cannot keep pace with the MCU in the initial stage of development, and the MPU cannot feed the watchdog during the operations of upgrading and flashing, which may cause the system to be repeatedly restarted and unable to be upgraded or flashed. Therefore, in some embodiments, the watchdog may be managed by using the mode C, that is, the watchdog is closed by default by the MCU in the initial stage, and the watchdog is opened by default by upgrading the MCU in the later stage. However, the mode C causes the vehicle handed over to the client in the early stage to change the starting mode of the watchdog through upgrading, the upgrading sequence of the MCU and the MPU cannot be wrong, the MCU and the MPU have a fixed version relationship, and the MCU may be repeatedly restarted once not matched.
Fig. 1 is a schematic block diagram of a control system of a smart car according to some embodiments of the present application, and fig. 2 is a flowchart of a management method of a watchdog of the control system of the smart car according to some embodiments of the present application.
In some embodiments of the present application, as shown in fig. 1, the control system 10 of a smart cabin of a vehicle includes a microcontroller 110, a microprocessor 120, and a watchdog 130. After the vehicle is started, the microcontroller 110 is turned on, and after the microcontroller 110 is started, the microprocessor 120 is powered on to start the microprocessor 120. Due to the complex environment of the whole vehicle, the chips such as the microprocessor 120 and the like may be disturbed by the outside world to cause operation errors, so that the normal operation of the internal program is interrupted and the normal operation cannot be continued. For this reason, a watchdog 130 may be installed in the smart car to periodically check the status of some of the microprocessors 120 to restart the microprocessors 120 in case of an error in the microprocessors 120. Alternatively, the watchdog 130 may be implemented by a monitoring chip separate from the microcontroller 110. The circuit of the monitoring chip is similar to a timer circuit. After the monitoring chip is turned on, if it does not receive the dog feeding signal from the microprocessor 120 within a predetermined time, it sends a restart signal to the microprocessor 120.
It should be understood that fig. 1 exemplifies the watchdog 130 separately from the microcontroller 110, and those skilled in the art can understand that, in other embodiments, if the microcontroller 110 has a timer, the watchdog 130 may also be implemented in software based on the timer in the microcontroller 110, and the implementation of the watchdog 130 is not limited by the embodiments of the present application.
In some embodiments of the present application, the watchdog management method 200 may be performed by the microcontroller 110. As shown in fig. 2, the watchdog management method 200 may include the following steps:
and S21, adjusting the running state of the watchdog according to the starting failure times of the microprocessor.
And S22, responding to the adjusted running state of the watchdog, and starting the microprocessor.
According to the implementation mode of the application, before the intelligent cabin starts the microprocessor, the running state of the watchdog is dynamically adjusted by combining the starting failure times of the microprocessor, so that the watchdog can dynamically monitor the starting process of the microprocessor, the intelligent cabin can restart the microprocessor in time under the condition that the microprocessor fails to start, the repeated restarting condition of the microprocessor by the watchdog under the condition that the microprocessor cannot be normally started can be reduced, and the use safety of the vehicle is improved.
For ease of understanding, the watchdog management method 200 illustrated in fig. 2 is illustrated below.
In some embodiments of the present application, the operational state of the watchdog includes an open state and a closed state. After the microcontroller opens the watchdog, the watchdog is in an open state, and after the microcontroller closes the watchdog, the watchdog is in a closed state.
In some embodiments of the present application, after the microcontroller is powered on, the number of times of failure of starting the microprocessor is obtained and detected, and the watchdog is managed according to a detection result of the number of times of failure of starting the microprocessor. Illustratively, fig. 3 is a flow chart of a method 300 for managing a watchdog of a control system of a smart car according to further embodiments of the present application. As shown in fig. 3, step S21 may include the following sub-steps:
s211, detecting whether the starting failure times of the microprocessor is less than a preset threshold value. For example, if the number of failed start-ups of the microprocessor is less than the predetermined threshold, step S212 is executed, and if the number of failed start-ups of the microprocessor is equal to the predetermined threshold, step S213 is executed.
S212, the watchdog is in an opening state. For example, after the microcontroller is powered on, if it is detected that the number of times of failure in starting the microprocessor is less than the threshold value, the watchdog is started, and the microprocessor is powered on after the watchdog is started to start the microprocessor.
And S213, enabling the watchdog to be in a closed state. For example, after the microcontroller is powered on, if it is detected that the number of failed start-up times of the microprocessor is equal to the number threshold, the watchdog is turned off, and the microprocessor is powered on to start the microprocessor after the watchdog is turned off.
According to some embodiments of the application, the microcontroller opens the watchdog under the condition that the starting failure times of the microprocessor are less, so as to monitor the starting process of the microprocessor, so that the microcontroller can restart the microprocessor in time through the watchdog under the condition that the microprocessor cannot be normally started due to reasons such as instantaneous interruption of starting voltage, and the like, and further improve the use safety of the vehicle. The microcontroller closes the watchdog under the condition that the starting failure times of the microprocessor are more, so that the condition that the microprocessor cannot be started normally due to upgrading, self faults and the like can be reduced by the microcontroller, the condition that the microprocessor is restarted repeatedly due to the restarting signal of the watchdog is reduced, the condition that dead circulation occurs in the intelligent cabin is further reduced, and the use safety of the vehicle is improved.
In some embodiments of the present application, the initial value of the number of failed starts stored in the microcontroller is a predetermined threshold. Because the initial value of the starting failure times is the preset threshold value, the watchdog is closed by default when the microcontroller is used for the first time, so that the microprocessor can be upgraded, refreshed and the like as required after the microcontroller is started for the first time, and the problem of repeated restarting of the microprocessor due to the factors such as microprocessor upgrading and the like is solved.
For ease of understanding, the manner in which the preset threshold value of the number of failed starts is set is exemplarily described below. In some embodiments of the present application, the setting manner of the preset threshold of the number of failed start-up times may include, but is not limited to, manner one and manner two.
The first method is as follows:
in some embodiments of the present application, the preset threshold may be any value greater than 1, for example, 2 or 3. In general, the duration of external reasons (for example, the starting voltage is unstable or even momentarily interrupted) causing the starting failure of the microprocessor is short, so that the probability that the number of times that the microprocessor cannot be started continuously reaches 3 times is extremely low due to the starting abnormality caused by the vehicle-finishing environment such as the starting voltage is unstable or even momentarily interrupted, and therefore, the preset threshold set in the microcontroller may be 3. The microcontroller dynamically manages the watchdog according to the preset threshold and the startup failure times of the microprocessor, so that the microcontroller can restart the microprocessor under the condition that the whole vehicle environment has problems, the problems of screen blacking and the like are reduced, the watchdog can be closed as soon as possible by the microcontroller in the process of upgrading the microprocessor and the like, the condition that the microprocessor is repeatedly restarted due to the reasons of upgrading the microprocessor and the like is reduced, and the time for upgrading the microprocessor is shortened.
The second method comprises the following steps:
in some embodiments of the present application, the microcontroller determines the predetermined threshold based on information about the contributing factors to the failed start-up of the microprocessor. For example, the microcontroller determines the predetermined threshold value according to at least one of a length of time each of the occurrence of the influencing factors of the startup failure of the microprocessor and a number of occurrences of the influencing factors of the startup failure of the microprocessor within a preset time.
As an example, the microcontroller records information about the influencing factors of the startup failure of the microprocessor in the case of the startup failure of the microprocessor. For example, the length of time each influencing factor of the startup failure of the microprocessor appears and/or the number of times the influencing factor of the startup failure of the microprocessor appears within a preset time is recorded. The microcontroller may update the predetermined threshold once at intervals based on the recorded information about the contributing factors to the failed start-up of the microprocessor. The preset threshold value can be updated according to the actual starting process of the microprocessor of the vehicle, so that the preset threshold value is more fit with the performance of the vehicle, and the condition of black screen caused by the occurrence of problems in the environment of the whole vehicle can be better reduced.
For ease of understanding, the following description will exemplarily use the influence factor of the start-up failure of the microprocessor as the transient interruption of the power-on voltage.
As an example, after the microcontroller is started, in the process of powering on and starting the microprocessor, if a situation that the microprocessor starting voltage is suddenly interrupted is detected in the intelligent cabin, the time when the microprocessor starting voltage is suddenly interrupted is recorded. The microcontroller may determine the predetermined threshold based on a number of occurrences of microprocessor power-on voltage glitches within a predetermined time. For example, the number of occurrences of microprocessor power-on voltage glitches is proportional to a predetermined threshold. The predetermined threshold value is larger if the number of the occurrences of the instantaneous interruption of the starting voltage of the microprocessor is larger, and the predetermined threshold value is smaller if the number of the occurrences of the instantaneous interruption of the starting voltage of the microprocessor is smaller. The predetermined time may be determined according to the time required for starting the microprocessor, for example, the predetermined time is equal to the time required for starting the microprocessor. Because the number of the transient interruption of the starting voltage of the microprocessor in the preset time is more, the probability of the transient interruption of the starting voltage of the microprocessor in the process of restarting the microprocessor by the microcontroller is higher. Thus, the microcontroller can appropriately scale the predetermined threshold based on the number of occurrences of microprocessor power-on voltage glitches within a predetermined time to better manage the watchdog.
As another example, in the process of powering on and starting the microprocessor by the microcontroller after starting up, if the situation that the microprocessor starting-up voltage is suddenly interrupted in the intelligent cabin is detected, the time when the microprocessor starting-up voltage is suddenly interrupted and the ending time are recorded. The microcontroller may determine the predetermined threshold based on a length of time that a microprocessor power-on voltage glitch occurs. For example, the duration of the occurrence of a microprocessor power-on voltage glitch is proportional to a predetermined threshold. The preset threshold value is larger if the time length of the instantaneous interruption of the starting voltage of the microprocessor is longer, and the preset threshold value is smaller if the time length of the instantaneous interruption of the starting voltage of the microprocessor is shorter. After the starting voltage of the microprocessor is interrupted instantaneously, the microprocessor cannot be started even if the microprocessor is restarted, and the starting is failed inevitably. The preset threshold value is properly expanded under the condition that the time length of the instantaneous interruption of the starting voltage of the microprocessor is longer, so that the condition that the intelligent cabin is blacked due to the fact that the watchdog is closed by mistake because the preset threshold value is smaller can be reduced. The preset threshold is properly reduced under the condition that the time length of the instantaneous interruption of the startup voltage of the microprocessor is short, so that the condition that the watchdog does not receive a dog feeding signal of the microprocessor and restarts the microprocessor for many times under the conditions that the microprocessor is in an upgrading mode due to the fact that the preset threshold is large can be reduced.
It should be understood that the contributing factors to a failure of a microprocessor to boot may also be other factors without departing from the teachings of the present application and are not intended to be limiting.
It should be understood that the detection method of the occurrence duration and the occurrence number of the influencing factors of the startup failure of various microprocessors can be determined according to the characteristics of the influencing factors without departing from the teaching of the application, and the detection method is not listed here.
In some embodiments of the present application, after the microcontroller starts the microprocessor, the microcontroller detects a start condition of the microprocessor, and updates the number of start failures of the microprocessor in time according to the start condition of the microprocessor, so as to adjust the running state of the watchdog in time according to a start process of the microprocessor in the following.
As one example, the microcontroller determines whether the microprocessor has successfully started by detecting whether a handshake signal of the microprocessor is received. For example, if the microprocessor enters a normal operation mode after being started, a handshake signal is actively sent to the microcontroller. And after receiving the handshake signals of the microprocessor, the microcontroller determines that the microprocessor is successfully started. If the microprocessor enters the running modes such as upgrading and flashing after being started, or the microprocessor cannot enter the normal running mode due to file system faults and the like after being started, the microprocessor cannot send a handshake signal to the microcontroller, and the microcontroller does not receive the handshake signal of the microprocessor within the specified time, the microprocessor is determined to be failed to be started. The normal operation mode of the microprocessor may refer to a mode in which a main operation program of the microprocessor can be started and operated. The handshake signal may be other signals independent of the dog feeding signal, or may be a dog feeding signal of the microprocessor, which is not limited herein.
It should be understood that the microcontroller may determine the startup of the microprocessor in other ways without departing from the teachings of the present application, and the present application is not limited to the manner in which the microcontroller determines the startup of the microprocessor.
As an example, if the microcontroller detects that the microprocessor is started successfully, the microcontroller resets the number of startup failures of the microprocessor, and if the microprocessor is detected to be started unsuccessfully, controls the microprocessor to restart, and updates the number of startup failures so as to add 1 to the number of startup failures. Illustratively, fig. 4 is a flow diagram of a watchdog management method 400 according to some embodiments of the present application. As shown in fig. 4, on the basis of fig. 2, the method 400 for managing a watchdog further includes:
and S23, detecting whether the microprocessor is started successfully or not. For example, if the microcontroller detects that the microprocessor is successfully started, the step S24 is executed, and if the microcontroller detects that the microprocessor is failed to be started, the step S27 is executed. The manner of detecting the microprocessor start-up condition by the microcontroller may refer to the above description, which is not repeated herein.
And S24, detecting whether the startup failure times of the microprocessor are equal to a preset threshold value. If the microcontroller detects that the number of times of the startup failure of the microprocessor is equal to the predetermined threshold, the step S25 is executed, and in response to that the number of times of the startup failure of the microprocessor is not equal to the predetermined threshold, the step S26 is executed.
And S25, opening the watchdog. For example, if the number of failed start-ups of the microprocessor is equal to the predetermined threshold, as shown in fig. 3 as the sub-step of step S21, the watchdog will be turned off before the microprocessor is started, so as to reduce the repeated restart of the microprocessor. The microcontroller executes step S25 on the premise that the microprocessor has been normally started, that is, the factor causing the failure of the microprocessor start is overcome in the process of the present microprocessor operation, so that the microcontroller can open the watchdog to monitor the subsequent operation condition of the microprocessor through the watchdog.
And S26, clearing the starting failure times. For example, since the microprocessor is already running normally, the microcontroller may zero the number of failed start-up times of the microprocessor, so that the watchdog is opened when the microcontroller is started next time, and the start-up process of the microprocessor is continuously monitored.
And S27, updating the starting failure times. Step S21 is then performed. Illustratively, after detecting the startup failure of the microprocessor, the microcontroller adds 1 to the startup failure number, determines the running state of the watchdog according to the updated startup failure number, and restarts the microprocessor.
Exemplary ways in which the microcontroller restarts the microprocessor include, but are not limited to: and restarting the microcontroller, determining whether to start the watchdog according to the starting failure times of the microprocessor after the microcontroller is restarted, and electrifying the microprocessor again after the running state of the watchdog is determined.
According to some embodiments of the application, before the intelligent cabin starts the microprocessor, the running state of the watchdog is dynamically adjusted by combining the starting failure times of the microprocessor, the running state of the watchdog can be adjusted without upgrading the microcontroller and the like, and the complexity of a management program of the watchdog is reduced. In addition, the watchdog can dynamically monitor the starting process of the microprocessor, so that the intelligent cockpit can restart the microprocessor in time under the condition that the microprocessor fails to start, and the situation that the microprocessor is repeatedly restarted by the watchdog under the condition that the microprocessor cannot be normally started can be reduced, thereby improving the use safety of the vehicle.
In some embodiments of the present application, the microcontroller may dynamically adjust the operating state of the watchdog according to a change in an operating mode of the microprocessor after powering on the microprocessor. Illustratively, the microprocessor includes a plurality of operating modes, such as a normal operating mode, an upgrade (Recovery) mode, a flush (fastboot) mode, and the like. And if the microcontroller detects that the microprocessor enters a pre-specified operation mode at any time after the microprocessor is successfully started, closing the watchdog. Illustratively, the microcontroller temporarily shuts down the watchdog via the communication protocol or otherwise upon detecting that the microprocessor is entering an upgrade (Recovery) mode or a flush (fastboot) mode. And if the microcontroller detects that the microprocessor exits the specified operation mode, the watchdog is started.
It should be understood that the number of operating modes of the microprocessor, etc. may be adjusted as desired without departing from the teachings of the present application, and the present application is not limited thereto.
As an example, the watchdog management method according to the embodiment of the present application is exemplarily described below with reference to an intelligent cockpit development process and a mass production process, taking an example that the predetermined threshold is equal to 3.
In the process of producing the burn-in microcontroller, the number of start-up failures (hereinafter referred to as cnt) of the microprocessor in the microcontroller is set to 3. In the development process, because cnt is set to 3, the watchdog is not activated in the initial development stage, so that the microprocessor can normally burn (qfil) and flush (fastboot). And the watchdog can be activated after the microprocessor is powered on every time. During subsequent development, before the microprocessor enters an upgrade (recovery) mode or before the microprocessor restarts (refot) to enter a fastboot (fastboot) mode, the watchdog can be temporarily closed. And for the burning mode of the microprocessor, if the microprocessor enters the burning (qfil) mode, the microcontroller closes the watchdog after the restarting failure of the microprocessor reaches 3 times (cnt = 3), activates the watchdog again after the successful restarting of the microprocessor is successful, and clears the cnt.
In the mass production process, if the microprocessor is normally started, the cnt is not changed, and the management strategy of the watchdog can refer to the research and development process. If the microprocessor is abnormally started, the microcontroller enables cnt = cnt +1 after detecting that the microprocessor is failed to be started, and dynamically manages the watchdog according to the value of cnt.
For example, if the microprocessor fails to start due to the vehicle environment, the watchdog is still in the on state when the microprocessor fails to start for the first time, and the microprocessor is restarted. Because the probability that the microprocessor is abnormally started for 3 times continuously due to the whole vehicle environment is low, the microprocessor can be restarted successfully within 3 times. In the process, the watchdog keeps an open state, and the microcontroller resets the cnt after the microprocessor is restarted successfully. Because the microprocessor can be restarted in time, the condition of screen blacking can be reduced.
For example, if the microprocessor fails to start because the microprocessor needs to perform operations such as burning and upgrading, the watchdog is still in an open state when the microprocessor fails to start for the first time, and the microprocessor is restarted. Before restarting the microprocessor, the microcontroller detects cnt counting, and if cnt is less than 3, the watchdog is in an open state, and the microprocessor is restarted; and if the microprocessor fails to restart for 3 times continuously, cnt =3, and the microprocessor is restarted after the microcontroller closes the watchdog. During the restarting process, if the microprocessor is in an upgrade (recovery) mode or other modes before, the microcontroller can guide the microprocessor to continue to enter the upgrade mode or other modes after restarting again through the pull pin. Because the watchdog is closed, the microprocessor cannot be restarted due to the fact that the watchdog is not fed in time in the starting process, and the problem that the microprocessor is repeatedly restarted is solved. After the watchdog is closed, the microprocessor can be upgraded or burned normally. After the microprocessor finishes upgrading and other operations, the microprocessor enters a normal operation mode and actively sends a handshake signal to the microcontroller. And after receiving the handshake signal, the microcontroller determines that the microcontroller is successfully started, and judges whether cnt is equal to 3 or not. If cnt =3, the microcontroller turns on the watchdog and cnt =0, and if cnt <3, it indicates that the watchdog is turned on at this time, and the microcontroller sets cnt =0.
According to the above content, the watchdog-based management method can solve the problem that the microprocessor restarts repeatedly or cannot monitor the pain point of the starting process of the microprocessor in project research and development, solves the switching cost caused by setting a complex management program for switching the watchdog state and the like, and solves the problem of unlimited restarting of the microprocessor caused by microprocessor damage. In addition, because the state of the watchdog is adjusted based on the number of times of startup failures of the microprocessor, the watchdog can be implemented across different platforms and different hardware, and can cover the development and mass production periods of the microcontroller. In addition, in some embodiments, the scheme can realize the management of the watchdog without considering the operation mode of the microprocessor, and has simple logic and easy realization.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of this patent to add insignificant modifications or introduce insignificant designs to the algorithms or processes, but not to change the core designs of the algorithms and processes.
Embodiments of the present application also provide a smart cabin, as shown in fig. 5, the smart cabin 500 may include at least one microcontroller; and a memory communicatively coupled to the at least one microcontroller; wherein the memory stores instructions executable by the at least one microcontroller to enable the at least one microcontroller to perform the watchdog management method as mentioned in the above embodiments. Illustratively, the smart car 500 may also include a microprocessor.
An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements a watchdog management method.
Figure 5 is a schematic block diagram of a smart car 500 according to some embodiments of the present application. As shown in fig. 5, the smart car comprises a microcontroller 9011 and a microprocessor 9012, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the smart car 500 can also be stored. The microcontroller 9011, the microprocessor 9012, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the smart car 500 are connected to the I/O interface 905, including: an input unit 906, for example, a button of a car machine, a touch screen, or the like; an output unit 907 connected to, for example, various types of displays, speakers, and the like to output various forms of signals; a storage unit 908 including any medium for storing a computer-executable program; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the smart car 500 to exchange information/data with other devices, such as over a local area network or other wireless communication network.
The microcontroller 9011 and microprocessor 9012 may be various general purpose and/or special purpose processing components with processing and computing capabilities. The microcontroller 9011 executes the various methods and processes described above, such as the watchdog management method. For example, in some embodiments, the watchdog management method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the intelligent capsule 500 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed, it may perform one or more steps of the watchdog management method described above. Alternatively, in other embodiments, the microcontroller 9011 may be configured to perform the watchdog management method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device for displaying information to a user, for example, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The above description is only an embodiment of the present application and an illustration of the technical principles applied. It will be appreciated by a person skilled in the art that the scope of protection covered by this application is not limited to the embodiments with a specific combination of features described above, but also covers other embodiments with any combination of features described above or their equivalents without departing from the technical idea. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (11)
1. A method of managing a watchdog of a control system of a smart car, the control system comprising a microprocessor and the watchdog, the method comprising:
adjusting the running state of the watchdog according to the starting failure times of the microprocessor; and
responsive to the operational status of the watchdog being adjusted, activating the microprocessor.
2. The method of claim 1, wherein said adjusting the operational state of the watchdog based on the number of failed starts of the microprocessor comprises:
responsive to the number of failed starts being equal to a predetermined threshold, placing the watchdog in a closed state; and
and responding to the starting failure times smaller than a preset threshold value, and enabling the watchdog to be in an opening state.
3. The method of claim 1, wherein the method further comprises:
and responding to the successful starting of the microprocessor and the starting failure times equal to a preset threshold value, starting the watchdog, and clearing the starting failure times.
4. The method of claim 3, wherein the method further comprises:
and responding to the successful starting of the microprocessor and the starting failure times not equal to the preset threshold value, and clearing the starting failure times.
5. The method of claim 3, wherein the method further comprises:
and in response to receiving the handshake signal of the microprocessor, determining that the microprocessor is successfully started.
6. The method of claim 1, wherein the method further comprises:
and responding to the starting failure of the microprocessor, controlling the microprocessor to restart, and updating the starting failure times.
7. The method according to any one of claims 1 to 6, wherein the initial value of the number of failed starts is the predetermined threshold.
8. The method of any of claims 1-6, wherein the method further comprises:
closing the watchdog in response to detecting that the microprocessor is in a pre-specified mode of operation; and
opening the watchdog in response to detecting the microprocessor exiting the designated operating mode.
9. The method of any of claims 2 to 6, wherein the predetermined threshold is determined according to at least one of: the time length of each occurrence of the influence factors of the start failure of the microprocessor and the frequency of the occurrence of the influence factors of the start failure of the microprocessor in the preset time.
10. An intelligent cabin, comprising:
at least one microcontroller; and the number of the first and second groups,
a memory communicatively coupled to the at least one microcontroller; wherein the memory stores instructions executable by the at least one microcontroller to enable the at least one microcontroller to perform the watchdog management method of any one of claims 1 to 9.
11. A computer-readable storage medium, storing a computer program, characterized in that the computer program, when executed by a microcontroller of a smart car, implements a watchdog management method according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211030091.4A CN115309580A (en) | 2022-08-26 | 2022-08-26 | Watchdog management method, intelligent cabin and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211030091.4A CN115309580A (en) | 2022-08-26 | 2022-08-26 | Watchdog management method, intelligent cabin and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115309580A true CN115309580A (en) | 2022-11-08 |
Family
ID=83864445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211030091.4A Pending CN115309580A (en) | 2022-08-26 | 2022-08-26 | Watchdog management method, intelligent cabin and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115309580A (en) |
-
2022
- 2022-08-26 CN CN202211030091.4A patent/CN115309580A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542744B (en) | Method, device, storage medium and terminal for detecting abnormal starting problem of terminal | |
CN109670319B (en) | Server flash safety management method and system thereof | |
US20080141283A1 (en) | Application Controlling Apparatus And Storage Medium Which Stores Software For The Apparatus | |
US8578182B2 (en) | Power lock-up setting method performed by baseboard management controller and electronic apparatus using the same | |
US20060224723A1 (en) | Data updating system and method | |
CN110908847A (en) | Abnormity recovery method, system, electronic equipment and storage medium | |
EP2750034B1 (en) | Electronic device having updatable bios and bios updating method thereof | |
CN115237644B (en) | System fault processing method, central operation unit and vehicle | |
US10235185B2 (en) | Computer and controlling method thereof | |
CN111737064A (en) | BMC system control method and device, storage medium and computer equipment | |
CN113127264A (en) | Data storage device repairing method | |
CN115309580A (en) | Watchdog management method, intelligent cabin and readable storage medium | |
CN111767174A (en) | BIOS (basic input output System) refreshing control method, server and storage medium | |
US10572435B2 (en) | Techniques of accessing serial console of BMC using host serial port | |
CN112114901A (en) | Standby control circuit, method, device and storage medium | |
CN114035831B (en) | CPLD upgrading method, system and computer readable storage medium | |
CN111078452A (en) | BMC firmware image recovery method and device | |
CN107526615B (en) | Single-machine program upgrading method and device in service operation process | |
CN114860286A (en) | CPLD (Complex programmable logic device) noninductive upgrading method, system, storage medium and equipment | |
TWI764648B (en) | Mainboard, external device of mainboard, and booting method of mainboard | |
CN114860322A (en) | Substrate management controller, control method and electronic equipment | |
CN115033462A (en) | Storage server start detection method, system, device, equipment and storage medium | |
CN114860292A (en) | Terminal equipment firmware upgrading control method and device, computer equipment and medium | |
CN115129345A (en) | Firmware upgrading method, device, equipment and storage medium | |
US10921875B2 (en) | Computer system, operational method for a microcontroller, and computer program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |