CN113692008B - Method, device, equipment and storage medium for processing abnormal receiving and dispatching - Google Patents

Method, device, equipment and storage medium for processing abnormal receiving and dispatching Download PDF

Info

Publication number
CN113692008B
CN113692008B CN202110997605.2A CN202110997605A CN113692008B CN 113692008 B CN113692008 B CN 113692008B CN 202110997605 A CN202110997605 A CN 202110997605A CN 113692008 B CN113692008 B CN 113692008B
Authority
CN
China
Prior art keywords
count value
timer
receiving
transmitting
equipment
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.)
Active
Application number
CN202110997605.2A
Other languages
Chinese (zh)
Other versions
CN113692008A (en
Inventor
曹同
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110997605.2A priority Critical patent/CN113692008B/en
Publication of CN113692008A publication Critical patent/CN113692008A/en
Application granted granted Critical
Publication of CN113692008B publication Critical patent/CN113692008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M1/00Design features of general application
    • G06M1/27Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
    • G06M1/272Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using photoelectric means

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for processing abnormal receiving and sending, and relates to the embedded field. The method is applied to micro-control equipment, wherein the micro-control equipment is configured in the first wireless module and is connected with the transceiver equipment in the first wireless module; when a preset period arrives and an external interrupt signal is not detected, initializing a timer and a count value according to the preset period; adding the count value according to the detected timer interrupt signal; and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold. The method utilizes the external interrupt signal triggered when the receiving and transmitting operation is executed to determine whether to start the timer to perform abnormality judgment, and influences the change of the count value through the detected timer interrupt signal, so that corresponding abnormality processing is performed according to the relation between the count value and the count threshold.

Description

Method, device, equipment and storage medium for processing abnormal receiving and dispatching
Technical Field
The present invention relates to the field of embedded systems, and in particular, to a method, an apparatus, a device, and a storage medium for processing a transmission/reception exception.
Background
Currently, the explosive development of the application of the internet of things brings a new round of wireless communication technology business opportunities. The basis of the Internet of things comprises a plurality of interconnection wireless modules, so that the simple, stable and reliable networking capability of the wireless modules is one of the most important elements of the development of the Internet of things, and the self-recovery capability of the wireless modules is particularly important when the wireless modules are abnormal.
A wireless module basically comprises an MCU (also called a singlechip) and a wireless chip, wherein the communication connection between the wireless modules can be realized through the wireless chip. When a wireless module has communication abnormality, the self-recovery of the abnormality from the MCU can be realized through a watchdog. While the related anomaly recovery strategies are provided in the prior art for anomalies from the wireless chip, the related anomaly recovery strategies are either inefficient or fail to initialize. In general, the related art strategy for abnormal recovery of a wireless chip is not satisfactory.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks, and in particular, to a strategy for abnormal recovery of a wireless chip in the prior art, which is either inefficient or failed in initialization.
According to an aspect of the present application, there is provided a method for processing abnormal transceiving, the method is applied to a micro control device, and the micro control device is configured in a first wireless module and connected to the transceiving device in the first wireless module, the method includes:
when a preset period arrives and an external interrupt signal is not detected, initializing a timer and a count value according to the preset period;
adding the count value according to the detected timer interrupt signal;
and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold.
According to another aspect of the present application, there is provided an apparatus for processing abnormal transceiving, the apparatus being applied to a micro control device, the micro control device being configured in a first wireless module and connected to the transceiving device in the first wireless module, the apparatus comprising:
the timing interrupt module comprises a timer, and is used for initializing the timer and a count value according to a preset period when the preset period arrives and an external interrupt signal is not detected;
the timing interrupt module is also used for adding the count value according to the detected timer interrupt signal;
and the exception handling module is used for executing corresponding receiving and transmitting exception handling operation according to the relation between the count value and the count threshold value.
According to another aspect of the present application, there is provided a wireless module including a micro control device and a transceiver device that generates an external interrupt signal when the transceiver device performs a receiving/transmitting operation, wherein,
the micro-control device is used for initializing a timer and a count value of the micro-control device according to a preset period when the preset period arrives and the external interrupt signal is not detected;
the micro-control equipment is also used for adding the count value according to the detected timer interrupt signal;
the micro control device is further configured to execute a corresponding abnormal receiving and sending processing operation according to the relationship between the count value and the count threshold.
According to another aspect of the present application, there is provided an electronic device including:
a processor; and
the memory is configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform operations corresponding to a method of handling a transception exception as described in one of the foregoing aspects of the present application.
According to yet another aspect of the present application, there is provided a computer-readable storage medium for storing computer instructions that, when executed on a computer, cause the computer to perform operations corresponding to a method for handling transception anomalies as described in one of the previous aspects of the present application.
The beneficial effects that this application provided technical scheme brought are:
the application provides a method for processing abnormal receiving and transmitting, which is applied to micro-control equipment, wherein the micro-control equipment is configured in a first wireless module and is connected with receiving and transmitting equipment in the first wireless module; when a preset period arrives and an external interrupt signal is not detected, initializing a timer and a count value according to the preset period; adding the count value according to the detected timer interrupt signal; and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold.
Compared with the anomaly recovery strategy provided in the prior art, the method can effectively utilize the external interrupt signal, starts the step of judging the receiving and transmitting anomalies when the receiving and transmitting anomalies are found, and does not directly perform the reset operation, and the corresponding operation of processing the receiving and transmitting anomalies is performed only after the count value and the count threshold meet a certain relation. In general, the method for processing the abnormal transceiving operation provided by the embodiment of the application effectively improves the processing efficiency of the abnormal transceiving operation.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic structural diagram of a wireless networking according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a wireless module according to an embodiment of the present disclosure;
fig. 3 is a flow chart of a method for processing abnormal transceiving according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a process for recovering abnormal transceiving according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for handling abnormal transceiving according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating the present application and are not to be construed as limiting the present application.
Several terms which are referred to in this application are first introduced and explained:
and the micro control equipment comprises: the micro control devices related to the application are all referred to as MCU (Micro Controller Unit, micro control unit), and the MCU has a very important branch, namely a singlechip. The functional modules integrated on the MCU may include: first, the timer includes a timer with a fixed time interval and a programmable timer, wherein the timing time of the timer with the fixed time interval is determined according to a fixed time interval provided by the MCU, and the timing time of the programmable timer is determined according to a program set by a user, specifically, a clock source, a frequency division number and a preset number are selected through the set program, and since the clock source of the programmable timer can be freely selected, such a timer is generally used together with an Event Counter. Second, external interrupts, which are generally based on real-time requirements, are the most desirable choice for detection of bursty signals in order to ensure that the signal is not missed. Third, watchdog timers (also known as Watchdog) typically provide a self-recovery function for MCUs that crash due to unexpected failures. The MCU has many other functions, which will not be described further herein due to space limitations.
Transceiver device: the transceiver device related to the present application refers to a wireless chip connected to an MCU, and the wireless chip has a communication function, and the communication function in the present application specifically refers to wireless communication performed by an existing wireless communication technology.
Referring to fig. 1, the prior art discloses a structure diagram of a wireless networking, which is composed of a plurality of wireless modules, and each wireless module should include an MCU and a wireless chip. Specifically, the MCU is a core module of each wireless module, directly controls other functional modules of the wireless module, including controlling the wireless chip, and the communication between the wireless modules mainly depends on the communication function of the wireless chip. In addition, the wireless networking comprises a host wireless module and a slave wireless module, and the running state of the wireless networking can be as follows: the host wireless module is connected with each slave wireless module, and the host wireless module respectively sends instructions to each slave wireless module and receives information fed back by each slave wireless module, or the slave wireless module respectively sends information to the host wireless module and respectively receives information fed back by the host wireless module.
From the communication perspective, whether the functional status of the wireless chip of each wireless module is good is one of the key factors of whether the wireless networking can normally operate. When communication abnormality occurs in the wireless networking, particularly, communication abnormality caused by abnormality of the wireless module, the cause can be traced back to the MCU and the wireless chip in general. Since the MCU can realize abnormal self-recovery through the watchdog function, it is particularly important to detect and self-recover the abnormality of the wireless chip. In the prior art, two schemes are provided to realize the anomaly detection and recovery of the wireless chip.
First, the software resets. The MCU queries the register state of the wireless chip according to the preset frequency, and performs exception handling once the state of a certain register is found to be beyond a normal value. The method is mainly aimed at that when the wireless chip can not normally execute the receiving and transmitting operation, the values of some registers can not be changed normally, and the abnormality can be detected by detecting the state of the registers. After determining that the wireless chip is abnormal, the MCU sends a reset instruction to the wireless chip to perform abnormality recovery. However, this method requires the MCU to separately develop a task line, performs detection for a plurality of register states, consumes resources, and is inefficient.
Second, the hardware is reset. The reset pin of the wireless chip is pulled down or pulled up by people, so that the wireless chip resets itself. However, when the reset pin is operated to reset the wireless chip, the original execution logic of the wireless chip is disturbed, and in such a case, the wireless chip is initialized, and thus initialization abnormality is very likely to occur.
That is, the software reset and hardware reset methods provided in the prior art either occupy the resources of the wireless module, i.e. have low efficiency, or generate an abnormal initialization, i.e. have failed initialization.
The application provides a method, a device and a storage medium for processing abnormal receiving and transmitting, which aim to solve the technical problems in the prior art.
The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 2, a possible block diagram of a wireless module is provided in the embodiment of the present application, and the wireless module is applied to the wireless networking in fig. 1, so that a method for processing abnormal transceiving provided in the embodiment of the present application may be implemented based on the possible block diagram.
Referring to fig. 3, an embodiment of the present application provides a possible flowchart of a method for handling a transception exception. The method is applied to micro-control equipment, and the micro-control equipment is configured in the first wireless module and is connected with the transceiver equipment in the first wireless module. The method comprises the following steps:
s110, initializing a timer and a count value according to a preset period when the preset period arrives and an external interrupt signal is not detected;
the first wireless module and the second wireless module form a wireless networking. When the first wireless module is a master wireless module, the second wireless module is a slave wireless module; when the first wireless module is a slave wireless module, the second wireless module is a master wireless module.
In the wireless networking according to the embodiment of the present application, the number of the slave wireless modules and the number of the master wireless modules are at least one. The transceiver of the master wireless module and the transceiver of the slave wireless module communicate by adopting a wireless communication technology, and the wireless communication technology can comprise: zigbee, bluetooth, etc.
In one possible implementation, after the micro control device is started, an external interrupt signal triggered by the transceiver device after performing the receiving/transmitting operation is detected according to a preset frequency. Specifically, the first wireless module and the second wireless module confirm each other's status, particularly confirm each other's communication status, by transmitting and receiving each other's status information according to a preset period. When the transceiver performs a receiving/transmitting operation, the external interrupt of the micro-control device is triggered, so as to generate an external interrupt signal, and after the micro-control device detects the external interrupt signal, it can be determined that the connected transceiver and the transceiver of other wireless modules can perform a normal receiving/transmitting operation, that is, the communication function is normal.
In addition, the period corresponding to the preset frequency is smaller than or equal to the preset period, that is, the frequency of detecting the external interrupt signal is greater than the frequency of transmitting/receiving the state information. With such an arrangement, the micro control device can detect the external interrupt signal.
The state information may be specifically a heartbeat packet, and then the preset period may be a transmission period of the heartbeat packet, that is, a heartbeat period. The receiving and transmitting equipment of the first wireless module sends a heartbeat packet according to a preset period, and correspondingly, the receiving and transmitting equipment of the second wireless module receives the heartbeat packet and feeds back the heartbeat packet to the first wireless module. Or the receiving and transmitting equipment of the second wireless module transmits the heartbeat packet according to the preset period, and correspondingly, the receiving and transmitting equipment of the first wireless module receives the heartbeat packet and feeds back the heartbeat packet to the second wireless module.
Illustratively, in fig. 2, the micro control device, i.e., MCU, and the transceiver device, i.e., wireless chip. The connection between the MCU and the wireless chip may include: RESET connection line (i.e. connection line with RESET mark), external interrupt connection line (i.e. connection line with IO mark), and communication bus for other communication, wherein two ends of each connection line are corresponding to pins of wireless chip and MCU, which can generate interrupt signal, RESET signal, etc. For example, when the wireless chip completes the receiving/transmitting operation once, the external interrupt of the MCU is triggered through the external interrupt connecting wire, so that an external interrupt signal is generated at the pin of the MCU of the connecting wire, and the MCU invokes an external interrupt service interface after detecting the external interrupt signal; for example, the MCU may also trigger a reset signal by resetting the connection line in a program control manner, so that a reset signal is generated at a pin of the wireless chip of the connection line, and after the wireless chip detects the reset signal, the wireless chip invokes a reset interface to execute a reset operation.
S120, adding the count value according to the detected timer interrupt signal:
s130, corresponding abnormal receiving and transmitting processing operation is executed according to the relation between the count value and the count threshold.
In one possible implementation manner, initializing the timer and the count value according to the preset period in S110 specifically includes:
initializing a timing period of a timer to be a preset period, and starting the timer; the initialization count value is zero.
After the timer is started, a timer interrupt is triggered once every time a timing period is reached, specifically, a timer interrupt signal is generated, and after the micro control device detects the timer interrupt signal, a timer interrupt service interface is called, so that the adding operation of the count value is realized through the interface.
In addition, it is a common and suitable way to set the timing period of the timer to a preset period and to set the adding operation to the count value, specifically, the adding operation to 1. When the operation of adding 1 is set, the essence is that in the transmission process of the simulated heartbeat packet, after the count value reaches the specified threshold value, the side surface reflects that the heartbeat packet is not received in the specified several heartbeat cycles, and in this case, the abnormal receiving and transmitting can be judged. The technical means provides a certain buffer time for the transceiver of the wireless module. The abnormal reasons of the transceiver are numerous, and the abnormal reasons include the abnormal conditions caused by external interference, and the normal receiving/transmitting operation can be restored after the external interference is relieved or eliminated. If normal reception/transmission operation can be resumed, it is not necessary to implement abnormal resumption by a reset operation.
It should be noted that triggering a timer interrupt and triggering an external interrupt are two tasks that are executed asynchronously. Accordingly, the micro control device invokes the external interrupt service interface and the timer interrupt service interface are two asynchronous operations.
The timer interrupt service interface (also referred to as an interface function, in a software program for the MCU, there is a specially provided interface function for processing a service corresponding to the timer interrupt, and program expansion can be performed for the interface function to implement service expansion, for example, 1-adding operation for a count value, and in the software program, there is a specially provided interface function for processing a service corresponding to an external interrupt, and similarly, program expansion can be performed for the interface function to implement service expansion, for example, zero clearing operation for a count value), and the interface is expanded for implementing operation for self-adding 1 for a count value.
After the timing period of the timer is set to be a preset period, the counting threshold may be set according to a threshold setting instruction input by the user.
The application provides a method for processing abnormal receiving and transmitting, which is applied to micro-control equipment, wherein the micro-control equipment is configured in a first wireless module and is connected with receiving and transmitting equipment in the first wireless module; when a preset period arrives and an external interrupt signal is not detected, initializing a timer and a count value according to the preset period; adding the count value according to the detected timer interrupt signal; and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold.
Compared with the anomaly recovery strategy provided in the prior art, the method can effectively utilize the external interrupt signal, starts the step of judging the receiving and transmitting anomalies when the receiving and transmitting anomalies are found, and does not directly perform the reset operation, and the corresponding operation of processing the receiving and transmitting anomalies is performed only after the count value and the count threshold meet a certain relation. In general, the method for processing the abnormal transceiving operation provided by the embodiment of the application effectively improves the processing efficiency of the abnormal transceiving operation.
As in the above embodiments, since the reason for the abnormality of the transceiver is numerous, in which the abnormality caused by the external interference is included, the normal receiving/transmitting operation can be resumed after the external interference is released or vanished. Also for this case, a reset operation is not required. Accordingly, there is provided in an embodiment of the present application a possible implementation manner, including:
when the external interrupt signal is detected, the count value is cleared, and the transceiving equipment is determined to be normal in transceiving.
Specifically, after detecting the external interrupt signal, the micro control device invokes an external interrupt service interface, and performs a zero clearing operation on the count value through the interface. Moreover, the micro control device detects the external interrupt signal, which indicates that the transceiver device performs the transmitting/receiving operation, that is, the normal communication function is restored. Note that, in the embodiment of the present application, the normal transceiving indicates that the receiving/transmitting function is normal, and the abnormal transceiving identifies that the receiving/transmitting function is abnormal.
Wherein after determining that the communication function of the transceiver is good, the transceiver does not need to be reset. Therefore, after the external interrupt signal is detected, the count value is cleared, so that when the count value reaches the count threshold value, the micro control device performs an exception handling operation.
In addition, after the count value is cleared, the timer may be suspended or closed to terminate the operation of this transmission/reception abnormality determination.
One possible implementation manner is provided in the embodiment of the present application, where S130 includes S130a1 (not shown in the figure) and S130a2 (not shown in the figure), specifically,
s130a1, when the count value is equal to the count threshold value, sending a notification message to the transceiver device, wherein the notification message is used for notifying the transceiver device to perform a sending operation;
and S130a2, when the external interrupt signal is detected, determining that the transceiving equipment is normal in transceiving and the transceiving equipment of the second wireless module connected with the first wireless module is abnormal in transceiving.
Specifically, the transmitting and receiving device performs a transmission operation after receiving the notification message. The transmitting operation should be that the transceiver of the first wireless module transmits the status information to the second wireless module.
If the execution is successful, the external interrupt is triggered, an external interrupt signal is generated, and when the micro control device detects the external interrupt signal, a corresponding external interrupt service interface is called, and the count value is cleared in the interface. In addition, receiving the external interrupt signal also indicates that the transceiver connected with the micro-control device is normal in transceiver, so that the transceiver of the second wireless module connected with the first wireless module cannot perform transceiver operation.
In view of this situation, the micro control device may continue to execute tasks according to the original execution logic, zero out the count value, close the timer, and suspend detection of the timer interrupt signal.
If the execution fails, the external interrupt cannot be triggered. This situation also illustrates that the key cause of the transception abnormality is an abnormality of the transception device connected to the micro control device.
In one possible implementation, S130 further includes S130b1 (not shown) and S130b2 (not shown), and in particular,
s130b1, when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
and S130b2, sending a reset message to the transceiver to inform the transceiver to execute a reset operation.
Specifically, if the transceiver fails to perform the transmission operation, the external interrupt cannot be triggered, and then the zero clearing operation cannot be performed on the count value. In addition, when a new timing period arrives, a timer interrupt signal is generated, and the micro control device needs to call a timer interrupt service interface to add the count value, and after the adding operation is performed, the count value is greater than the count threshold value. Therefore, when the count value is greater than the count threshold value, it can be inferred that the external interrupt signal is not detected, and the transceiver device fails to perform the transmission operation.
Accordingly, it is necessary to transmit a reset message to the transceiver device to inform the transceiver device to perform a reset operation.
After receiving the reset message, the transceiver executes a reset operation according to a preset reset mode. After the reset operation is performed, the normal reception/transmission operation can be resumed.
The embodiment of the application also provides a wireless module, which comprises a micro-control device and a transceiver device, wherein when the transceiver device executes receiving/transmitting operation, an external interrupt signal is generated, wherein,
the micro-control device is used for initializing a timer and a count value of the micro-control device according to a preset period when a preset period arrives and an external interrupt signal is not detected;
the micro-control device is also used for adding the count value according to the detected timer interrupt signal;
the micro-control device is also used for executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold value.
The wireless module in the embodiment of the application comprises a host wireless module and a slave wireless module. The host wireless module mainly sends instructions to the slave wireless module, and the slave wireless module receives the instructions and executes corresponding operations. When the transceiver of the wireless module executes receiving and transmitting operations, external interruption of the micro-control equipment is triggered, so that the micro-control equipment generates external interruption signals.
In one possible implementation manner, the micro control device is specifically configured to:
when the count value is equal to the count threshold, the micro-control device sends a notification message to the transceiver device so as to notify the transceiver device to perform sending operation;
when the micro-control device detects an external interrupt signal, the receiving and transmitting device is determined to receive and transmit normally;
or,
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
the micro control device sends a reset message to the transceiver device to inform the transceiver device to execute a reset operation.
Referring to fig. 4, the embodiment of the present application further provides a possible flowchart of a transceiver anomaly recovery procedure from the perspective of the micro control device of the first wireless module. The MCU1 and the wireless chip 1 are respectively micro control equipment and receiving and transmitting equipment of the first wireless module.
S401, the MCU1 initializes a timer and a count value.
Specifically, when the MCU1 does not detect the external interrupt signal, a timer is started, and the timing time of the timer is set to be one heartbeat period.
In addition, a count value needs to be initialized, and the initial value of the count value is zero.
It should be noted that, since the timer interrupt and the external interrupt are two tasks that are executed asynchronously, they do not affect each other. Thus, after starting the timer, it is also possible for the MCU1 to detect an external interrupt signal so that an external interrupt service interface may be invoked. Thus, the present flow divides the step of S402 into S402a and S402b, which are described in two separate branches. In particular, the method comprises the steps of,
s402a branch:
s402a1, the MCU1 determines whether a timer interrupt signal is detected.
Specifically, if detected, return to wait for the next timing cycle to wait for execution of S402a1; if not, S402a2 is performed.
S402a2, the MCU1 calls a timer interrupt service interface;
in the interface, an operation of adding 1 to the count value is performed;
s402a3, after performing an operation of adding 1 to the count value, the MCU1 determines whether the count value is equal to 3. In particular, the method comprises the steps of,
if equal, S403a is performed.
If not, S403b1 is executed.
S402b branches:
s402b1, the MCU1 determines whether an external interrupt signal is detected.
If so, S402b2 is performed.
S402b2, the timer is closed, and the count value is cleared.
After detecting the external interrupt signal, it is indicated that the wireless chip 1 is transmitting and receiving normally, and the detection of abnormality can be stopped, and the present flow can be ended.
In S402a3, the count value is determined, and 2 different results are obtained according to the determination. Thus, the flow of S403 is split into 2 independent branches: s403a and S403b. In particular, the method comprises the steps of,
s403a branch:
s403a, the MCU1 notifies the wireless chip 1 to perform a transmission operation.
Wherein the transmission operation is for detecting whether or not an abnormality of the wireless chip 1 causes a transmission/reception abnormality. If the wireless chip 1 performs the transmission operation, an external interrupt signal is triggered, that is, the execution of S402b1 to S402b2 is started. If the transmission operation is not performed, the next timing cycle is reached, and the process returns to S402a2.
S403b branch:
s403b1, the MCU1 determines whether the count value is greater than 3.
If it is smaller than, return is made and execution of S402a2 is awaited. If so, S403b2 is performed.
S403b2, the MCU1 turns off the timer interrupt and clears the count value.
S403b3, the MCU1 notifies the wireless chip 1 of reset.
Specifically, the MCU1 transmits a reset signal to the wireless chip 1 to inform the wireless chip 1 to perform reset.
After the wireless chip 1 executes the software reset, the system is restarted, and the execution of the flow of the S403b branch is completed, which also represents that the execution of the flow is completed.
The embodiment of the present application further provides an apparatus for processing abnormal transceiving, as shown in fig. 5, the apparatus 50 may include: a timed interrupt module 501, an exception handling module 502, an external interrupt module 503, a detection module 504, wherein,
the timer interrupt module 501 includes a timer for initializing a timer and a count value according to a preset period when a preset period arrives and an external interrupt signal is not detected;
the timer interrupt module 501 is further configured to add a count value according to the detected timer interrupt signal;
the exception handling module 502 is configured to perform a corresponding transmit-receive exception handling operation according to a relationship between the count value and the count threshold.
In a possible implementation manner, the detection module 504 is configured to detect, after the micro control device is started, an external interrupt signal triggered by the transceiver device after performing the receiving/sending operation according to a preset frequency, where a period corresponding to the preset frequency is less than or equal to a preset period.
In one possible implementation, the detection module 504 is further configured to detect a timer interrupt signal.
In one possible implementation, the timer interrupt module 501 is specifically configured to, in initializing the timer and the count value according to a preset period:
initializing a timing period of a timer to be a preset period, and starting the timer;
the initialization count value is zero.
In one possible implementation, the external interrupt module 503 is configured to clear the count value and determine that the transceiving device is transceiving normally when the external interrupt signal is detected after the timer is started.
In one possible implementation manner, the exception handling module 502 is specifically configured to, in performing a corresponding transceiving exception handling operation according to a relationship between a count value and a count threshold:
when the count value is equal to the count threshold, a notification message is sent to the transceiver, and the notification message is used for notifying the transceiver to perform sending operation;
when the external interrupt signal is detected, the count value is cleared, and the transceiving equipment is determined to be normal in transceiving and abnormal in transceiving of the transceiving equipment of the second wireless module connected with the first wireless module.
In one possible implementation manner, the exception handling module 502 is further specifically configured to, in performing a corresponding transception exception handling operation according to a relationship between the count value and the count threshold:
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
and sending a reset message to the transceiver to inform the transceiver to execute the reset operation.
The apparatus for processing abnormal transceiving according to the present embodiment may execute a method for processing abnormal transceiving according to the foregoing embodiment of the present application, and the implementation principle is similar, and will not be described herein.
The embodiment of the application also provides electronic equipment, which comprises:
a processor; and
the memory is configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform operations corresponding to a method of handling transception exceptions as shown in embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, which is used for storing computer instructions, when the computer instructions run on a computer, the computer can execute the operation corresponding to the method for processing the abnormal transceiving shown in the embodiment of the application.
It should be understood that, as used herein, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless expressly stated otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (7)

1. The method for processing the abnormal receiving and transmitting is characterized by being applied to micro-control equipment, wherein the micro-control equipment is configured in a first wireless module, and the micro-control equipment is an MCU; the wireless module is connected with receiving and transmitting equipment in the first wireless module, and the receiving and transmitting equipment is a wireless chip; the method comprises the following steps:
when a preset period arrives and an external interrupt signal is not detected, initializing a timer and a count value according to the preset period;
adding the count value according to the detected timer interrupt signal;
executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold value;
and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold, wherein the abnormal receiving and transmitting processing operation comprises the following steps:
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
sending a reset message to the transceiver to inform the transceiver to execute a reset operation;
the initializing the timer and the count value according to the preset period includes:
initializing the timing period of the timer to be the preset period, and starting the timer;
initializing the count value to zero;
after starting the timer, the method further comprises:
when an external interrupt signal is detected, the count value is subjected to zero clearing operation, and the transceiving equipment is determined to be normal in transceiving.
2. The method according to claim 1, wherein the method further comprises:
and after the micro control device is started, detecting the external interrupt signal triggered by the receiving and transmitting device after the receiving/transmitting operation is executed according to a preset frequency, wherein the period corresponding to the preset frequency is smaller than or equal to the preset period.
3. The method according to any one of claims 1-2, wherein said performing a corresponding transception-exception handling operation according to the relationship between the count value and the count threshold comprises:
when the count value is equal to the count threshold, sending a notification message to the transceiver, wherein the notification message is used for notifying the transceiver to perform a sending operation;
when an external interrupt signal is detected, the count value is subjected to zero clearing operation, and the receiving and transmitting normal of the receiving and transmitting equipment and the abnormal receiving and transmitting of the receiving and transmitting equipment of the second wireless module connected with the first wireless module are determined.
4. The device for processing the abnormal receiving and transmitting is characterized by being applied to micro control equipment, wherein the micro control equipment is configured in a first wireless module, and the micro control equipment is an MCU; the wireless module is connected with receiving and transmitting equipment in the first wireless module, and the receiving and transmitting equipment is a wireless chip; the device comprises:
the timing interrupt module comprises a timer, and is used for initializing the timer and the count value according to a preset period when the preset period arrives and an external interrupt signal is not detected;
the timing interrupt module is further used for adding the count value according to the detected timer interrupt signal;
the exception handling module is used for executing corresponding receiving and transmitting exception handling operation according to the relation between the count value and the count threshold value;
the exception handling module is further specifically configured to, in executing a corresponding transmit-receive exception handling operation according to a relationship between the count value and the count threshold value:
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
sending a reset message to the transceiver to inform the transceiver to execute a reset operation;
the timer interrupt module is specifically configured to, in initializing a timer and a count value according to a preset period:
initializing a timing period of a timer to be a preset period, and starting the timer;
initializing a count value to be zero;
and the external interrupt module is used for carrying out zero clearing operation on the count value and determining that the transceiving equipment is normal in transceiving when the external interrupt signal is detected after the timer is started.
5. The wireless module is characterized by comprising micro control equipment and transceiver equipment, wherein the micro control equipment is an MCU; the receiving and transmitting equipment is a wireless chip; when the transceiving equipment performs a receiving/transmitting operation, an external interrupt signal is generated, wherein,
the micro control device is used for initializing a timer and a count value of the micro control device according to a preset period when the preset period arrives and an external interrupt signal is not detected;
the micro-control equipment is also used for adding the count value according to the detected timer interrupt signal;
the micro-control equipment is also used for executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold value;
and executing corresponding abnormal receiving and transmitting processing operation according to the relation between the count value and the count threshold, wherein the abnormal receiving and transmitting processing operation comprises the following steps:
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
sending a reset message to the transceiver to inform the transceiver to execute a reset operation;
the initializing the timer and the count value according to the preset period includes:
initializing the timing period of the timer to be the preset period, and starting the timer;
initializing the count value to zero;
after starting the timer, the method further comprises:
when an external interrupt signal is detected, the count value is subjected to zero clearing operation, and the transceiving equipment is determined to be normal in transceiving.
6. An electronic device, the electronic device comprising:
a processor; and
a memory configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform operations corresponding to the method of handling a transception-exception of any of the preceding claims 1 to 3.
7. A computer readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform operations corresponding to the method of handling transception anomalies according to any one of claims 1 to 3.
CN202110997605.2A 2021-08-27 2021-08-27 Method, device, equipment and storage medium for processing abnormal receiving and dispatching Active CN113692008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110997605.2A CN113692008B (en) 2021-08-27 2021-08-27 Method, device, equipment and storage medium for processing abnormal receiving and dispatching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110997605.2A CN113692008B (en) 2021-08-27 2021-08-27 Method, device, equipment and storage medium for processing abnormal receiving and dispatching

Publications (2)

Publication Number Publication Date
CN113692008A CN113692008A (en) 2021-11-23
CN113692008B true CN113692008B (en) 2024-04-05

Family

ID=78583526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110997605.2A Active CN113692008B (en) 2021-08-27 2021-08-27 Method, device, equipment and storage medium for processing abnormal receiving and dispatching

Country Status (1)

Country Link
CN (1) CN113692008B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114429744B (en) * 2022-02-28 2024-03-22 北京京东方显示技术有限公司 Control circuit, control method thereof, display device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951336A (en) * 2017-03-24 2017-07-14 北京经纬恒润科技有限公司 A kind of MCU repositioning method, apparatus and system
CN107894949A (en) * 2017-10-11 2018-04-10 五八有限公司 The method, apparatus and equipment of abnormality processing
CN111314018A (en) * 2019-11-01 2020-06-19 珠海格力电器股份有限公司 Baud rate self-adaptive adjustment processing system and method and information data processing terminal
CN111556517A (en) * 2020-04-28 2020-08-18 锐迪科微电子科技(上海)有限公司 Method and device for processing abnormal link
CN112235171A (en) * 2020-09-15 2021-01-15 广州河东科技有限公司 Bus collision detection method, device, detection equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102572A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Method and device for detecting and processing system faults

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951336A (en) * 2017-03-24 2017-07-14 北京经纬恒润科技有限公司 A kind of MCU repositioning method, apparatus and system
CN107894949A (en) * 2017-10-11 2018-04-10 五八有限公司 The method, apparatus and equipment of abnormality processing
CN111314018A (en) * 2019-11-01 2020-06-19 珠海格力电器股份有限公司 Baud rate self-adaptive adjustment processing system and method and information data processing terminal
CN111556517A (en) * 2020-04-28 2020-08-18 锐迪科微电子科技(上海)有限公司 Method and device for processing abnormal link
CN112235171A (en) * 2020-09-15 2021-01-15 广州河东科技有限公司 Bus collision detection method, device, detection equipment and storage medium

Also Published As

Publication number Publication date
CN113692008A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN107273141B (en) Embedded real-time operating system
CN105550057B (en) Embedded software system fault detection recovery method and system
CN103645975B (en) A kind of method of abnormal restoring and serial bus transmission device
WO2007118741A1 (en) Computer hardware fault diagnosis
WO2006014354A2 (en) Method and system for concurrent excution of mutiple kernels
CN113692008B (en) Method, device, equipment and storage medium for processing abnormal receiving and dispatching
CN111104272B (en) CAN bus controller testing method based on RX and TX
CN109597719A (en) A kind of monitoring method of multiple nucleus system, system, device and readable storage medium storing program for executing
CN110941218A (en) CAN bus controller test method
CN113179227A (en) AT instruction control method based on queue
CA2307545C (en) Supervisory system and method
CN101309184B (en) Method and apparatus detecting failure of micro-engine
KR20000060827A (en) method for implementation of transferring event in real-time operating system kernel
WO2001086426A2 (en) System and method for performing a synchronization operation for multiple devices in a computer system
CN112418412B (en) Trigger device and brain-like computing system
EP3321814A1 (en) Method and apparatus for handling outstanding interconnect transactions
CN112817818B (en) Method for monitoring time of deploying running program on cloud by edge security node
CN115378685A (en) Data processing method, system, electronic device and computer readable storage medium
WO2011120263A1 (en) Alarm platform and alarm implementation method thereof
CN108897248A (en) A kind of self―tuning control and mobile robot
CN111858177B (en) Inter-process communication abnormality repairing method and device, electronic equipment and storage medium
CN114153573A (en) Multitasking method based on single thread pool and related device
US5745704A (en) Data communication control device
JP2809209B2 (en) Interprocess communication method
US7685470B2 (en) Method and device for debugging a program executed by a multitask processor

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
GR01 Patent grant
GR01 Patent grant