CN113692008A - Method, device, equipment and storage medium for processing transceiving exception - Google Patents

Method, device, equipment and storage medium for processing transceiving exception Download PDF

Info

Publication number
CN113692008A
CN113692008A CN202110997605.2A CN202110997605A CN113692008A CN 113692008 A CN113692008 A CN 113692008A CN 202110997605 A CN202110997605 A CN 202110997605A CN 113692008 A CN113692008 A CN 113692008A
Authority
CN
China
Prior art keywords
count value
timer
transceiving
transceiver
interrupt signal
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.)
Granted
Application number
CN202110997605.2A
Other languages
Chinese (zh)
Other versions
CN113692008B (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

Images

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

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for processing transceiving abnormity, and relates to the field of embedding. The method is applied to a micro-control device, and the micro-control device is configured in a first wireless module and is connected with a transceiver 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 transceiving exception handling operation according to the relationship between the counting value and the counting threshold value. The method determines whether to start a timer for exception judgment by using an external interrupt signal triggered when the transceiving operation is executed, and performs corresponding exception handling according to the relation between a count value and a count threshold value by detecting that the timer interrupt signal influences the change of the count value.

Description

Method, device, equipment and storage medium for processing transceiving exception
Technical Field
The present application relates to the field of embedded technologies, and in particular, to a method, an apparatus, a device, and a storage medium for handling a transceiving exception.
Background
At present, the vigorous 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 interconnected and intercommunicated wireless modules, so that the simple, stable and reliable networking capability of the wireless modules is one of the most important elements for 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.
One wireless module basically comprises two parts, namely an MCU (also called a singlechip) and a wireless chip, wherein the wireless chip can realize communication connection between the wireless modules. When a wireless module is abnormal in communication, the self-recovery can be realized through the watchdog for the abnormality from the MCU. For the exception from the wireless chip, although the related exception recovery strategy is provided in the prior art, the related exception recovery strategy is not efficient, or the initialization fails. In general, the existing strategies for recovering from an abnormality of a wireless chip cannot meet the requirement.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks, and in particular, to solve the technical drawback of the prior art that the strategy for recovering from an exception of a wireless chip is not efficient or fails in initialization.
According to an aspect of the present application, a method for handling a transceiving exception is provided, the method being applied to a micro-control device, the micro-control device being configured in a first wireless module and being connected to a transceiving device in the first wireless module, the method comprising:
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 transceiving exception handling operation according to the relationship between the counting value and the counting threshold value.
According to another aspect of the present application, there is provided an apparatus for handling abnormal transceiving, the apparatus being applied to a micro-control device, the micro-control device being configured in a first wireless module and being connected to a 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 is up and an external interrupt signal is not detected;
the timer 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 transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
According to another aspect of the present application, there is provided a wireless module including a micro control device and a transceiving device generating an external interrupt signal when the transceiving device performs a receiving/transmitting operation, wherein,
the micro-control equipment is used for initializing a timer and a count value of the micro-control equipment according to a preset period when the preset period is up 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;
and the micro-control equipment is also used for executing corresponding transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
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, which when executed by the processor, cause the processor to perform operations corresponding to a method for handling a transceiving exception as shown in one of the foregoing aspects of the present application.
According to yet another aspect of the present application, a computer-readable storage medium is provided, where the computer-readable storage medium is configured to store computer instructions, and when the computer instructions are executed on a computer, the computer may perform operations corresponding to a method for handling a transceiver anomaly shown in the foregoing aspect of the present application.
The beneficial effect that technical scheme that this application provided brought is:
the application provides a method for processing receiving and sending abnormity, which is applied to a micro-control device, wherein the micro-control device is configured in a first wireless module and is connected with receiving and sending 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 transceiving exception handling operation according to the relationship between the counting value and the counting threshold value.
The method utilizes an external interrupt signal triggered when executing transceiving operation to determine whether to start a timer for carrying out exception judgment, and influences the change of a counting value through the detected timer interrupt signal so as to carry out corresponding exception processing according to the relation between the counting value and a counting threshold value. In summary, the method for processing the transceiving exception provided by the embodiment of the application effectively improves the efficiency of processing the transceiving exception.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings 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 flowchart illustrating a method for handling a transceiving exception according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a recovery process of a transceiving exception according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for handling a transceiving exception according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
The terms referred to in this application will first be introduced and explained:
micro-control equipment: the Micro control devices referred to in the present application are all referred to as MCUs (Micro Controller units), which have a very important branch — a single chip microcomputer. The functional modules integrated on the MCU may include: first, a timer includes a fixed time interval timer and a programmable timer, wherein the timing time of the fixed time interval timer is determined according to the 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 by 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 watchdogs), generally provide a self-healing function for MCUs that are dead due to unexpected failures. The MCU has many other functions, which are not described herein in detail due to space limitations.
The receiving and sending equipment: the transceiver devices referred to in the present application all refer to wireless chips connected to the MCU, and the wireless chips have a communication function, which in the present application specifically refers to wireless communication performed by the existing wireless communication technology.
Referring to fig. 1, the prior art discloses a structure diagram of a wireless networking, where the wireless networking 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, and directly controls other functional modules of the wireless module, including controlling the wireless chips, and the communication between the wireless modules mainly depends on the communication function of the wireless chips. In addition, the wireless networking comprises a host wireless module and a slave wireless module, and the operation 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 modules respectively send information to the host wireless module and respectively receive information fed back by the host wireless module.
From the perspective of communication, whether the functional state of the wireless chip of each wireless module is good is one of the key factors for the normal operation of the wireless networking. When communication abnormality occurs in the wireless networking, particularly communication abnormality caused by abnormality of the wireless module, the reason can be traced back to the MCU and the wireless chip. In view of the fact that the MCU can realize the abnormal self-recovery through the watchdog function, it is very important to detect the abnormality and self-recovery of the wireless chip. In the prior art, two schemes are provided to realize the abnormality detection and recovery of the wireless chip.
First, the software resets. The MCU inquires the state of the register of the wireless chip according to the preset frequency, and exception handling is carried out once the state of a certain register is found to exceed a normal value. The method mainly aims at the problem that when the wireless chip cannot normally execute the transceiving operation, the values of some registers are not normally changed directly, and the abnormality can be detected by detecting the state of the registers. And after the wireless chip is determined to be abnormal, the MCU sends a reset instruction to the wireless chip to carry out abnormal recovery. However, this method requires the MCU to separately create a task line and perform the detection of the states of the registers, which is relatively resource-consuming and inefficient.
Second, a hardware reset. The wireless chip resets by manually pulling down or pulling up the reset pin of the wireless chip. However, if the reset pin is operated to reset the wireless chip, the original execution logic of the wireless chip is disturbed, and the initialization operation is performed on the wireless chip in such a case, which is very likely to cause an initialization abnormality.
That is, the software reset and hardware reset methods provided in the prior art either occupy the resources of the wireless module, which is inefficient, or cause an abnormal initialization condition, which is a failed initialization.
The application provides a method, a device and a storage medium for processing transceiving abnormity, and aims to solve the technical problems in the prior art.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. To make the objects, technical solutions and advantages of the present application clearer, embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 2, a possible structure diagram of a wireless module is provided in the present embodiment, and the method for handling the transceiving abnormality provided in the present embodiment can be implemented by applying the wireless module to the wireless networking in fig. 1.
Referring to fig. 3, a possible flowchart of a method for handling a transceiving exception is provided in an embodiment of the present application. The method is applied to a micro-control device, and the micro-control device is configured in a first wireless module and connected with a transceiver in the first wireless module. The method comprises the following steps:
s110, when a preset period is reached and no external interrupt signal is detected, initializing a timer and a count value according to the preset period;
the first wireless module and the second wireless module form a wireless network. 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 master wireless module is not limited to a wireless system, but there is at least one. The transceiver of the master wireless module and the transceiver of the slave wireless module communicate with each other by using a wireless communication technology, which may include: zigbee, bluetooth, etc.
In one possible implementation manner, after the micro control device is started, an external interrupt signal triggered by the transceiver device after the transceiver device performs the receiving/transmitting operation is detected according to a preset frequency. Specifically, according to a preset period, the first wireless module and the second wireless module confirm the state of each other, especially confirm the communication state of each other by sending and receiving the state information of each other. When the transceiver device executes a receiving/transmitting operation once, 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, the transceiver device connected with the micro-control device and the transceiver devices of other wireless modules can be determined to execute normal receiving/transmitting operation, namely, the communication function is normal.
In addition, the period corresponding to the preset frequency is less 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 status information. With such an arrangement, the micro-control device can detect the external interrupt signal.
For example, the status information may specifically be a heartbeat packet, and then the preset period may be a transmission period of the heartbeat packet, that is, a heartbeat period. The transceiver of the first wireless module sends heartbeat packets according to a preset period, and correspondingly, the transceiver of the second wireless module receives the heartbeat packets and feeds back the heartbeat packets to the first wireless module. Or the transceiver of the second wireless module sends the heartbeat packet according to a preset period, and correspondingly, the transceiver of the first wireless module receives the heartbeat packet and feeds back the heartbeat packet to the second wireless module.
Exemplarily, 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: the wireless chip comprises a RESET connecting line (namely, a connecting line with a RESET mark), an external interrupt connecting line (namely, a connecting line with an IO mark), and a communication bus for carrying out other communication, wherein two ends of each connecting line correspond to pins of the wireless chip and the MCU, and the pins can generate interrupt signals, RESET signals and the like. For example, each time the wireless chip executes a receiving/transmitting operation, the wireless chip triggers external interrupt of the MCU through the external interrupt connection line, so that an external interrupt signal is generated at a pin of the MCU of the connection line, and the MCU calls an external interrupt service interface after detecting the external interrupt signal; for example, the MCU may also trigger a reset signal through a reset 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 the wireless chip will call a reset interface to execute a reset operation after detecting the reset signal.
S120, according to the detected timer interrupt signal, adding the count value:
and S130, executing corresponding transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
In a possible implementation manner, initializing the timer and the count value according to the preset period in S110 specifically includes:
initializing the 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 every time a timing period is reached, specifically, a timer interrupt signal is generated, after the micro control device detects the timer interrupt signal, a timer interrupt service interface is called, and an adding operation aiming at a count value is realized through the interface.
In addition, it is a common and appropriate way to set the timing period of the timer to be a preset period, and to set the operation of adding the count value to be specifically the operation of adding 1. When the operation of adding 1 is set, the essence is that in the process of simulating the sending of the heartbeat packet, after the counting value reaches the designated threshold value, the side surface reflects that in the designated several heartbeat cycles, the heartbeat packet is not received, and under the condition, the abnormal receiving and sending can be judged. The technical means provides certain buffering time for the transceiver of the wireless module. Due to a plurality of abnormal reasons of the transceiver, wherein the abnormal reasons include the abnormality caused by external interference, the normal receiving/transmitting operation can be recovered after the external interference is relieved or disappears. If the normal receiving/transmitting operation can be recovered, the abnormal recovery can be realized without the resetting operation.
It should be noted that triggering the timer interrupt and triggering the external interrupt are two tasks that are executed asynchronously. Accordingly, the micro-controller device calls the external interrupt service interface and the timer interrupt service interface to be two asynchronous operations.
Illustratively, after the timer of the MCU is started, every timing cycle triggers a timer interrupt and generates a timer interrupt signal, and after the MCU detects the timer interrupt signal, it calls a timer interrupt service interface (also called an interface function, in the software program of the MCU, there is a specially provided interface function for processing the service corresponding to the timer interrupt, and a program extension can be performed on the interface function to implement the service extension, for example, an operation of adding 1 to the count value, and in the software program, there is also a specially provided interface function for processing the service corresponding to the external interrupt, and likewise, a program extension can be performed on the interface function to implement the service extension, for example, a clear operation is performed on the count value), and the operation of adding 1 to the count value is extended in the interface, therefore, after the interface is called, the addition operation for the count value can be realized.
After the timing period in which the timer is set is a preset period, a counting threshold value can be set according to a threshold value setting instruction input by a user.
The application provides a method for processing receiving and sending abnormity, which is applied to a micro-control device, wherein the micro-control device is configured in a first wireless module and is connected with receiving and sending 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 transceiving exception handling operation according to the relationship between the counting value and the counting threshold value.
The method utilizes an external interrupt signal triggered when executing transceiving operation to determine whether to start a timer for carrying out exception judgment, and influences the change of a counting value through the detected timer interrupt signal so as to carry out corresponding exception processing according to the relation between the counting value and a counting threshold value. In summary, the method for processing the transceiving exception provided by the embodiment of the application effectively improves the efficiency of processing the transceiving exception.
As described in the foregoing embodiments, due to a plurality of abnormal causes of the transceiver device, wherein the abnormal causes include an abnormality caused by external interference, and when the external interference is removed or disappears, the normal receiving/transmitting operation can be resumed. And for this case, no reset operation is required. Therefore, a possible implementation manner is provided in the embodiment of the present application, and includes:
when the external interrupt signal is detected, the count value is cleared, and the transceiver is determined to be normal in transceiving.
Specifically, the micro-control device calls an external interrupt service interface after detecting the external interrupt signal, and performs a zero clearing operation for the count value through the interface. Furthermore, the micro-control device detects the external interrupt signal, which indicates that the transceiver device performs the transmitting/receiving operation, i.e. the normal communication function is recovered. It should be noted that the normal transceiving in the embodiment of the present application indicates that the receiving/transmitting function is normal, and the abnormal transceiving indicates that the receiving/transmitting function is abnormal.
After the communication function of the transceiver is determined to be good, the transceiver does not need to be reset. Therefore, after the external interrupt signal is detected, the count value is cleared, so that the micro-control device performs an abnormal processing operation when the count value reaches the count threshold value.
In addition, after the zero clearing operation is performed on the count value, the timer may be suspended or turned off to terminate the operation of the abnormal transmission/reception determination.
In the embodiment of the present application, a possible implementation manner is provided, and the 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, transmitting a notification message to the transceiver device, the notification message for notifying the transceiver device of a transmission operation;
s130a2, when the external interrupt signal is detected, it is determined that the transceiver is normal, and the transceiver of the second wireless module connected to the first wireless module is abnormal.
Specifically, the transceiver device performs a transmission operation after receiving the notification message. The sending operation should be the sending and receiving device of the first wireless module sending status information to the second wireless module.
If the execution is successful, external interruption is triggered to generate an external interruption signal, and when the micro-control equipment detects the external interruption signal, a corresponding external interruption service interface is called, and the count value is cleared in the interface. In addition, the fact that the transceiver connected to the micro-control device receives and transmits the external interrupt signal also indicates that the transceiver connected to the first wireless module is abnormal in transceiving, which results in that the transceiver of the second wireless module connected to the first wireless module cannot perform transceiving operation.
In view of this situation, the micro-control device may continue to execute the task according to the original execution logic, clear the count value, close the timer, and suspend the detection of the timer interrupt signal.
If the execution fails, the external interrupt cannot be triggered. This case also illustrates that the key cause of the abnormality in the transceiving is the abnormality in the transceiving equipment connected to the micro control device.
In one possible implementation, S130 further includes S130b1 (not shown) and S130b2 (not shown), specifically,
s130b1, when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal for transceiving;
s130b2, a reset message is sent to the transceiving apparatus to inform the transceiving apparatus to perform a reset operation.
Specifically, if the transceiver fails to perform the sending operation, the external interrupt cannot be triggered, and the clear operation cannot be performed on the count value. In addition, when a new timing period arrives, a timer interrupt signal is generated, the micro-control device needs to call a timer interrupt service interface to add the count value, and after the adding operation is executed, the count value is greater than the count threshold value. Therefore, when the count value is larger than the count threshold, it can be inferred that no external interrupt signal is detected and the transceiving apparatus fails to perform the transmission operation.
Therefore, it is necessary to transmit a reset message to the transceiving apparatus to inform the transceiving apparatus to perform the reset operation.
And after receiving the reset message, the transceiver equipment executes the reset operation according to a preset reset mode. After the reset operation is performed, normal receiving/transmitting operation can be resumed.
Embodiments of the present application also provide a wireless module including a micro control device and a transceiver device, which generates an external interrupt signal when the transceiver device performs a receiving/transmitting operation, wherein,
the micro-control equipment is used for initializing a timer and a count value of the micro-control equipment according to a preset period when the preset period is up and no external interrupt signal is detected;
the micro-control equipment is also used for adding the count value according to the detected timer interrupt signal;
and the micro-control equipment is also used for executing corresponding transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
The wireless module in the embodiment of the application comprises a master wireless module and a slave wireless module. The master 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 the receiving and sending operations, the external interrupt of the micro-control equipment is triggered, so that the micro-control equipment generates an external interrupt signal.
In a possible implementation manner, the micro control device is specifically configured to, in executing a corresponding processing operation for the exception handling for transceiving according to a relationship between the count value and the count threshold:
when the counting value is equal to the counting threshold value, the micro-control equipment sends a notification message to the transceiver equipment so as to notify the transceiver equipment to carry out sending operation;
when the micro-control equipment detects an external interrupt signal, the transceiver equipment is determined to normally transmit and receive;
alternatively, the first and second electrodes may be,
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 the reset operation.
Referring to fig. 4, the embodiment of the present application further provides a possible flowchart of a recovery process of the transceiving abnormality from the perspective of the micro control device of the first wireless module. The MCU1 and the wireless chip 1 are respectively a micro-control device and a transceiver 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, it starts a timer and sets the timer to a heartbeat period.
In addition, a count value is 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 executed asynchronously, they do not affect each other. Thus, after starting the timer, the MCU1 may also detect an external interrupt signal so that an external interrupt service interface may be invoked. Therefore, the present flow divides the step of S402 into S402a and S402b, which are independently branched to describe. In particular, the amount of the solvent to be used,
branch S402 a:
s402a1, the MCU1 determines whether a timer interrupt signal is detected.
Specifically, if it is detected, the method returns to wait for the next timing cycle to wait for executing S402a 1; if not, S402a2 is executed.
S402a2, calling a timer interrupt service interface by the MCU 1;
in the interface, adding 1 to the counting value;
s402a3, after adding 1 to the count value, the MCU1 determines whether the count value is equal to 3. In particular, the amount of the solvent to be used,
if so, then S403a is performed.
If not, S403b1 is executed.
Branch S402 b:
s402b1, the MCU1 determines whether an external interrupt signal is detected.
If so, then S402b2 is executed.
S402b2, the timer is turned off, and the count value is cleared.
After the external interrupt signal is detected, it is described that the wireless chip 1 is normal in transceiving, and the detection of the abnormality may be stopped, and the process is ended.
In S402a3, the count value is determined, and there are 2 different results depending on the determination. Thus, the flow of S403 is divided into 2 independent branches here: s403a and S403 b. In particular, the amount of the solvent to be used,
branch S403 a:
s403a, the MCU1 notifies the wireless chip 1 to perform a transmission operation.
This transmission operation is used to detect whether or not the abnormality of the wireless chip 1 causes an abnormality in transmission and reception. If the wireless chip 1 performs the sending operation, an external interrupt signal is triggered, i.e., S402b1-S402b2 are started. If the sending operation is not performed, the process returns to S402a2 when the next timing cycle is reached.
Branch S403 b:
s403b1, the MCU1 determines whether the count value is greater than 3.
If less, return to and wait for execution of S402a 2. If so, then 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 notify the wireless chip 1 to perform reset.
After the wireless chip 1 executes the software reset, the system is re-operated, and the flow branched in S403b is executed completely, which also represents that the flow is executed completely.
An embodiment of the present application further provides an apparatus for handling a transceiving exception, 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, configured to initialize 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 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 execute a corresponding exception handling operation according to a relationship between the count value and the count threshold.
In a possible implementation manner, the detecting module 504 is configured to detect, according to a preset frequency, an external interrupt signal triggered after the transceiver performs a receiving/transmitting operation after the micro-control device is started, where a period corresponding to the preset frequency is less than or equal to the preset period.
In a possible implementation, the detecting module 504 is further configured to detect a timer interrupt signal.
In a possible implementation manner, the timer interrupt module 501 is specifically configured to, in initializing the timer and the count value according to a preset period:
initializing the timing period of a timer to be a preset period, and starting the timer;
the initialization count value is zero.
In a possible implementation manner, the external interrupt module 503 is configured to perform a zero clearing operation on the count value when the external interrupt signal is detected after the timer is started, and determine that the transceiver device is transmitting and receiving normally.
In a possible implementation manner, the exception handling module 502, in executing a corresponding transceiving exception handling operation according to a relationship between a count value and a count threshold, is specifically configured to:
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 of sending operation;
when the external interrupt signal is detected, the count value is cleared, and the transceiver is determined to be normal and the transceiver of the second wireless module connected with the first wireless module is abnormal.
In a possible implementation manner, the exception handling module 502, in executing a corresponding transceiving exception handling operation according to a relationship between the count value and the count threshold, is further specifically configured to:
when the count value is larger than the count threshold value, determining that the transceiving equipment is abnormal in transceiving;
a reset message is sent to the transceiving device to inform the transceiving device to perform a reset operation.
The apparatus for handling transceiving abnormality of this embodiment can execute a method for handling transceiving abnormality shown in the foregoing embodiments of this application, and the implementation principles thereof are similar, and are not described herein again.
An embodiment of the present application further provides an electronic device, including:
a processor; and
the memory is configured to store machine-readable instructions, which when executed by the processor, cause the processor to perform operations corresponding to one of the methods of handling a transceiving exception illustrated in the embodiments of the present application.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed on a computer, the computer may perform an operation corresponding to the method for processing a transceiver anomaly shown in the embodiment of the present application.
It is to be understood that, as used herein, the singular forms "a," "an," "the," and "the" may 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. As used herein, the term "and/or" includes all or any element and all combinations 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, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for handling abnormal transmission and reception, applied to a micro-control device, configured in a first wireless module and connected to a transceiver in the first wireless module, the method comprising:
when a preset period is reached 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 transceiving exception handling operation according to the relationship between the counting value and the counting threshold value.
2. The method of claim 1, further comprising:
after the micro-control device is started, detecting the external interrupt signal triggered by the transceiver device after executing receiving/transmitting operation according to a preset frequency, wherein a period corresponding to the preset frequency is less than or equal to the preset period.
3. The method of claim 1, wherein initializing the timer and the count value according to the preset period comprises:
initializing the timing period of the timer to be the preset period, and starting the timer;
initializing the count value to zero.
4. The method of claim 3, further comprising, after starting the timer:
and when an external interrupt signal is detected, carrying out zero clearing operation on the count value, and determining that the transceiver is normal in transceiving.
5. The method according to any one of claims 1 to 4, wherein said performing a corresponding transceiving exception handling operation according to the relationship between the count value and the count threshold value comprises:
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 of sending operation;
when an external interrupt signal is detected, the count value is cleared, and the transceiver is determined to be normal and the transceiver of the second wireless module connected with the first wireless module is abnormal.
6. The method according to any one of claims 1 to 4, wherein said performing a corresponding transceiving exception handling operation according to a relationship between said count value and said count threshold value comprises:
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 device to inform the transceiver device to perform a reset operation.
7. An apparatus for handling abnormal transmission/reception, applied to a micro-controller, wherein the micro-controller is configured in a first wireless module and connected to a transceiver 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 is reached and an external interrupt signal is not detected;
the timer interruption module is further configured to add the count value according to the detected timer interruption signal;
and the exception handling module is used for executing corresponding transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
8. A wireless module comprising a micro-controller and a transceiver for generating an external interrupt signal when the transceiver performs a receiving/transmitting operation, wherein,
the micro-control equipment is used for initializing a timer and a count value of the micro-control equipment according to a preset period when the preset period is up and no external interrupt signal is detected;
the micro-control equipment is also used for adding the count value according to the detected timer interrupt signal;
and the micro-control equipment is also used for executing corresponding transceiving exception handling operation according to the relation between the counting value and the counting threshold value.
9. An electronic device, characterized in that the electronic device comprises:
a processor; and
a memory configured to store machine readable instructions, which when executed by the processor, cause the processor to perform operations corresponding to a method of handling a transceiving exception according to any of the above claims 1 to 6.
10. A computer-readable storage medium, storing computer instructions, which when executed on a computer, enable the computer to perform operations corresponding to a method for handling a transceiver anomaly of any one of claims 1 to 6.
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 true CN113692008A (en) 2021-11-23
CN113692008B 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)

Cited By (1)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160055046A1 (en) * 2013-04-01 2016-02-25 Zte Corporation System fault detection and processing method, device, and computer readable storage medium
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160055046A1 (en) * 2013-04-01 2016-02-25 Zte Corporation System fault detection and processing method, device, and computer readable storage medium
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN113692008B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN100365589C (en) Apparatus, system, and method for facilitating port testing of a multi-port host adapter
CN103645975B (en) A kind of method of abnormal restoring and serial bus transmission device
CN101984573B (en) Method and system for distributed realization of LACP standard state machine
CN102761439B (en) Device and method for detecting and recording abnormity on basis of watchdog in PON (Passive Optical Network) access system
CN109150680B (en) Self-adaptive address-determining networking circuit and method suitable for RS485 bus
CN102455940B (en) Processing method and system of timers and asynchronous events
CN111273923B (en) FPGA (field programmable Gate array) upgrading method based on PCIe (peripheral component interface express) interface
CN105550057B (en) Embedded software system fault detection recovery method and system
WO2014101361A1 (en) Method for controlling multiple can interfaces by using single-spi bus
CN103279331A (en) Multi-task concurrent processing method and device for Android system
CN113692008A (en) Method, device, equipment and storage medium for processing transceiving exception
CN110908841A (en) I2C communication abnormity recovery method and device
JP3454297B2 (en) Method and apparatus for testing a link between network switches
CN102104531A (en) Message processing device, method and system
WO2013152584A1 (en) Method, device and single board for feeding dog in embedded system
CN103246548A (en) Method and device for scheduling fault-tolerant order-preserving events
US20200136912A1 (en) Method, Device, and System for Implementing MUX Machine
CN101626331B (en) Ethernet communication control method for steel and iron continuous annealing system
CN101090511B (en) Release method for death resource
CN110995530B (en) Method and equipment for solving data one-way arrival problem
CN112817818B (en) Method for monitoring time of deploying running program on cloud by edge security node
CN114153573A (en) Multitasking method based on single thread pool and related device
CN115378685A (en) Data processing method, system, electronic device and computer readable storage medium
CN104834624B (en) A kind of anti-interference method of iic bus interface
CN110687854B (en) PA bus controller and PA bus control system

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