CN112235171B - Bus collision detection method, device, detection equipment and storage medium - Google Patents

Bus collision detection method, device, detection equipment and storage medium Download PDF

Info

Publication number
CN112235171B
CN112235171B CN202010970889.1A CN202010970889A CN112235171B CN 112235171 B CN112235171 B CN 112235171B CN 202010970889 A CN202010970889 A CN 202010970889A CN 112235171 B CN112235171 B CN 112235171B
Authority
CN
China
Prior art keywords
counter
bus
interrupt
starting
count
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
CN202010970889.1A
Other languages
Chinese (zh)
Other versions
CN112235171A (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.)
Guangzhou Hedong Technology Co ltd
Original Assignee
Guangzhou Hedong Technology 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 Guangzhou Hedong Technology Co ltd filed Critical Guangzhou Hedong Technology Co ltd
Priority to CN202010970889.1A priority Critical patent/CN112235171B/en
Publication of CN112235171A publication Critical patent/CN112235171A/en
Application granted granted Critical
Publication of CN112235171B publication Critical patent/CN112235171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses

Abstract

The embodiment of the application discloses a bus collision detection method, a device, detection equipment and a storage medium, wherein the method comprises the following steps: initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state. The bus collision detection method without a master-slave structure is used, detection is performed through external interruption, and the bus collision detection method is high in communication response speed, high in operation efficiency and low in system power consumption.

Description

Bus collision detection method, device, detection equipment and storage medium
Technical Field
The present disclosure relates to bus detection technologies, and in particular, to a method and an apparatus for detecting bus collision, a device for detecting bus collision, and a storage medium.
Background
In the field of traditional industrial control application, a bus system usually uses a master-slave structure, for example, a MODBUS uses a communication scheme of one master and a plurality of slaves, and although the problem of bus conflict is solved, the whole system has slow response speed, low efficiency and very power consumption, and cannot be used as a system scheme with low power consumption.
Disclosure of Invention
The application provides a bus conflict detection method, a bus conflict detection device and a storage medium, and aims to solve the problems that in the prior art, the bus conflict detection is slow in response speed, low in efficiency, high in power consumption and the like.
The invention adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a bus collision detection method, where the method includes:
initializing system parameters and interrupt parameters;
starting timer interruption and serial port interruption;
starting an external interrupt and starting a counter to start counting;
if the timer interrupt function is detected to run, the counter counts up by one; if the running of an external interrupt function is detected, the counting of the counter is cleared;
and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state.
Optionally, after determining that the bus is in the idle state, the method further includes:
judging whether the equipment has data transmission, if so, receiving the data from the equipment by the bus, continuing counting by the counter after the data is received, and determining the state of the bus by judging the relation between the count value of the counter and the set counter count threshold value;
otherwise, continuing to count the counter and judging the relation between the count value of the counter and the set counter count threshold value to determine the state of the bus.
Optionally, the initializing system parameters and interrupt parameters includes:
initializing a system clock, an IO interface and system parameters;
initializing a timer interrupt parameter and a serial port interrupt parameter.
Optionally, the initializing the timer interrupt parameter includes:
setting a timing value;
an automatic reload timer.
Optionally, the initializing the serial port interrupt parameter includes:
configuring a serial clock, configuring serial pins and configuring serial interrupts.
Optionally, before said turning on the external interrupt, a timer count is turned on.
Optionally, the bus is an RS485 bus.
In a second aspect, an embodiment of the present application provides a bus collision detection apparatus, including:
the initialization module is used for initializing system parameters and interrupt parameters;
the first interrupt starting module is used for starting timer interrupt and serial port interrupt;
the second interrupt starting module is used for starting external interrupt and starting the counter to start counting;
the detection module is used for adding one to the count of the counter when the running of the timer interrupt function is detected; when the running of an external interrupt function is detected, the counting of the counter is cleared;
the first judgment module is used for judging whether the count value of the counter at the current moment is greater than the set counter count threshold value;
and the bus state determining module is used for determining that the bus is in an idle state when the count value of the counter at the current moment is greater than the set counter count threshold value, and determining that the bus is in a busy state when the count value of the counter at the current moment is less than the set counter count threshold value.
Optionally, the system further includes a second determining module, configured to determine whether there is data to be sent by the device after the bus is determined to be in the idle state;
optionally, the system further includes a data receiving module, configured to receive, by the bus, data from the device when the device has data to send, and after the data reception is completed, continue counting by the counter and determine a relationship between a count value of the counter and a count threshold of the counter to determine a state of the bus;
optionally, the system further includes a count continuation module, configured to continue counting by the counter when the device does not send data, and determine a relationship between a count value of the counter and a set counter count threshold to determine a state of the bus.
Optionally, the initialization module includes a system initialization sub-module and an interrupt initialization sub-module, where the system initialization sub-module is configured to:
initializing a system clock, an IO interface and system parameters;
the interrupt initialization submodule comprises a timer interrupt unit and a serial port interrupt unit, wherein:
the timer interruption unit is used for initializing timer interruption parameters;
the serial port interrupt unit is used for initializing serial port interrupt parameters.
Optionally, the timer interrupt unit is specifically configured to:
setting a timing value;
an automatic reload timer.
Optionally, the serial port interrupt unit is specifically configured to:
configuring a serial clock, configuring serial pins and configuring serial interrupts.
Optionally, the system further includes a timer counting module, configured to start a timer count before the external interrupt is started.
Optionally, the bus is an RS485 bus.
In a third aspect, an embodiment of the present application provides a bus collision detection device, including a memory and one or more processors;
the memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, cause the one or more processors to implement the bus collision detection method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the bus collision detection method according to the first aspect when executed by a computer processor.
The technical scheme adopted by the invention has the following beneficial effects: by initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state. The bus collision detection method without a master-slave structure is used, detection is performed through external interruption, and the bus collision detection method is high in communication response speed, high in operation efficiency and low in system power consumption.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a bus collision detection method provided in an embodiment of the present application;
FIG. 2 is a flow chart of another bus collision detection method provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a bus collision detection apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a bus collision detection device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of bus collision detection provided in an embodiment of the present application, where the bus collision detection method provided in this embodiment may be executed by a bus collision detection apparatus, and the bus collision detection apparatus may be implemented by hardware and/or software. Referring to fig. 1, the method may specifically include:
s101, initializing system parameters and interrupt parameters.
Firstly, after the system is powered on, an initialization phase is entered. In the initialization phase, in addition to initializing system parameters, interrupt parameters are initialized. Thus, after initialization of the various parameters is complete, various interrupts may be entered.
And S102, starting timer interrupt and serial port interrupt.
Specifically, after the system parameter and the interrupt parameter are initialized, the timer interrupt and the serial port interrupt are started.
S103, starting an external interrupt, and starting a counter to start counting.
Specifically, after the timer interrupt and the serial port interrupt are both started, the external interrupt is started, the counter is started to start counting, and bus collision detection is performed in the external interrupt. In one particular example, the counter may be represented by C1.
S104, if the running of the timer interrupt function is detected, the counting of the counter is increased by one; and if the running of the external interrupt function is detected, the counting of the counter is cleared.
Specifically, after the external interrupt is started, the main function is entered, and if the running of the timer interrupt function is detected, the counter counts up by one in the timer interrupt function; if the external interrupt function is detected to run, the counter count in the external interrupt function is cleared. The count value of the counter C1 is recorded in real time.
And S105, judging whether the count value of the counter at the current moment is larger than a set counter count threshold, if so, executing S106, and otherwise, executing S107.
The counting threshold of the counter is set to be 5, and the counting of the counter at each moment is changed because the counter counts all the time, specifically, whether the counting value of the counter at the current moment is larger than the counting threshold of the counter is judged. If the count value of the counter at the current moment is larger than the set counter count threshold, executing S106, otherwise executing S107.
And S106, determining that the bus is in an idle state.
Specifically, if the count value of the counter at the current time is greater than the set counter count threshold, it is determined that the bus is in an idle state, and at this time, the bus may receive data sent by the device.
S107, determining that the bus is in a busy state.
Specifically, if the count value of the counter at the current moment is less than or equal to the set counter count threshold, it is determined that the bus is in a busy state, and at this time, the bus may not receive data sent by the device. If a device needs to send data to the bus, it needs to wait for the bus to be idle.
The technical scheme adopted by the invention has the following beneficial effects: by initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state. The bus collision detection method without a master-slave structure is used, detection is performed through external interruption, and the bus collision detection method is high in communication response speed, high in operation efficiency and low in system power consumption.
On the basis of the above embodiments, fig. 2 shows a flowchart of another bus collision detection provided by the embodiments of the present application. The bus collision detection method is embodied for the above-mentioned bus collision detection. Referring to fig. 2, the bus collision detection method includes:
s201, initializing a system clock, an IO interface and system parameters; initializing a timer interrupt parameter and a serial port interrupt parameter.
Specifically, the initialization process of the system includes initialization of a system clock, initialization of an IO (Input/Output) interface, and initialization of system parameters. In addition, the initialization of the interrupt parameter includes the initialization of a timer interrupt parameter and the initialization of a serial port interrupt parameter.
Optionally, initializing the timer parameter may be specifically implemented by setting a timer value and automatically reloading the timer. Wherein the set timer value may be a 1ms timer value and then automatically reloading the timer. Initializing the serial port interrupt parameter may be specifically implemented by configuring a serial port clock, configuring a serial port pin, and configuring a serial port interrupt.
And S202, starting timer interrupt and serial port interrupt.
S203, starting an external interrupt, and starting a counter to start counting.
S204, if the running of the timer interrupt function is detected, counting by one through a counter; and if the running of the external interrupt function is detected, the counting of the counter is cleared.
S205, judging whether the count value of the counter at the current moment is larger than a set counter count threshold value, if so, executing S206, otherwise, executing S207.
S206, determining that the bus is in an idle state.
And S207, determining that the bus is in a busy state.
In a specific example, the bus in the embodiment of the present application is an RS485 bus.
Specifically, after determining that the bus is in the idle state, S208 is performed.
And S208, judging whether the equipment has data transmission, if so, executing S209, and otherwise, executing S210.
Specifically, after the bus is in the idle state, it is determined whether there is a device that needs to send data to the bus, if there is a setting that needs to send data to the bus, S209 is executed, and if there is no device that needs to send data to the bus, S210 is executed.
S209, the bus receives the data from the equipment, and after the data reception is completed, the counter continues to count, and the state of the bus is determined by judging the relationship between the count value of the counter and the set counter count threshold.
Specifically, if a device needs to send data to the bus, the bus receives the data sent by the device, and after the data reception is completed, the counter continues to count. And judging the relation between the count value of the counter and the set counter count threshold value in real time to continuously judge the state of the bus.
S210, continuing the counter counting, judging the relation between the counting value of the counter and the set counter counting threshold value, and determining the state of the bus.
In addition, if no device needs to transmit data to the bus in the bus idle state, the counter continues to count, and the relationship between the count value of the counter and the set counter count threshold is determined to continue determining the state of the bus.
In a specific example, an embodiment of the present application further provides a bus collision detection system, where the bus collision detection system includes a system parameter module, a timer module, a serial port module, and a bus detection module, which are respectively used to execute corresponding functions in the foregoing embodiments, and details are not described herein.
On the basis of the foregoing embodiments, fig. 3 is a schematic structural diagram of a bus collision detection apparatus according to an embodiment of the present application. Referring to fig. 3, the bus collision detection apparatus provided in this embodiment specifically includes: the system comprises an initialization module 301, a first interrupt starting module 302, a second interrupt starting module 303, a detection module 304, a first judgment module 305 and a bus state determination module 306.
The initialization module 301 is configured to initialize system parameters and interrupt parameters; a first interrupt starting module 302, configured to start timer interrupt and serial port interrupt; a second interrupt starting module 303, configured to start an external interrupt and start a counter to start counting; a detection module 304, configured to increment a counter count by one when detecting that the timer interrupt function is running; when the running of an external interrupt function is detected, the counting of a counter is cleared; a first judging module 305, configured to judge whether a count value of a counter at a current time is greater than a set counter count threshold; the bus state determining module 306 is configured to determine that the bus is in an idle state when the count value of the counter at the current time is greater than the set counter count threshold, and determine that the bus is in a busy state when the count value of the counter at the current time is less than the set counter count threshold.
The technical scheme adopted by the invention has the following beneficial effects: by initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state. The bus collision detection method without a master-slave structure is used, detection is performed through external interruption, and the bus collision detection method is high in communication response speed, high in operation efficiency and low in system power consumption.
Optionally, the system further includes a second determining module, configured to determine whether the device has data to send after determining that the bus is in an idle state;
optionally, the system further includes a data receiving module, configured to receive data from the device through the bus when the device has data to send, and after the data reception is completed, continue to count the counter and determine a relationship between a count value of the counter and a set counter count threshold;
optionally, the system further includes a count continuation module, configured to continue counting by the counter and determine a relationship between a count value of the counter and a set counter count threshold when the device does not send data.
Optionally, the initialization module includes a system initialization module submodule and an interrupt initialization submodule, where the system initialization submodule is configured to:
initializing a system clock, an IO interface and system parameters;
the interrupt initialization submodule comprises a timer interrupt unit and a serial port interrupt unit, wherein:
the timer interruption unit is used for initializing timer interruption parameters;
the serial port interrupt unit is used for initializing serial port interrupt parameters.
Optionally, the timer interrupt unit is specifically configured to:
setting a timing value;
an automatic reload timer.
Optionally, the serial port interrupt unit is specifically configured to:
configuring a serial clock, configuring serial pins and configuring serial interrupts.
Optionally, the system further includes a timer counting module, configured to start a timer count before starting the external interrupt.
Optionally, the bus is an RS485 bus.
The bus collision detection device provided by the embodiment of the application can be used for executing the bus collision detection method provided by the embodiment, and has corresponding functions and beneficial effects.
The embodiment of the application provides a bus collision detection device, and the bus collision detection device provided by the embodiment of the application can be integrated in the bus collision detection device. Fig. 4 is a schematic structural diagram of a bus collision detection device according to an embodiment of the present application. Referring to fig. 4, the apparatus includes: a processor 40, a memory 41. The number of processors 40 in the bus collision detection device may be one or more, and one processor 40 is taken as an example in fig. 4. The number of the memory 41 in the device may be one or more, and one memory 41 is taken as an example in fig. 4. The processor 40 and the memory 41 of the bus collision detection device may be connected by a bus or other means, and fig. 4 illustrates a bus connection as an example.
The memory 41 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the bus collision detection method according to any embodiment of the present application (for example, the initialization module 301, the first interrupt starting module 302, the second interrupt starting module 303, the detection module 304, the first judgment module 305, and the bus state determination module 306 in the bus collision detection apparatus). The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 40 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 41, so as to implement the above-mentioned bus collision detection method, which includes: initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state.
The device provided by the above can be used for executing the bus collision detection method provided by the above embodiment, and has corresponding functions and advantages.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a bus collision detection method, the bus collision detection method comprising: initializing system parameters and interrupt parameters; starting timer interruption and serial port interruption; starting an external interrupt and starting a counter to start counting; if the timer interrupt function is detected to run, the counter counts up by one; if the operation of the external interrupt function is detected, the counting of the counter is cleared; and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the bus collision detection method described above, and may also perform related operations in the bus collision detection method provided in any embodiment of the present application.
The bus collision detection device, the storage medium, and the apparatus provided in the foregoing embodiments may perform the bus collision detection method provided in any embodiment of the present application, and reference may be made to the bus collision detection method provided in any embodiment of the present application without detailed technical details described in the foregoing embodiments.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments illustrated herein, and that various obvious changes, rearrangements and substitutions may be made therein by those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A method for bus collision detection, comprising:
initializing system parameters and interrupt parameters;
starting timer interruption and serial port interruption;
starting an external interrupt and starting a counter to start counting;
if the timer interrupt function is detected to run, the counter counts up by one; if the running of an external interrupt function is detected, the counting of the counter is cleared;
and judging whether the count value of the counter at the current moment is greater than the set counter count threshold value, if so, determining that the bus is in an idle state, and otherwise, determining that the bus is in a busy state.
2. The method of claim 1, further comprising, after the determining that the bus is in the idle state:
judging whether the equipment has data transmission, if so, receiving the data from the equipment by the bus, continuing counting by the counter after the data is received, and determining the state of the bus by judging the relation between the count value of the counter and the set counter count threshold value;
otherwise, continuing to count the counter and judging the relation between the count value of the counter and the set counter count threshold value to determine the state of the bus.
3. The method of claim 1, wherein initializing system parameters and interrupt parameters comprises:
initializing a system clock, an IO interface and system parameters;
initializing a timer interrupt parameter and a serial port interrupt parameter.
4. The method of claim 3, wherein initializing the timer interrupt parameter comprises:
setting a timing value;
an automatic reload timer.
5. The method of claim 3, wherein initializing the serial port interrupt parameter comprises:
configuring a serial clock, configuring serial pins and configuring serial interrupts.
6. The method of claim 1, further comprising, prior to said initiating an external interrupt:
a timed count is started.
7. The method of any one of claims 1-6, wherein the bus is an RS485 bus.
8. A bus collision detection apparatus, comprising:
the initialization module is used for initializing system parameters and interrupt parameters;
the first interrupt starting module is used for starting timer interrupt and serial port interrupt;
the second interrupt starting module is used for starting external interrupt and starting the counter to start counting;
the detection module is used for adding one to the count of the counter when the running of the timer interrupt function is detected; when the running of an external interrupt function is detected, the counting of the counter is cleared;
the first judgment module is used for judging whether the count value of the counter at the current moment is greater than the set counter count threshold value;
and the bus state determining module is used for determining that the bus is in an idle state when the count value of the counter at the current moment is greater than the set counter count threshold value, and determining that the bus is in a busy state when the count value of the counter at the current moment is less than the set counter count threshold value.
9. A bus collision detection device, comprising:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the bus collision detection method as recited in any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the bus collision detection method of any one of claims 1 to 7 when executed by a computer processor.
CN202010970889.1A 2020-09-15 2020-09-15 Bus collision detection method, device, detection equipment and storage medium Active CN112235171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010970889.1A CN112235171B (en) 2020-09-15 2020-09-15 Bus collision detection method, device, detection equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010970889.1A CN112235171B (en) 2020-09-15 2020-09-15 Bus collision detection method, device, detection equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112235171A CN112235171A (en) 2021-01-15
CN112235171B true CN112235171B (en) 2021-10-29

Family

ID=74106956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010970889.1A Active CN112235171B (en) 2020-09-15 2020-09-15 Bus collision detection method, device, detection equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112235171B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113692008B (en) * 2021-08-27 2024-04-05 京东方科技集团股份有限公司 Method, device, equipment and storage medium for processing abnormal receiving and dispatching

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5555420A (en) * 1990-12-21 1996-09-10 Intel Corporation Multiprocessor programmable interrupt controller system with separate interrupt bus and bus retry management
CN101227366A (en) * 2007-12-11 2008-07-23 北京豪沃尔科技发展股份有限公司 Anti-conflict method of bus transfer data
CN101452425A (en) * 2008-12-25 2009-06-10 北京中星微电子有限公司 Method for preventing bus collision, circuit and integrated circuit chip
CN101964724A (en) * 2010-08-30 2011-02-02 华为技术有限公司 Energy conservation method of communication single plate and communication single plate
CN104199338A (en) * 2014-08-04 2014-12-10 珠海中慧微电子有限公司 Communication control method of RS485 communication circuit
CN107003958A (en) * 2014-11-26 2017-08-01 高通股份有限公司 With stamp of interior break period
CN109582616A (en) * 2018-12-05 2019-04-05 张洋 Communication system and method based on universal serial bus
CN109905306A (en) * 2019-01-30 2019-06-18 北京深蓝同创科技有限公司 A kind of low cost multi-master bus communication control system
CN111459858A (en) * 2020-04-07 2020-07-28 广东芬尼能源技术有限公司 Multi-host communication method, device, system and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7657683B2 (en) * 2008-02-01 2010-02-02 Redpine Signals, Inc. Cross-thread interrupt controller for a multi-thread processor
US10678723B2 (en) * 2018-09-18 2020-06-09 Qualcomm Incorporated Urgent in-band interrupts on an I3C bus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5555420A (en) * 1990-12-21 1996-09-10 Intel Corporation Multiprocessor programmable interrupt controller system with separate interrupt bus and bus retry management
CN101227366A (en) * 2007-12-11 2008-07-23 北京豪沃尔科技发展股份有限公司 Anti-conflict method of bus transfer data
CN101452425A (en) * 2008-12-25 2009-06-10 北京中星微电子有限公司 Method for preventing bus collision, circuit and integrated circuit chip
CN101964724A (en) * 2010-08-30 2011-02-02 华为技术有限公司 Energy conservation method of communication single plate and communication single plate
CN104199338A (en) * 2014-08-04 2014-12-10 珠海中慧微电子有限公司 Communication control method of RS485 communication circuit
CN107003958A (en) * 2014-11-26 2017-08-01 高通股份有限公司 With stamp of interior break period
CN109582616A (en) * 2018-12-05 2019-04-05 张洋 Communication system and method based on universal serial bus
CN109905306A (en) * 2019-01-30 2019-06-18 北京深蓝同创科技有限公司 A kind of low cost multi-master bus communication control system
CN111459858A (en) * 2020-04-07 2020-07-28 广东芬尼能源技术有限公司 Multi-host communication method, device, system and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于RS_485总线的迷你仓温度和时间采集与控制系统的设计;关博阳;《中国优秀硕士学位论文全文数据库 (基础科学辑)》;20170315;全文 *

Also Published As

Publication number Publication date
CN112235171A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
US5652894A (en) Method and apparatus for providing power saving modes to a pipelined processor
US8595533B2 (en) Power management system, method thereof and storage medium
EP3147793B1 (en) Interrupt processing method and interrupt controller
EP3499377B1 (en) Storage controller, storage device including the same, and operation method of storage controller
CN108228492B (en) Multi-channel DDR interleaving control method and device
US9939869B2 (en) Methods and systems for coordination of operating states amongst multiple SOCs within a computing device
WO2016205142A1 (en) Test for 50 nanosecond spike filter
CN112235171B (en) Bus collision detection method, device, detection equipment and storage medium
US11010094B2 (en) Task management method and host for electronic storage device
CN104049702A (en) Single chip microcomputer-based CPU (Central Processing Unit) reset control system, method and device
CN111984581B (en) Linux-based SPI bus master-slave device communication system, method and device
CN102708079B (en) Be applied to the method and system of the control data transmission of microcontroller
CN102929770A (en) Monitoring and positioning method of task monopolizing of user state of embedded Linux system
CN113010236B (en) Program execution method, device, equipment and storage medium
CN104424142A (en) Method and device for accessing shared resource in multi-core processor system
CN101944056B (en) Method and device for monitoring multitask system
CN113704006B (en) Communication method, device, electronic equipment, storage medium and system on chip
CN104427595A (en) Communication-terminal standby electricity-saving control method and control device
EP2035977A2 (en) System and method for sharing reset and background communication on a single mcu pin
US7209988B2 (en) Management of the freezing of a functional module in a system on a chip
JP2007052685A (en) Microcontroller
CN104238717A (en) Information processing method and electronic equipment
CN115599722B (en) Method and device for realizing accurate transmission of serial port data based on kernel of operating system
CN116980362B (en) Multitasking method and device for SPI architecture
KR102552666B1 (en) Electronic device and operation method thereof

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