A fast fault location method based on FADEC operating system
By using peripheral memory to record fault information in the FADEC operating system and using watchdog reset, the rapid positioning of task timeout and unexpected abnormal interrupt faults is achieved, and the problem of low fault positioning efficiency of FADEC operating system is solved, and the software is improved Fault elimination efficiency and reduce maintenance costs.
Patent Information
- Application Number
- CN202210211463.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-02-28
AI Technical Summary
The FADEC operating system lacks a fast positioning method in the event of a failure, resulting in designers having to analyze the code one by one, reducing development efficiency and increasing maintenance costs.
When a task timeout or unexpected abnormal interrupt occurs in the FADEC operating system, the fault address and type is recorded using peripheral memory, and the watchdog reset is used to print or pass the fault information to the application layer through the serial port, and the monitoring host computer is used to quickly locate the fault. .
It realizes the rapid location of FADEC operating system failures, improves software failure efficiency and reduces maintenance costs.
Smart Images

Figure CN114706702B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a FADEC operating system, in particular to a fault rapid locating method based on the FADEC operating system. Background Art
[0002] FADEC operating system stands for Full Authority Digital Engine Controller Operating System, which can improve the operating efficiency and reliability of the engine. FADEC operating system is a safety-critical embedded operating system that schedules each task through timed interrupts, thereby strictly controlling each task to run according to the established cycle and timing.
[0003] However, in the process of software design, design defects often lead to various faults in the FADEC operating system, resulting in mission execution errors, and in severe cases, engine burnout. Therefore, faults should be discovered as early as possible during the operating system test. Common faults include mission timeout faults, unexpected abnormal interruption faults, etc. At present, the FADEC operating system has not introduced a fast fault location method. When a fault occurs, designers need to analyze the code line by line to find the fault address and fault type, which greatly reduces development efficiency and increases maintenance costs. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a method for quickly locating faults based on a FADEC operating system, thereby greatly improving the troubleshooting efficiency of the software and reducing the maintenance cost of the software.
[0005] Technical solution: The principle of the method for rapid fault location based on the FADEC operating system described in the present invention is: when a task timeout fault or an unexpected abnormal interrupt fault occurs in the FADEC operating system, the address and type of the fault that occurred is recorded in an external memory. After the watchdog is reset due to the fault, the operating system prints the fault information through the serial port, or the operating system reads the fault information from the external memory and passes it to the application layer, and monitors it with a monitoring host computer, thereby quickly locating the fault.
[0006] The method is implemented based on the following conditions: the hardware provides an external storage device, and the stored information will not be lost when the power is off or reset; the hardware provides reset source information for the software to read, and can monitor whether the reset source is a power-on reset or a watchdog reset; the software provides monitoring of the host computer and monitors the printed fault information.
[0007] The method mainly includes a method for quickly locating a task timeout fault and a method for quickly locating an unexpected abnormal interruption fault, as follows:
[0008] (1) A method for quickly locating task timeout faults;
[0009] (1.1) Get the interrupted address at the function entry of each timer interrupt; if the operating system software runs normally, the interrupted address is the background address; if the foreground task has a task timeout failure, the interrupted address is the address where the foreground task has a task timeout failure;
[0010] (1.2) Each interrupted address is stored in the peripheral memory. If a task timeout occurs, a watchdog reset will be triggered;
[0011] (1.3) After a reset occurs, the operating system reads the recorded task timeout fault address and prints the address through the serial port; or passes the address to the application layer and monitors it on the monitoring host computer;
[0012] (1.4) Check the reset source to determine whether the address is valid. The address is valid only when the reset is caused by the watchdog timeout.
[0013] (1.5) Check the compiled link file and find the code location where the fault occurred based on the recorded timeout task address;
[0014] (2) A method for quickly locating unexpected abnormal interruption faults;
[0015] (2.1) Obtain the address and exception type of the exception interrupt at the entrance of the exception handling function of each unexpected exception interrupt; the operating system software will not enter the exception handling function when it is running normally;
[0016] (2.2) When an unexpected abnormal interrupt occurs, the abnormal information is stored in the peripheral memory, and the abnormal information is printed through the serial port, and a timeout process is performed to trigger a watchdog reset; if the same abnormality still occurs after the reset, the serial port frequently prints the abnormal information;
[0017] (2.3) If the fault is eliminated after reset and the software runs normally, the recorded abnormal information can be read from the peripheral memory, passed to the application layer, and viewed on the monitoring host computer;
[0018] (2.4) Check the compiled link file and find the code location where the failure occurred based on the recorded exception information.
[0019] A computer storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for rapid fault location based on a FADEC operating system.
[0020] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for quickly locating a fault based on a FADEC operating system is implemented.
[0021] Beneficial effects: Compared with the prior art, the present invention has the following advantages: In the FADEC operating system, when a task timeout fault or an unexpected abnormal interrupt fault occurs in the software, the address and type of the fault is recorded in the peripheral memory. After the watchdog is reset due to the fault, the operating system prints the fault information through the serial port, or the operating system reads the fault information from the peripheral memory and passes it to the application layer. The fault can be quickly located by monitoring the host computer, which greatly improves the troubleshooting efficiency of the software and reduces the maintenance cost of the software. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of the steps of the present invention;
[0023] Figure 2 Quickly locate the schematic diagram for task timeout failure;
[0024] Figure 3 Quickly locate the schematic diagram for unexpected abnormal interruption faults;
[0025] Figure 4 Design a structure diagram for task timeout information;
[0026] Figure 5 Design diagram for exception information data structure. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0028] like Figure 1 As shown, a fault rapid location method based on FADEC operating system mainly includes a task timeout fault rapid location method and an unexpected abnormal interruption fault rapid location method, wherein the principle diagram of the task timeout fault rapid location method is shown in Figure 2 , the schematic diagram of the method for quickly locating unexpected abnormal interruption faults is shown in Figure 3 , as follows:
[0029] (1) A method for quickly locating task timeout faults.
[0030] (1.1) Get the interrupted address at the function entry of each timer interrupt; if the operating system software runs normally, the interrupted address is the background address; if a task timeout occurs in the foreground task, the address of the foreground task where the task timeout occurs is interrupted; for PowerPC architecture processors, when an interrupt or exception is identified, the most basic device mode information is saved to the storage / restore register pair SRR0 / SRR1. Among them, the interrupt return address is saved to the SRR0 register, and the value of the device mode register MSR is saved to SRR1. This method needs to read the value of the SRR0 register to obtain the interrupted address.
[0031] (1.2) Each interrupted address is stored in the peripheral memory. If a task timeout occurs, a watchdog reset will be triggered. The peripheral memory is a non-volatile memory, such as NvRAM or FLASH. The recorded interrupted return address will not be lost after the watchdog reset.
[0032] (1.3) After a reset occurs, the operating system reads the recorded task timeout fault address and prints the address through the serial port; or passes the address to the application layer and monitors it on the monitoring host computer; the data structure design of the recorded or printed task timeout information is as follows Figure 4 shown.
[0033] (1.4) The hardware provides reset source information for the software to read, and can monitor whether the reset source is a power-on reset or a watchdog reset. The software determines whether the address is valid by checking the reset source. Only when the reset is caused by a watchdog timeout, the address is valid and it is considered that a task timeout has occurred.
[0034] (1.5) Check the compiled link file and find the code location where the fault occurred based on the recorded timeout task address;
[0035] (2) A method for quickly locating unexpected abnormal interruption faults;
[0036] (2.1) The address and exception type of the abnormal interrupt are obtained at the entrance of the exception handling function of each unexpected abnormal interrupt; the operating system software will not enter the exception handling function when it runs normally; for the processor of PowerPC architecture, when the interrupt or exception is recognized, the most basic device mode information is saved to the storage / restore register pair SRR0 / SRR1. Among them, the interrupt return address is saved to the SRR0 register, and the value of the device mode register MSR is saved to SRR1. In addition, the processor of PowerPC architecture also provides an exception feature register ESR. Since some abnormal situations share an interrupt or exception vector, the ESR is checked to determine which abnormal situation has occurred; the data exception address register DEAR is provided to help the operating system code locate the address that causes the access permission exception. This method requires reading the value of the SRR0 register to obtain the interrupted address; reading the value of the SSR1 register to obtain the working mode of the device; reading the ESR register to check the abnormal situation; reading the DEAR register to obtain the abnormal data address; recording the exception type number at the entrance of different types of exception handling functions.
[0037] (2.2) When an unexpected abnormal interrupt occurs, the abnormal information is stored in the peripheral memory, and the abnormal information is printed through the serial port. A timeout process is performed to trigger a watchdog reset. The peripheral memory is a non-volatile memory, such as NvRAM or FLASH. The recorded abnormal information will not be lost after the watchdog reset. If the same abnormality still occurs after the reset, the serial port will frequently print the abnormal information, and the same abnormal information will also be written to the peripheral memory at the same location. The data structure design of the recorded or printed abnormal information is as follows: Figure 5 shown.
[0038] (2.3) If the fault is eliminated after reset and the software runs normally, the recorded abnormal information can be read from the peripheral memory, passed to the application layer, and viewed on the monitoring host computer;
[0039] (2.4) Check the compilation and linking MAP file and find the code location where the fault occurred based on the recorded exception information.
Claims
1. A method for rapid fault location based on FADEC operating system, characterized in that: It includes the method for quickly locating task timeout faults and unexpected abnormal interruption faults, as follows: (1) A method for quickly locating task timeout faults; (1.1) Get the interrupted address at the function entry of each timer interrupt; if the operating system software runs normally, the interrupted address is the background address; If a task timeout occurs in the foreground task, the address where the task timeout occurs is interrupted; for a processor of the PowerPC architecture, when an interrupt or exception is recognized, the device mode information is saved to the storage / restore register pair SRR0 / SRR1, where the interrupt return address is saved to the SRR0 register, and the value of the device mode register MSR is saved to SRR1. The interrupted address is obtained by reading the value of the SRR0 register; (1.2) Each interrupted address is stored in the peripheral memory. If a task timeout occurs, a watchdog reset will be triggered; (1.3) After a reset occurs, the operating system reads the recorded task timeout fault address and prints the address through the serial port; or passes the address to the application layer and monitors it on the monitoring host computer; (1.4) Check the reset source to determine whether the address is valid. The address is valid only when the reset is caused by the watchdog timeout. (1.5) Check the compiled link file and find the code location where the fault occurred based on the recorded timeout task address; (2) A method for quickly locating unexpected abnormal interruption faults; (2.1) At the entrance of the exception handling function of each unexpected exception interrupt, the address and exception type of the exception interrupt are obtained; the operating system software will not enter the exception handling function when it runs normally; for the processor of PowerPC architecture, when the interrupt or exception is recognized, the device mode information is saved to the storage / restore register pair SRR0 / SRR1, where the interrupt return address is saved to the SRR0 register and the value of the device mode register MSR is saved to SRR1; the processor of PowerPC architecture provides an exception feature register ESR, which is checked by checking the ESR to determine which exception has occurred; a data exception address register DEAR is provided to help the operating system code locate the address that causes the access permission exception; the interrupted address is obtained by reading the value of the SRR0 register; the working mode of the device is obtained by reading the value of the SSR1 register; the ESR register is read to check the exception; the DEAR register is read to obtain the exception data address; the exception type number is recorded at the entrance of different types of exception handling functions; (2.2) When an unexpected abnormal interrupt occurs, the abnormal information is stored in the peripheral memory, and the abnormal information is printed through the serial port, and a timeout process is performed to trigger a watchdog reset; if the same abnormality still occurs after the reset, the serial port frequently prints the abnormal information; (2.3) If the fault is eliminated after reset and the software runs normally, the recorded abnormal information is read from the peripheral memory, passed to the application layer, and viewed on the monitoring host computer; (2.4) Check the compiled link file and find the code location where the failure occurred based on the recorded exception information.
2. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for quickly locating a fault based on a FADEC operating system as claimed in claim 1 is implemented.
3. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for rapid fault location based on the FADEC operating system as claimed in claim 1 is implemented.
Citation Information
Patent Citations
Monitoring device and method for aircraft engine and FADEC system
CN103728965A
Fault management system for gas turbine engines
US20040088991A1
Interrupt vectoring for optionally architected facilities in computer systems
US5758168A
