Method for preventing accidental crash of TSN or edge computing equipment in boot starting stage
By configuring the watchdog circuit to manage the WDIE_N pin in TSN or edge computing devices, the method addresses the vulnerability to crashes during startup, enhancing reliability and security by enabling timely system resets and reducing maintenance needs.
Patent Information
- Application Number
- CN202411857286.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
AI Technical Summary
TSN or edge computing devices are prone to unexpected crashes during the startup boot process due to limited memory and resource constraints, making it difficult to diagnose and recover from errors in the early stages of initialization, where the system lacks control over peripherals and self-monitoring capabilities.
Implementing a watchdog circuit with controlled WDIE_N pin configuration using pull-up and pull-down resistors and CPU GPIO outputs to manage the watchdog chip's enable state, disabling it during normal startup and enabling it to initiate a system reset upon detection of an abnormal state.
This approach enhances system reliability, reduces maintenance costs, and improves security by preventing crashes and enabling timely recovery from faults during the critical boot phase, thereby stabilizing and securing the device.
Smart Images

Figure CN119718751A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of TSN equipment or edge computing equipment, and in particular to a method for preventing occasional crashes of TSN or edge computing equipment during a startup and booting phase. Background Art
[0002] The boot principle of a TSN device or edge computing device involves the hardware and software interaction process when the computer starts. The following is a brief description of the assembly boot principle: 1.BIOS (Basic Input / Output System): The first program executed when the computer is turned on is the BIOS program, which is a firmware program stored on the computer motherboard and is responsible for hardware initialization and self-test operations.
[0003] 2. Boot Sector: When the BIOS starts, it will search for the boot device (usually the hard disk) and read the first sector (512 bytes) of the device. This sector is the boot sector. The boot sector contains the code of the boot loader.
[0004] 3. Boot Loader: A boot loader is a small program that loads the core of the system into memory and starts the system. The boot loader usually finds the location of the system in the boot sector and loads it into memory.
[0005] 4. Operating system kernel loading: Once the boot loader loads the system kernel into memory, control is transferred to the system kernel. The system kernel is responsible for managing the computer's hardware resources, process scheduling, file system and other core functions.
[0006] 5. Written in assembly language: The boot loader is usually written in assembly language because during the boot phase, the memory and peripheral resources of TSN devices or edge computing devices are very limited and direct control of the hardware is required.
[0007] 6. Addressing and Jumping: In the assembly code, it is necessary to implement operations such as reading from the storage device, loading the kernel into the memory, setting up the stack, etc. These operations are implemented through assembly instructions, and finally jump to the entry point of the system kernel and hand over control to the system.
[0008] In general, the system startup assembly boot principle of a TSN device or edge computing device involves starting from BIOS, loading the system kernel into memory through the boot sector and boot loader, and finally starting the system.
[0009] During the entire boot process of the TSN device or edge computing device, especially during the assembly stage, if an abnormality occurs during the boot process, the device will be directly stuck and there is no effective way to correct the device. Because the system has not interfered with and identified the device during the boot stage, the system cannot effectively control various peripheral devices or monitor itself. The watchdog also requires the system to continuously generate a feeding signal after the system is started, so that the system can be restarted when the system crashes.
[0010] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0011] In view of the problems existing in the prior art, an object of the present invention is to provide a method for batch production testing of frame-type equipment.
[0012] In order to achieve the above object, the present invention adopts the following technical solutions: A method for preventing sporadic crashes of a TSN or edge computing device during a boot phase, the method comprising the following steps: S1, use the WDI_EN pin control of the watchdog; S2, set a pull-up resistor of 4.7k ohms for the WDI_EN pin of the watchdog chip; S3, set a pull-down resistor of 1k ohm for the WDI_EN pin of the watchdog chip; S4, use the CPU push-pull output gpio pin to connect to the WDI_EN pin of the watchdog chip; S5. When the MCU is powered on, since gpio1 is a push-pull output, WDI_EN is controlled to be high level, and WATCH_DOG is in the disable state. At this time, the system starts normally. S6. When the TSN or edge computing system hangs abnormally, the push-pull gpio of the MCU fails. At this time, WDI_EN is low and the watchdog is enabled. Then the CPU continues to hang. After the "dog feeding" time expires, the watchdog resets the MCU. In this way, the purpose of using the watchdog to monitor the MCU can be achieved.
[0013] By adopting the above technical solution, the present invention has the following beneficial effects: Improve system availability: During the boot phase of a TSN or edge computing device system, the system is in its most vulnerable state. Any unexpected error or crash may cause the system to fail to start. Preventive measures can reduce the risk of crashes during the boot phase and improve system availability.
[0014] Reduce system maintenance costs: TSN or edge computing system crashes will cause system administrators to spend a lot of time and energy to troubleshoot and fix the problem. Preventive measures can reduce the frequency of system crashes and reduce maintenance costs.
[0015] Improve system stability: A crash during the boot phase of a TSN or edge computing device may cause system data loss or corruption, affecting system stability. Preventive measures can help the system run stably during the startup phase and reduce the possibility of system crashes.
[0016] Enhanced system security: Some malware may exploit vulnerabilities in the system boot phase to damage TSN or edge computing systems or obtain system permissions. Preventive measures can help the system prevent malicious attacks during the boot phase and enhance system security.
[0017] In general, preventive measures play an important role in the stability, reliability and security of the system during the boot phase of TSN or edge computing system startup, and are a key link in maintaining the normal operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flow chart of a method for preventing occasional crashes of a TSN or edge computing device during the booting phase of the present invention; Figure 2 This is a hardware circuit diagram of a method for preventing occasional crashes of a TSN or edge computing device during the boot phase of the present invention. DETAILED DESCRIPTION
[0020] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0022] Combination Figure 1As shown, the implementation logic of the present invention is as follows: When the MCU is just powered on, since gpio1 is a push-pull output, WDI_EN is controlled to a high level, and WATCH_DOG is in the disable state. At this time, the TSN or edge computing device system starts normally, and gpio1 must be a push-pull output port; When the TSN or edge computing device system hangs abnormally, the push-pull GPIO of the MCU fails. At this time, WDI_EN is low and the watchdog is enabled. Then the CPU continues to hang. After the "dog feeding" time expires, the watchdog resets the MCU. In this way, the purpose of using the watchdog to monitor the MCU can be achieved.
[0023] The specific implementation steps are as follows: 1. Use the WDI_EN pin control of the watchdog; 2. Set a pull-up resistor of 4.7k ohms to the WDI_EN pin of the watchdog chip; 3. Set a pull-down resistor of 1k ohm to the WDI_EN pin of the watchdog chip; 4. Use the CPU push-pull output gpio pin to connect to the WDI_EN pin of the watchdog chip 5. When the MCU is powered on, since gpio1 is a push-pull output, WDI_EN is controlled to a high level, and WATCH_DOG is in the disable state. At this time, the system starts normally; 6. When the TSN or edge computing system hangs abnormally, the push-pull gpio of the MCU fails. At this time, WDI_EN is low and the watchdog is enabled. Then the CPU continues to hang. After the "dog feeding" time expires, the watchdog resets the MCU. In this way, the purpose of using the watchdog to monitor the MCU can be achieved.
[0024] The specific hardware circuit of the present invention is as follows Figure 2 As shown, the present invention uses a hardware watchdog to control the TSN or edge computing system, and cooperates with the push-pull output of the CPU's gpio to implement the behavior of enabling the watchdog to take effect when a crash occurs during the assembly and booting of the TSN or edge computing system; A hardware watchdog is a hardware device that monitors the operating status of a computer system. If the system fails or stops responding, the hardware watchdog can automatically restart the system to ensure system stability and reliability.
[0025] The hardware watchdog is usually a dedicated chip or a functional module integrated on the motherboard. It will periodically receive the "feed the dog" signal from the system. If the system is running normally, it will periodically send this signal to the hardware watchdog, thereby preventing the hardware watchdog from thinking that there is a problem with the system and triggering a restart. If the system fails or stops responding and cannot send the "feed the dog" signal, the hardware watchdog will think that the system has crashed and then trigger a restart. The hardware watchdog is very useful in some scenarios that require high system reliability, such as embedded systems, servers, etc. It can help the system automatically restart when a problem occurs, reduce system downtime, and improve system stability and reliability.
[0026] However, the watchdog is generally used to be controlled by the system. When the system is started, it is normally "fed" to achieve the purpose of monitoring the system. Here, the enable pin of the watchdog is used to adjust the state of the watchdog. During the normal startup of the TSN or edge computing system, the WDI_EN pin of the watchdog is in the disable state, so that the watchdog does not work. When the startup process of the TSN or edge computing device is abnormal, the WDI_EN pin of the watchdog chip is set to enable. However, since the TSN or edge computing system has been suspended, the watchdog will reset the system if it does not receive the "feed the dog" signal; Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for preventing occasional crashes of a TSN or edge computing device during the boot phase, characterized in that: The method comprises the following steps: S1, use the WDI_EN pin control of the watchdog; S2, set a pull-up resistor of 4.7k ohms for the WDI_EN pin of the watchdog chip; S3, set a pull-down resistor of 1k ohm for the WDI_EN pin of the watchdog chip; S4, use the CPU push-pull output gpio pin to connect to the WDI_EN pin of the watchdog chip; S5. When the MCU is powered on, since gpio1 is a push-pull output, WDI_EN is controlled to be high level, and WATCH_DOG is in the disable state. At this time, the system starts normally. S6. When the TSN or edge computing system hangs abnormally, the push-pull gpio of the MCU fails. At this time, WDI_EN is low and the watchdog is enabled. Then the CPU continues to hang. After the "dog feeding" time expires, the watchdog resets the MCU. In this way, the purpose of using the watchdog to monitor the MCU can be achieved.