Self-detection method with self-detection period alignment for secure computer platform
By adopting a self-detection method with self-test periodic alignment on the rail transit safety computer platform, we distinguish CAN node module failure and bus line failure, and switch the redundant bus during failure, solving the inability to distinguish fault types and data in the prior art. The problem of exchange timeout improves the stability and availability of the system.
Patent Information
- Application Number
- CN202411067691.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-05
AI Technical Summary
The existing rail transit safety computer platform cannot distinguish node module failure from bus line failure in the CAN bus self-test method, resulting in system unavailability, and data exchange timeout caused by dual CPU task scheduling differences and clock drift affecting system stability and Availability.
The self-detection method with self-test periodic alignment is adopted. By performing functional availability self-detection of the CAN bus on a secure computer platform, it distinguishes node module type failure and bus line type failure, and adopts different redundant processing strategies based on the self-test results. Ensure that the system switches to the redundant bus in the event of a failure and avoids dual master nodes and data exchange timeouts.
Effectively avoid the generation of dual master nodes, enhance the stability and availability of the system, ensure the output safety and continuous system availability in the case of CAN bus failure, reduce the impact of single node failure on the system, and improve the robustness of the system .
Smart Images

Figure CN118900242A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of CAN bus self-test of rail transit, and more particularly to a self-test method with self-test cycle alignment for a safety computer platform. Background Art
[0002] The secure computer platform is a fault-oriented safety underlying platform with good versatility. It can build different application systems only through application software development and hardware configuration without changing the hardware and core software. It is a core component of the railway signal system.
[0003] In the prior art, the patent with publication number CN116055294A discloses a multi-node CAN bus communication fault self-recovery method, which is used to solve the technical problem that the traditional CAN bus self-detection method only has the active query method and the hardware cost is high. The fault self-recovery is achieved through the initialization reset of the host and the slave, the status query, the check of the interrupt register and the status register, and the reception of the signals A, B, and C.
[0004] The patent with publication number CN109039704A discloses a CAN bus self-check and repair device and method, which monitors CAN node signals through a gateway controller and performs a self-reset operation when an invalid signal or no signal is detected, thereby realizing self-check and repair of the CAN bus.
[0005] The patent with publication number CN101494571A discloses a CAN bus self-detection and recovery device, which includes a CAN bus verification signal transmitter, a reply signal receiver, and a node restorer. The invention patent describes in detail the hardware components of the device and how they work together to detect and repair the CAN bus. The technical solution restores communication by replacing the breakpoint in the CAN bus with a spare bus, focusing more on hardware-level replacement and repair.
[0006] The existing rail transit two-by-two-out-of-two architecture safety computer platform needs to comply with the design concept of fault-oriented safety side, and at the same time has active-standby redundancy and CAN bus redundancy design. The current technical solution has three problems: 1. The traditional CAN bus self-test method aims to detect CAN bus faults through various hardware self-test technologies and self-repair at the hardware level. The upper-layer application software often determines the CAN module fault through the CAN driver actively reporting the error, and then switches the CAN bus or guides it to the safe side. Its disadvantage is that it is too dependent on the CAN driver component, but the existing driver cannot distinguish between CAN node module type faults and CAN bus line type faults. In the case of CAN node module type faults, it is necessary to follow the fault-directed safety side, but in the case of CAN bus line type faults, it should not be directly directed to the safety side. The bus should be switched to make the redundant bus work and ensure the system is available.
[0007] 2. Under the existing technical solution, when a secure computer platform system is powered on, various initializations will be performed first. The master-slave setting of the CAN node is also completed at this stage. The CAN master node is only generated in the logic processing unit. If one party is promoted to the master node, and the other party cannot receive the synchronization message sent by the master node in time due to a CAN failure, it will also be considered that there is no master node in the bus and automatically upgrade to the master node, resulting in dual master node operation, which ultimately makes the system unavailable.
[0008] 3. Under the existing technical solution, when the dual channels of the secure computer platform exchange data in the periodic serial port 2oo2, the system often crashes due to reasons such as different dual CPU task scheduling and clock drift, which causes one CPU to calculate the result and initiate data exchange, and the waiting time for the other CPU to initiate data exchange times out. Summary of the invention
[0009] In order to overcome the defects existing in the above-mentioned prior art, the present invention discloses a self-detection method with self-detection cycle alignment for a secure computer platform. The present invention is mainly used to perform CAN bus function availability self-detection on each node on the CAN bus of the secure computer platform, and formulate different redundant processing strategies according to the self-detection results to meet the high reliability, high stability and high availability requirements of the secure computer platform.
[0010] In order to achieve the above objectives, the technical solution adopted by the present invention is: A self-test method with self-test cycle alignment for a secure computer platform, comprising: The secure computer platform adopts a two-by-two-out-of-two architecture, including two mutually redundant logic processing units and a plurality of execution units, each of which includes a CPUA and a CPUB dual channel, each CPU node in the CPUA and CPUB dual channels acts as a separate CAN node to perform CAN communication with other CAN nodes; all CAN nodes are connected through two mutually redundant CAN buses ALPHA bus and BETA bus, and there is only one master node among all CAN nodes, the master node is selected from the CPUA of the two logic processing units, and the other nodes are all slave nodes; Among them, both the logic processing unit and the execution unit can perform self-detection. When the logic processing unit and the execution unit self-detect, they distinguish between CAN node module type fault and CAN bus line type fault. When the CAN node module type fault occurs, the logic processing unit and the execution unit are directed to the safety side; when the CAN bus line type fault occurs, the CAN master node switches the operating bus to a redundant fault-free CAN bus, and the CAN slave node waits for the CAN master node synchronization message notification to switch to the redundant fault-free CAN bus; The logic processing unit self-detection also includes: the two logic processing units perform a CAN bus self-detection operation before initializing the master-slave node election, and then set the master and slave nodes after the self-detection passes. If the self-detection fails, the logic processing unit will be shut down and its CAN node will be removed from the two CAN buses, or the CAN bus will be switched.
[0011] Preferably, the logic processing unit self-detection comprises the following steps: A1. The CAN node states of the two logic processing units are both in the initialization state. The CPUA and CPUB of the two logic processing units periodically send and receive broadcast self-test frames on the ALPHA bus and BETA bus. Preferably, step A1 includes: during initialization, the CAN node states of the two logical processing units are both in the initialization state, and the CPUA of the two logical processing units periodically sends and receives CAN broadcast self-test frames with the destination being its own node CPUA node on the ALPHA bus and the BETA bus; similarly, the CPUB of the two logical processing units periodically sends and receives CAN broadcast self-test frames with the destination being its own node CPUB node on the ALPHA bus and the BETA bus.
[0012] A2, CPUA and CPUB of the two logic processing units exchange the self-sent and self-received self-test results through the serial port two-out-of-two. If the interaction results of the two logic processing units are both passed, it is determined that the two logic processing units have passed the CAN bus self-test and enter step A3, otherwise enter step A4; Preferably, step A2 includes: if CPUA or CPUB of each logical processing unit cannot receive the broadcast self-test frame sent by itself on any CAN bus of ALPHA bus and BETA bus, it is recorded as self-test failure; if CPUA or CPUB of each logical processing unit receives the broadcast self-test frame sent by itself on ALPHA bus and BETA bus, it is recorded as self-test passing; The self-test results of CPUA and CPUB of each logical processing unit are exchanged through the serial port 2oo2 of CPUA and CPUB. If the interaction results of the two logical processing units are both passed, it is determined that the two logical processing units have passed the CAN bus self-test, and the process goes to step A3; if the interaction results are either failed, it is determined that the two logical processing units have not passed the CAN bus self-test, and the process goes to step A4.
[0013] Preferably, in step A2, the method for judging the self-transmission, self-reception and self-check includes: if N or 1 self-check frame is not received within the time of periodically sending N self-check frames, it is judged that the self-transmission and self-reception have failed and the self-check has not passed.
[0014] A3. After both logic processing units pass the CAN bus self-test, logic processing unit 1 is set as the master node and logic processing unit 2 as the slave node. Initialization is completed and the process goes to step A5. Preferably, step A3 includes: after both logic processing units pass the CAN bus self-test, by default, logic processing unit 1 is promoted to the master node first, and sends a synchronization frame to the other logic processing unit 2; logic processing unit 2 waits for the synchronization frame after passing the self-test, and after receiving the synchronization frame, the node state is changed to a slave node; the CAN bus self-test passes and the master-slave node election is completed; the logic processing unit continues the subsequent initialization process, enters the normal operating state after the initialization is completed, and enters step A5.
[0015] A4. Processing the failure of the logic processing unit self-test, including: shutting down the logic processing unit and removing its CAN node from the two CAN buses, or switching to another fault-free CAN bus and setting the master and slave nodes; Preferably, in step A4, the processing of the failure of the logic processing unit self-test includes: The situation where the logic processing unit fails the self-test is: CPUA succeeds in self-transmission and self-reception, CPUB fails in self-transmission and self-reception, and the CAN module of CPUB is faulty; the solution to this situation is to shut down the logic processing unit and remove its CAN node from the two CAN buses; The logic processing unit self-test fails when: CPUA fails to send and receive signals, CPUB succeeds in sending and receiving signals, and the CAN module of CPUA fails. The solution to this problem is to shut down the logic processing unit and remove its CAN node from the two CAN buses. The situation where the logic processing unit fails the self-test is: CPUA fails to send and receive automatically, CPUB fails to send and receive automatically, the CAN modules of CPUA and CPUB are both faulty, or a CAN bus line is faulty; the processing method for this situation is: check the self-test result of another CAN bus; if the self-test fails, shut down the logic processing unit and remove its CAN node from the two CAN buses; if the self-test passes, it is a CAN bus line fault, switch to another fault-free CAN bus and set the master-slave node, and then enter step A5.
[0016] A5. In normal operation mode, perform self-check judgment with self-check cycle alignment.
[0017] Preferably, in step A5, the self-check cycle alignment includes: when CPUA and CPUB are exchanging data, a CPU records the actual waiting time from sending to receiving the exchanged data when exchanging data, and the CPU performs delay processing according to the waiting time before the next exchange, so that the two CPU serial ports are dynamically aligned during 2oo2 exchange.
[0018] Preferably, in step A5, the CAN self-test results are periodically compared by serial port 2oo2. When all self-tests pass, normal operation continues and step A5 is continued. When not all dual-channel CPU self-test results pass, the process proceeds to step A4.
[0019] Preferably, the execution unit self-detection method comprises the following steps: B1. The execution unit is powered on and starts, and performs self-test judgment with self-test cycle alignment. The CPUA and CPUB of the execution unit periodically send and receive broadcast self-test frames on the ALPHA bus and BETA bus; B2, the CPUA and CPUB of the execution unit will exchange the self-sent and self-received self-test results through the serial port two-out-of-two. If the interactive results are all passed, it is determined that the execution unit has passed the CAN bus self-test and enters step B3; if the interactive result is that only one self-test fails, it enters step B4; if the interactive result is that all self-tests fail, it enters step B5; B3: CPUA and CPUB both pass the self-test, and return to step B1 to continue the self-test judgment with self-test cycle alignment; B4: Only one of CPUA and CPUB fails the self-test, which indicates that the CAN module of a single CPU is faulty. The execution unit will be shut down and its own node will be removed from the two CAN buses. B5, CPUA and CPUB both fail the self-test, then wait for the CAN bus master node periodically to send a synchronization frame on the ALPHA and BETA buses, which informs whether the current active bus is ALPHA or BETA; If CPUA and CPUB can receive synchronization frames on the other bus, it means that the current bus line is faulty and the dual CPUs fail the self-test on the current bus and switch to the other bus to work; If CPUA and CPUB cannot receive the synchronization frame on the other bus, it means that both CPUA and CPUB have CAN module failures, the execution unit crashes, and removes its own node from the two CAN buses.
[0020] The key points of the present invention are as follows: (1) When the secure computer platform is started, CAN communication failures can easily cause the generation of dual master nodes during the master-slave node election. The intervention of the method of the present invention can effectively avoid the occurrence of dual master nodes on the CAN bus in the logic processing unit. Because the CAN bus self-check method in the method needs to be executed once before determining the master and slave nodes, the CAN module problem can be discovered early, and the node removal processing or bus switching processing can be performed.
[0021] (2) The method of the present invention is executed during operation to detect CAN module failures and CAN bus line failures of the equipment at all times. This avoids the situation where too many error frames on the CAN bus caused by CAN module failures during operation cause other nodes on the bus to be unable to pass normally. At the same time, the bus can be actively switched according to the self-check situation, thereby enhancing the stability, availability and redundancy of the entire system.
[0022] (3) The use of serial port 2oo2 data exchange with self-check cycle alignment solves the timeout problem caused by self-check cycle clock drift and scheduling cycle, thus enhancing the robustness of the entire system.
[0023] Beneficial effects of the present invention: Different from the existing technical solutions which focus on CAN bus hardware self-detection and standby bus replacement, and emphasize on the characteristics of restoring the availability of the faulty CAN bus, the CAN bus self-detection method with self-detection cycle alignment proposed in the present invention has high security and high availability requirements because it is applied to the safety computer platform in the field of rail transit. When a CAN bus failure occurs, the primary task is to keep the system output safe and continuously available. After the method proposed in the present invention detects the CAN bus failure based on the self-sent and self-received self-detection frame of the application layer, different processing strategies are adopted according to the type of failure, or the node is removed by active shutdown, or the CAN bus is actively switched. Bus detection and redundant decision-making on the safety computer platform are truly realized. The stability and availability of the rail transit safety computer platform are greatly enhanced, while the impact of a single CAN node failure on the system operation is minimized, thereby enhancing the robustness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a CAN bus framework structure diagram of the security computer platform of the present invention; Figure 2 It is a CAN bus self-check processing flow chart of the logic processing unit 1 of the present invention; Figure 3 It is a CAN bus self-check processing flow chart of the logic processing unit 2 of the present invention; Figure 4 This is a flowchart of the CAN bus self-check processing of the execution unit of the present invention. DETAILED DESCRIPTION
[0025] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and drawings to fully understand the purpose, characteristics and effects of the present invention.
[0026] A self-test method with self-test cycle alignment for a secure computer platform, the secure computer platform of the present invention adopts a two-by-two-out-of-two architecture. Figure 1 As shown in the figure, a secure computer platform system includes two mutually redundant logical processing units and several execution units. Each minimum unit is composed of two channels, CPUA and CPUB. Each CPU node acts as a separate CAN node to communicate with other CAN nodes. All CAN nodes are connected through two mutually redundant CAN buses, ALPHA bus and BETA bus. There is only one master node among all CAN nodes, and the master node will only be selected from CPUA of the two logical processing units, and the other nodes are all slave nodes. The master node controls the bus activation, switching and other actions of the slave nodes by sending synchronization commands.
[0027] The two-by-two-out-of-two architecture safety computer platform involved in the present invention needs to comply with the design concept of fault-oriented safety side, and at the same time has main and standby redundancy and CAN bus redundancy design. The current technical solution has the following problems: 1. The traditional CAN bus self-test method aims to detect CAN bus faults through various hardware self-test technologies and self-repair at the hardware level. The upper-layer application software often determines the CAN module fault through the CAN driver actively reporting the error, and then switches the CAN bus or guides it to the safe side. Its disadvantage is that it is too dependent on the CAN driver component, but the existing driver cannot distinguish between CAN node module type faults and CAN bus line type faults. In the case of CAN node module type faults, it is necessary to follow the fault-directed safety side, but in the case of CAN bus line type faults, it should not be directly directed to the safety side. The bus should be switched to make the redundant bus work and ensure the system is available.
[0028] 2. Under the existing technical solution, when a secure computer platform system is powered on, various initializations will be performed first. The master-slave setting of the CAN node is also completed at this stage. The CAN master node is only generated in the logic processing unit. If one party is promoted to the master node, and the other party cannot receive the synchronization message sent by the master node in time due to a CAN failure, it will also be considered that there is no master node in the bus and automatically upgrade to the master node, resulting in dual master node operation, which ultimately makes the system unavailable.
[0029] 3. Under the existing technical solution, when the dual channels of the secure computer platform exchange data in the periodic serial port 2oo2, the system often crashes due to reasons such as different dual CPU task scheduling and clock drift, which causes one CPU to calculate the result and initiate data exchange, and the waiting time for the other CPU to initiate data exchange times out.
[0030] The purpose of the present invention is to overcome the defects of the traditional CAN bus self-test method and the shortcomings of the existing technical solutions and provide a CAN bus self-test method. The technical solution of the invention is divided into a logic processing unit and an execution unit as follows: a) Logical processing unit: By using the technical solution of the present invention, the two logic processing units perform a CAN node self-detection operation before initializing the master-slave node election, which can avoid the generation of double master nodes during initialization. At the same time, the availability of the system is enhanced. The logic processing unit CAN self-detection process is as follows Figure 2 and Figure 3 The specific process is as follows.
[0031] The specific method of self-checking the logic processing unit is as follows: Step 1 During initialization, the CAN node states of the two logical processing units are both in the initialization state, and CPUA of the two logical processing units sends a CAN broadcast self-test frame with the destination being CPUA node on the ALPHA bus and BETA bus. Similarly, CPUB also sends a CAN broadcast self-test frame with the destination being its own node CPUB on the ALPHA bus and BETA bus.
[0032] Step 2 If CPUA or CPUB of any logic processing unit cannot receive the broadcast self-test frame sent by itself on any CAN bus of ALPHA bus and BETA bus, it will be recorded as self-test failure (the judgment logic of success or failure of self-transmission and self-reception depends on the specific situation. It can be judged that self-transmission and self-reception failed if N packets or 1 packet are not received within the time of periodically sending N packets of self-test frames). The self-test results of CPUA and CPUB are exchanged through the serial port 2oo2 of CPUA and CPUB. If the interaction results are all passed, it is judged that the logic processing unit has passed the CAN bus self-test and enters step 3. If the self-test fails, go to step 4.
[0033] Step 3: After both logic processing units pass the CAN bus self-test, by default, logic processing unit 1 is promoted to the master node first and sends a synchronization frame to the other logic processing unit 2. At this time, logic processing unit 2 waits for the synchronization frame after passing the self-test. After receiving the synchronization frame, the node status changes to a slave node. At this point, the CAN bus self-test passes and the master-slave node election is completed. The logic processing unit continues the subsequent initialization process and enters the normal operation state after the initialization is completed. Go to step 5.
[0034] Step 4: If a logic processing unit fails the self-test, there are three cases (based on the self-test results of the ALPHA bus, and the same applies to the BETA bus): ① CPUA successfully sends and receives data, and CPUB fails to send and receive data In this case, it is not possible to have an ALPHA bus type fault, but a CAN module fault of CPUB. The logic processing unit cannot meet the safety policy of outputting the two-out-of-two ratio after the dual-channel CPU operation, and cannot work normally. Therefore, in this case, the logic processing unit is directly shut down, and the CAN node is removed from the CAN bus to avoid the CAN module bottom layer repeatedly sending error frames and affecting the communication of other normal nodes on the bus.
[0035] ② CPUA fails to send and receive data by itself + CPUB succeeds to send and receive data by itself This situation is similar to the above situation ①. The CAN module of CPUA is faulty and cannot work normally. Select downtime processing.
[0036] ③ CPUA self-transmission and self-reception failure + CPUB self-transmission and self-reception failure In this case, there are two possible causes of the fault. One is that the CAN modules of CPUA and CPUB are both faulty. The other is that the ALPHA bus line is faulty.
[0037] If the first possibility is followed, the module failure should be directed to the safety side, but if it is directly directed to the safety side, the second possibility will be missed, causing bus redundancy failure.
[0038] If the second possibility is followed, the situation is different. If there is no line fault on the BETA bus, both CPUA and CPUB channels will successfully send and receive broadcast self-test frames.
[0039] From the above analysis, we can know that in order to achieve CAN bus redundancy, we should handle it according to the second possibility when this situation occurs. If the self-test result of the BETA bus is successful, switch to the BETA bus. If the self-test fails on the BETA bus, although it is not possible to completely determine whether the CAN modules of CPUA and CPUB are both faulty, or whether there is a line fault on the ALPHA bus and BETA bus, there is no negative impact on the choice of processing strategy. Both of these faults require direct shutdown and removal of this node from the CAN bus.
[0040] Step 5 In normal operation mode, perform self-check judgment logic with self-check cycle alignment.
[0041] In order to solve the problem of timeout and downtime of dual-channel periodic serial port 2oo2 data exchange, in this embodiment, a CPU records the actual waiting time from sending to receiving the exchanged data when exchanging data, so that the CPU can perform corresponding delay processing before the next exchange, so that the two CPU serial ports 2oo2 exchange dynamically align the timing. Timeout and downtime will no longer occur.
[0042] In order to determine the master-slave relationship of CAN nodes during the initialization phase, a CAN self-test needs to be performed first. However, in normal operation mode, in order to prevent the module failure and bus failure of the CAN bus from affecting the entire system, it is necessary to periodically perform a serial port 2oo2 comparison of the CAN self-test results. If the self-test passes, continue normal operation and proceed to step 5. If the dual-channel CPU self-test results do not all pass, proceed to step 4.
[0043] b) Execution unit: The execution unit is different from the logic processing unit. After power-on, the self-test judgment logic with self-test cycle alignment begins to execute. Because the execution unit does not compete for the CAN master node, it does not manage the activation and switching of the CAN bus. Regardless of the initialization or normal operation phase, the self-test judgment logic is the same. The execution unit CAN self-test processing flow is as follows Figure 4 The specific process is as follows.
[0044] The specific method of executing unit self-check is as follows: Step 1 After the execution unit is powered on, it starts to execute the self-check judgment logic with self-check cycle alignment that is the same as step 5 of the logic processing unit.
[0045] Step 2 After the execution unit performs dual-channel CPU serial port 2oo2 exchange CPU self-test status (taking ALPHA bus as an example): ① Both CPUA and CPUB pass self-test Go to step 1 and continue to execute the self-check judgment logic with self-check cycle alignment.
[0046] ② Only one of CPUA and CPUB fails the self-test It is directly determined that the CAN module of a single CPU is faulty, and the system is directly shut down and the CAN node is removed.
[0047] ③ Both CPUA and CPUB fail self-test Then wait for the CAN bus master node to periodically send a synchronization frame on the ALPHA and BETA buses. The synchronization frame tells whether the current active bus is ALPHA or BETA. If CPUA and CPUB can receive the synchronization frame on the BETA bus, it means that the ALPHA bus line failure causes the dual CPUs to fail the ALPHA bus self-test and switch to the BETA bus. If CPUA and CPUB cannot receive the synchronization frame on the BETA bus, it means that both CPUA and CPUB have a CAN module failure, and the downtime processing is carried out, and the CAN node is removed.
[0048] The above is a specific description of the implementation mode of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention, and these equivalents or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A self-test method with self-test cycle alignment for a secure computer platform, characterized in that: include: The secure computer platform adopts a two-by-two-out-of-two architecture, including two mutually redundant logic processing units and a plurality of execution units, each of which includes a CPUA and a CPUB dual channel, each CPU node in the CPUA and CPUB dual channels acts as a separate CAN node to perform CAN communication with other CAN nodes; all CAN nodes are connected through two mutually redundant CAN buses ALPHA bus and BETA bus, and there is only one master node among all CAN nodes, the master node is selected from the CPUA of the two logic processing units, and the other nodes are all slave nodes; Among them, both the logic processing unit and the execution unit can perform self-detection. When the logic processing unit and the execution unit self-detect, they distinguish between CAN node module type fault and CAN bus line type fault. When the CAN node module type fault occurs, the logic processing unit and the execution unit are directed to the safety side; when the CAN bus line type fault occurs, the CAN master node switches the operating bus to a redundant fault-free CAN bus, and the CAN slave node waits for the CAN master node synchronization message notification to switch to the redundant fault-free CAN bus; The logic processing unit self-detection also includes: the two logic processing units perform a CAN bus self-detection operation before initializing the master-slave node election, and then set the master and slave nodes after the self-detection passes. If the self-detection fails, the logic processing unit will be shut down and its CAN node will be removed from the two CAN buses, or the CAN bus will be switched.
2. The self-detection method according to claim 1, characterized in that: The logic processing unit self-detection comprises the following steps: A1. The CAN node states of the two logic processing units are both in the initialization state. The CPUA and CPUB of the two logic processing units periodically send and receive broadcast self-test frames on the ALPHA bus and BETA bus. A2, CPUA and CPUB of the two logic processing units exchange the self-sent and self-received self-test results through the serial port two-out-of-two. If the interaction results of the two logic processing units are both passed, it is determined that the two logic processing units have passed the CAN bus self-test and enter step A3, otherwise enter step A4; A3. After both logic processing units pass the CAN bus self-test, logic processing unit 1 is set as the master node and logic processing unit 2 as the slave node. Initialization is completed and the process goes to step A5. A4. Processing the failure of the logic processing unit self-test, including: shutting down the logic processing unit and removing its CAN node from the two CAN buses, or switching to another fault-free CAN bus and setting the master and slave nodes; A5. In normal operation mode, perform self-check judgment with self-check cycle alignment.
3. The self-detection method according to claim 2, characterized in that: Step A1 includes: during initialization, the CAN node states of the two logical processing units are both in the initialization state, and the CPUA of the two logical processing units periodically sends and receives CAN broadcast self-test frames with the destination being its own node CPUA node on the ALPHA bus and the BETA bus; similarly, the CPUB of the two logical processing units periodically sends and receives CAN broadcast self-test frames with the destination being its own node CPUB node on the ALPHA bus and the BETA bus.
4. The self-detection method according to claim 2, characterized in that: Step A2 includes: if CPUA or CPUB of each logic processing unit cannot receive the broadcast self-test frame sent by itself on any CAN bus of ALPHA bus and BETA bus, it is recorded as self-test failure; if CPUA or CPUB of each logic processing unit receives the broadcast self-test frame sent by itself on ALPHA bus and BETA bus, it is recorded as self-test passing; The self-test results of CPUA and CPUB of each logical processing unit are exchanged through the serial port 2oo2 of CPUA and CPUB. If the interaction results of the two logical processing units are both passed, it is determined that the two logical processing units have passed the CAN bus self-test, and the process goes to step A3; if the interaction results are either failed, it is determined that the two logical processing units have not passed the CAN bus self-test, and the process goes to step A4.
5. The self-detection method according to claim 2, characterized in that: In step A2, the method for judging the self-transmission, self-reception and self-check includes: if N or 1 self-check frames are not received within the time of periodically sending N self-check frames, it is judged that the self-transmission and self-reception have failed and the self-check has not passed.
6. The self-detection method according to claim 2, characterized in that: Step A3 includes: after both logic processing units pass the CAN bus self-test, by default, logic processing unit 1 is promoted to the master node first and sends a synchronization frame to the other logic processing unit 2; after the self-test passes, logic processing unit 2 waits for the synchronization frame, and after receiving the synchronization frame, the node state changes to the slave node; the CAN bus self-test passes and the master-slave node election is completed; the logic processing unit continues the subsequent initialization process, enters the normal operating state after the initialization is completed, and goes to step A5.
7. The self-detection method according to claim 2, characterized in that: In step A4, the processing of the failure of the logic processing unit self-test includes: The situation where the logic processing unit fails the self-test is: CPUA succeeds in self-transmission and self-reception, CPUB fails in self-transmission and self-reception, and the CAN module of CPUB is faulty; the solution to this situation is: shut down the logic processing unit and remove its CAN node from the two CAN buses; The logic processing unit self-test fails when: CPUA fails to send and receive signals, CPUB succeeds in sending and receiving signals, and the CAN module of CPUA fails. The solution to this problem is to shut down the logic processing unit and remove its CAN node from the two CAN buses. The situation where the logic processing unit fails the self-test is: CPUA fails to send and receive automatically, CPUB fails to send and receive automatically, the CAN modules of CPUA and CPUB are both faulty, or a CAN bus line is faulty; the processing method for this situation is: check the self-test result of another CAN bus; if the self-test fails, shut down the logic processing unit and remove its CAN node from the two CAN buses; if the self-test passes, it is a CAN bus line fault, switch to another fault-free CAN bus and set the master-slave node, and then enter step A5.
8. The self-detection method according to claim 2, characterized in that: In step A5, the self-check cycle alignment includes: when CPUA and CPUB are exchanging data, a CPU records the actual waiting time from sending to receiving the exchanged data, and the CPU performs delay processing according to the waiting time before the next exchange, so that the two CPU serial ports are dynamically aligned during 2oo2 exchange.
9. The self-detection method according to claim 2, characterized in that: In step A5, the CAN self-test results are periodically compared by serial port 2oo2. When all self-tests pass, normal operation continues and step A5 is executed. When the dual-channel CPU self-test results do not all pass, the process proceeds to step A4.
10. The self-detection method according to claim 1, characterized in that: The execution unit self-detection method comprises the following steps: B1. The execution unit is powered on and starts, and performs self-test judgment with self-test cycle alignment. The CPUA and CPUB of the execution unit periodically send and receive broadcast self-test frames on the ALPHA bus and BETA bus; B2, the CPUA and CPUB of the execution unit will exchange the self-sent and self-received self-test results through the serial port two-out-of-two. If the interactive results are all passed, it is determined that the execution unit has passed the CAN bus self-test and enters step B3; if the interactive result is that only one self-test fails, it enters step B4; if the interactive result is that all self-tests fail, it enters step B5; B3: CPUA and CPUB both pass the self-test, and return to step B1 to continue the self-test judgment with self-test cycle alignment; B4: Only one of CPUA and CPUB fails the self-test, which indicates that the CAN module of a single CPU is faulty. The execution unit will be shut down and its own node will be removed from the two CAN buses. B5, CPUA and CPUB both fail the self-test, then wait for the CAN bus master node periodically to send a synchronization frame on the ALPHA and BETA buses, which informs whether the current active bus is ALPHA or BETA; If CPUA and CPUB can receive synchronization frames on the other bus, it means that the current bus line is faulty and the dual CPUs fail the self-test on the current bus and switch to the other bus to work; If CPUA and CPUB cannot receive the synchronization frame on the other bus, it means that both CPUA and CPUB have CAN module failures, the execution unit crashes, and removes its own node from the two CAN buses.
Citation Information
Cited By
Urban rail signal and platform door integrated system
CN120922202A
