CN111182514A - Method, device, equipment and medium for realizing time-sharing multiplexing of pins - Google Patents

Method, device, equipment and medium for realizing time-sharing multiplexing of pins Download PDF

Info

Publication number
CN111182514A
CN111182514A CN201911265913.5A CN201911265913A CN111182514A CN 111182514 A CN111182514 A CN 111182514A CN 201911265913 A CN201911265913 A CN 201911265913A CN 111182514 A CN111182514 A CN 111182514A
Authority
CN
China
Prior art keywords
state
pin
bluetooth
level
bluetooth connection
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
CN201911265913.5A
Other languages
Chinese (zh)
Other versions
CN111182514B (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.)
Fujian Morefun Electronic Technology Co ltd
Original Assignee
Fujian Morefun Electronic 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 Fujian Morefun Electronic Technology Co ltd filed Critical Fujian Morefun Electronic Technology Co ltd
Priority to CN201911265913.5A priority Critical patent/CN111182514B/en
Publication of CN111182514A publication Critical patent/CN111182514A/en
Application granted granted Critical
Publication of CN111182514B publication Critical patent/CN111182514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a method, a device, equipment and a medium for realizing pin time-sharing multiplexing, wherein the method comprises the steps of configuring a first state pin of a CPU (central processing unit) as an input suspension after being electrified; enabling the first state pin to receive a first level state of a second state pin of the Bluetooth module, detecting the first level state received by the first state pin, and determining a Bluetooth connection state according to the first level state; and when the Bluetooth connection is successful, configuring the input or the output of the first state pin according to the requirement of an application mode so that the Bluetooth module enters a transparent transmission mode or an AT mode according to a second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin. The invention has the advantages that: the waste of pin resources can be reduced, and the implementation cost of hardware is reduced.

Description

Method, device, equipment and medium for realizing time-sharing multiplexing of pins
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for realizing time-sharing multiplexing of pins.
Background
The bluetooth module is the PCBA board of an integrated bluetooth function, mainly used short distance wireless communication, and bluetooth module need be controlled bluetooth module through CPU when specifically using.
In the prior art, when the CPU controls the bluetooth module, 2 pins are required to be connected to control the bluetooth module, one of the pins is used to obtain the bluetooth status (connected and disconnected), and the other pin is used to control the bluetooth mode (AT and transparent mode). Because the CPU all needs to control a plurality of modules usually, therefore pin resource is very in short supply, if need reuse 2 pins to control bluetooth module, just need increase extension IO chip, and then can increase the hardware cost.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method, a device, equipment and a medium for realizing pin time-sharing multiplexing, and solve the problem that the existing CPU needs to use 2 pins when controlling a Bluetooth module, so that the IO chip needs to be expanded and the hardware cost is increased.
In a first aspect, the present invention provides a method for implementing pin time-sharing multiplexing, where the method is used at a CPU end, and the method includes:
after the power is on, configuring a first state pin of the CPU as an input suspension; enabling the first state pin to receive a first level state of a second state pin of the Bluetooth module, detecting the first level state received by the first state pin, and determining a Bluetooth connection state according to the first level state;
and when the Bluetooth connection is successful, configuring the input or the output of the first state pin according to the requirement of an application mode so that the Bluetooth module enters a transparent transmission mode or an AT mode according to a second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin.
Further, the method further comprises:
when the Bluetooth is required to be connected, the first power supply pin of the CPU is controlled to be pulled up, so that the Bluetooth module executes power-on operation according to a pull-up signal received by the second power supply pin;
when the Bluetooth is not required to be connected, the first power supply pin of the CPU is controlled to be pulled down, so that the Bluetooth module executes power-down operation according to a pull-down signal received by the second power supply pin.
Further, the determining the bluetooth connection state according to the first level state specifically includes: when the first level state is a low level, the Bluetooth connection is considered to be successful; when the first level state is a high level, the Bluetooth connection is considered to be failed;
the configuring the input or output of the first state pin according to the application mode requirement specifically includes: when the transparent transmission mode needs to be entered, configuring the first state pin as an input suspension; and when the AT mode needs to be entered, configuring the first state pin to output a high level.
In a second aspect, the present invention provides a method for implementing pin time-sharing multiplexing, where the method is used at a bluetooth module end, and the method includes:
after the power is on, the Bluetooth module detects the Bluetooth connection state through a Bluetooth protocol stack, and the input of a second state pin is configured according to the Bluetooth connection state, so that the first state pin of the CPU determines the Bluetooth connection state according to the first level state after receiving the first level state;
and after the Bluetooth connection is successful, enabling the second state pin to receive the second level state of the first state pin of the CPU, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state.
Further, the input for configuring the second status pin according to the bluetooth connection status specifically includes: when the Bluetooth connection is successful, configuring the second state pin as an input pull-down; when the Bluetooth connection fails, configuring the second state pin as an input pull-up;
the specific step of enabling the bluetooth module to enter the corresponding application mode according to the second level state is as follows: when the second level state is a low level, enabling the Bluetooth module to enter a transparent transmission mode; and when the second level state is a high level, enabling the Bluetooth module to enter an AT mode.
In a third aspect, the present invention provides a device for implementing pin time-sharing multiplexing, where the device is a CPU, and the device includes a bluetooth connection determining module and a mode configuration module;
the Bluetooth connection determining module is used for configuring a first state pin of the CPU as an input suspension after the power-on; enabling the first state pin to receive a first level state of a second state pin of the Bluetooth module, detecting the first level state received by the first state pin, and determining a Bluetooth connection state according to the first level state;
and the mode configuration module is used for configuring the input or the output of the first state pin according to the requirement of an application mode after the Bluetooth module is successfully connected so that the Bluetooth module can enter a transparent transmission mode or an AT mode according to the second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin.
In a fourth aspect, the invention provides a device for realizing time-sharing multiplexing of pins, wherein the device is a bluetooth module, and the device comprises a bluetooth connection configuration module and a mode entering module;
the Bluetooth connection configuration module is used for enabling the Bluetooth module to detect the Bluetooth connection state through a Bluetooth protocol stack after being powered on, and configuring the input of a second state pin according to the Bluetooth connection state, so that the first state pin of the CPU can determine the Bluetooth connection state according to a first level state after receiving the first level state;
and the mode entering module is used for enabling the second state pin to receive the second level state of the first state pin of the CPU after the Bluetooth connection is successful, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state.
In a fifth aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of the first aspect when executing the program.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: make CPU only need just can realize acquireing bluetooth state and control bluetooth mode through a pin, compare with current CPU need use 2 pins when controlling bluetooth module, can reduce the waste of pin resource to reduce the cost of realization of hardware.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a hardware framework diagram of the system of the present invention;
fig. 2 is a flowchart of a method for implementing pin time-sharing multiplexing according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for implementing pin time-sharing multiplexing according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for implementing pin time-sharing multiplexing according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for implementing pin time-sharing multiplexing according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a medium according to a sixth embodiment of the present invention.
Detailed Description
The embodiment of the application provides a method, a device, equipment and a medium for realizing pin time-sharing multiplexing, and solves the problem that the hardware cost is increased due to the fact that an IO chip needs to be expanded because 2 pins are needed when an existing CPU controls a Bluetooth module.
The technical scheme in the embodiment of the application has the following general idea: configuring a state pin as an input at a CPU end, acquiring the level state of the state pin, and considering Bluetooth connection if the level state is a low level; if the level state is high level, the Bluetooth connection is disconnected; after the Bluetooth is connected, configuring the input or output of the state pin according to the requirement of an application mode;
configuring a status pin as an input at a Bluetooth module end, starting a pull-down indication low level when Bluetooth is connected, and starting a pull-up indication high level when the Bluetooth is disconnected; after the Bluetooth is connected, the level state of the state pin is detected, if the level state is low level, the transparent transmission mode is entered, and if the level state is high level, the AT mode is entered.
Before describing the specific embodiment, a system framework corresponding to the method of the embodiment of the present application is described, and as shown in fig. 1, the system is roughly divided into two parts: the first part is a CPU, and the second part is a Bluetooth module; the first POWER supply pin (BT _ POWER, which is a common pin of the CPU) of the CPU is connected with the second POWER supply Pin (POWER) of the Bluetooth module and is used for controlling the Bluetooth module to POWER on and off through the CPU; a first serial port pin (BT _ UART) of the CPU is connected with a second serial port pin (UART) of the Bluetooth module and is used for realizing communication between the CPU and the Bluetooth module, wherein the communication comprises AT instructions and transparent transmission data; the first STATE pin (BT _ STATE) of the CPU is connected with the second STATE pin (STATE) of the Bluetooth module, and is used for the CPU to acquire the Bluetooth STATE and control the Bluetooth mode.
Example one
The embodiment provides a method for implementing pin time-sharing multiplexing, as shown in fig. 2, where the method is used at a CPU end, and the method includes:
after being powered on, a first STATE pin (namely a BT _ STATE pin) of the CPU is configured to be input and suspended; enabling the first STATE pin to receive a first level STATE of a second STATE pin (STATE pin) of a Bluetooth module, detecting the first level STATE received by the first STATE pin, and determining a Bluetooth connection STATE according to the first level STATE;
after the Bluetooth module is initialized after being powered on, the Bluetooth connection state can be detected through a Bluetooth protocol stack, and if the Bluetooth connection is successful, a second state pin of the Bluetooth module is configured to be input pull-down; if the Bluetooth connection fails, configuring a second state pin of the Bluetooth module as an input pull-up; therefore, after the first state pin of the CPU receives the first level state of the second state pin of the Bluetooth module, the Bluetooth connection state can be determined according to the first level state;
after the Bluetooth connection is successful, configuring the input or the output of the first state pin according to the requirement of an application mode, so that after a second state pin of the Bluetooth module receives a second level state of the first state pin, the Bluetooth module enters a transparent transmission mode or an AT mode according to the second level state;
in specific implementation, after the bluetooth connection is successful, the second state pin of the bluetooth module is in an input pull-down state, so that when the first state pin of the CPU is configured as input suspension, the bluetooth module detects that the second level state is a low level, and further, the bluetooth module can enter a transparent transmission mode; when the first state pin of the CPU is configured to output a high level, the Bluetooth module detects that the second level state is the high level, and then the Bluetooth module enters an AT mode.
In this embodiment, the method further includes:
when the Bluetooth is required to be connected, a first POWER supply pin (namely BT _ POWER pin) of the CPU is controlled to be pulled high, so that the Bluetooth module executes POWER-on operation according to a pull-up signal received by a second POWER supply pin (namely Power pin);
when the Bluetooth is not required to be connected, the first power supply pin of the CPU is controlled to be pulled down, so that the Bluetooth module executes power-down operation according to a pull-down signal received by the second power supply pin.
In this embodiment, the determining the bluetooth connection state according to the first level state specifically includes: when the first level state is a low level, the Bluetooth connection is considered to be successful; when the first level state is a high level, the Bluetooth connection is considered to be failed; that is, in specific implementation, since the first status pin of the CPU is configured to input floating, and the bluetooth module configures the second status pin to input pull-down when detecting that the bluetooth connection is successful, the CPU detects that the first level status is low level; and if the Bluetooth module detects that the Bluetooth connection fails, the second state pin is configured to be pulled up, and the CPU detects that the first level state is high level.
The configuring the input or output of the first state pin according to the application mode requirement specifically includes: when the transparent transmission mode needs to be entered, the first state pin is configured to be input-suspended, and in specific implementation, once the Bluetooth connection is successful, the CPU can default to enter the transparent transmission mode, and at the moment, the first state pin only needs to be maintained to be input-suspended; when the AT mode needs to be switched back to the transparent transmission mode, the first state pin needs to be configured from the output high level back to the input for suspension; the first status pin is configured to output a high level when it is desired to enter AT mode (e.g., when it is desired to query for bluetooth versions or information).
Based on the same inventive concept, the application also provides a method for realizing the time-sharing multiplexing of the pins, which is detailed in the second embodiment.
Example two
In this embodiment, a method for implementing pin time division multiplexing is provided, as shown in fig. 3, where the method is used at a bluetooth module end, and the method includes:
after the power is on, the Bluetooth module detects the Bluetooth connection state through a Bluetooth protocol stack, and the input of a second state pin is configured according to the Bluetooth connection state, so that the first state pin of the CPU determines the Bluetooth connection state according to the first level state after receiving the first level state;
in specific implementation, after power-on is completed, a first STATE pin (namely, a BT _ STATE pin) of the CPU needs to be configured to input in a floating manner, so that after the bluetooth module configures the input of a second STATE pin according to a bluetooth connection STATE, the CPU can determine the bluetooth connection STATE according to a first level STATE received by the first STATE pin;
after the Bluetooth connection is successful, enabling the second state pin to receive a second level state of the first state pin of the CPU, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state;
in specific implementation, after the bluetooth module is successfully connected, because the second state pin of the bluetooth module is input pull-down, if the CPU wants to control the bluetooth module to enter the transparent transmission mode, the first state pin is configured to be input-suspended, and at this time, the bluetooth module detects that the second level state is a low level, so that the bluetooth module enters the transparent transmission mode; and if the CPU needs to control the Bluetooth module to enter the AT mode, the first state pin is configured to output a high level, and AT the moment, the Bluetooth module detects that the second level state is the high level, so that the Bluetooth module enters the AT mode.
In this embodiment, the input for configuring the second status pin according to the bluetooth connection status specifically includes: when the Bluetooth connection is successful, configuring the second state pin as an input pull-down; when the Bluetooth connection fails, configuring the second state pin as an input pull-up;
in specific implementation, because the first state pin of the CPU is configured to input suspension, when the Bluetooth connection is successful, the second state pin of the Bluetooth module is configured to input pull-down, and the CPU detects that the first level state is low level, the Bluetooth connection can be confirmed to be successful; and when the Bluetooth connection fails, the second state pin of the Bluetooth module is configured to be input to be pulled up, and at the moment, the CPU detects that the first level state is high level, so that the Bluetooth connection failure can be confirmed.
The specific step of enabling the bluetooth module to enter the corresponding application mode according to the second level state is as follows: when the second level state is a low level, enabling the Bluetooth module to enter a transparent transmission mode; and when the second level state is a high level, enabling the Bluetooth module to enter an AT mode.
Based on the same inventive concept, the application also provides a device corresponding to the method in the first embodiment, which is detailed in the third embodiment.
EXAMPLE III
In this embodiment, a device for implementing time-sharing multiplexing of pins is provided, as shown in fig. 4, where the device is a CPU, and the device includes a bluetooth connection determining module and a mode configuration module;
the Bluetooth connection determining module is used for configuring a first STATE pin (namely a BT _ STATE pin) of the CPU to be input and suspended after the CPU is powered on; enabling the first STATE pin to receive a first level STATE of a second STATE pin (STATE pin) of a Bluetooth module, detecting the first level STATE received by the first STATE pin, and determining a Bluetooth connection STATE according to the first level STATE;
after the Bluetooth module is initialized after being powered on, the Bluetooth connection state can be detected through a Bluetooth protocol stack, and if the Bluetooth connection is successful, a second state pin of the Bluetooth module is configured to be input pull-down; if the Bluetooth connection fails, configuring a second state pin of the Bluetooth module as an input pull-up; therefore, after the first state pin of the CPU receives the first level state of the second state pin of the Bluetooth module, the Bluetooth connection state can be determined according to the first level state;
the mode configuration module is used for configuring the input or the output of the first state pin according to the requirement of an application mode after the Bluetooth module is successfully connected so that the Bluetooth module can enter a transparent transmission mode or an AT mode according to a second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin;
in specific implementation, after the bluetooth connection is successful, the second state pin of the bluetooth module is in an input pull-down state, so that when the first state pin of the CPU is configured as input suspension, the bluetooth module detects that the second level state is a low level, and further, the bluetooth module can enter a transparent transmission mode; when the first state pin of the CPU is configured to output a high level, the Bluetooth module detects that the second level state is the high level, and then the Bluetooth module enters an AT mode.
In this embodiment, the device further comprises a power-up and power-down module;
the POWER-on and POWER-off module is used for controlling a first POWER supply pin (namely a BT _ POWER pin) of the CPU to be pulled up when the Bluetooth module needs to be connected, so that the Bluetooth module can execute POWER-on operation according to a pull-up signal received by a second POWER supply pin (namely the POWER pin);
when the Bluetooth is not required to be connected, the first power supply pin of the CPU is controlled to be pulled down, so that the Bluetooth module executes power-down operation according to a pull-down signal received by the second power supply pin.
In this embodiment, the determining the bluetooth connection state according to the first level state specifically includes: when the first level state is a low level, the Bluetooth connection is considered to be successful; when the first level state is a high level, the Bluetooth connection is considered to be failed; that is, in specific implementation, since the first status pin of the CPU is configured to input floating, and the bluetooth module configures the second status pin to input pull-down when detecting that the bluetooth connection is successful, the CPU detects that the first level status is low level; and if the Bluetooth module detects that the Bluetooth connection fails, the second state pin is configured to be pulled up, and the CPU detects that the first level state is high level.
The configuring the input or output of the first state pin according to the application mode requirement specifically includes: when the transparent transmission mode needs to be entered, the first state pin is configured to be input-suspended, and in specific implementation, once the Bluetooth connection is successful, the CPU can default to enter the transparent transmission mode, and at the moment, the first state pin only needs to be maintained to be input-suspended; when the AT mode needs to be switched back to the transparent transmission mode, the first state pin needs to be configured from the output high level back to the input for suspension; the first status pin is configured to output a high level when it is desired to enter AT mode (e.g., when it is desired to query for bluetooth versions or information).
Since the apparatus described in the third embodiment of the present invention is an apparatus used for implementing the method of the first embodiment of the present invention, based on the method described in the first embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the apparatus, and thus the details are not described herein. All the devices adopted in the method of the first embodiment of the present invention belong to the protection scope of the present invention.
Based on the same inventive concept, the application also provides a device corresponding to the method in the second embodiment, which is detailed in the fourth embodiment.
Example four
In this embodiment, a device for implementing pin time-sharing multiplexing is provided, as shown in fig. 5, the device is a bluetooth module, and the device includes a bluetooth connection configuration module and a mode entering module;
the Bluetooth connection configuration module is used for enabling the Bluetooth module to detect the Bluetooth connection state through a Bluetooth protocol stack after being powered on, and configuring the input of a second state pin according to the Bluetooth connection state, so that the first state pin of the CPU can determine the Bluetooth connection state according to a first level state after receiving the first level state;
in specific implementation, after power-on is completed, a first STATE pin (namely, a BT _ STATE pin) of the CPU needs to be configured to input in a floating manner, so that after the bluetooth module configures the input of a second STATE pin according to a bluetooth connection STATE, the CPU can determine the bluetooth connection STATE according to a first level STATE received by the first STATE pin;
the mode entering module is used for enabling the second state pin to receive a second level state of the first state pin of the CPU after the Bluetooth connection is successful, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state;
in specific implementation, after the bluetooth module is successfully connected, because the second state pin of the bluetooth module is input pull-down, if the CPU wants to control the bluetooth module to enter the transparent transmission mode, the first state pin is configured to be input-suspended, and at this time, the bluetooth module detects that the second level state is a low level, so that the bluetooth module enters the transparent transmission mode; and if the CPU needs to control the Bluetooth module to enter the AT mode, the first state pin is configured to output a high level, and AT the moment, the Bluetooth module detects that the second level state is the high level, so that the Bluetooth module enters the AT mode.
In this embodiment, the input for configuring the second status pin according to the bluetooth connection status specifically includes: when the Bluetooth connection is successful, configuring the second state pin as an input pull-down; when the Bluetooth connection fails, configuring the second state pin as an input pull-up;
in specific implementation, because the first state pin of the CPU is configured to input suspension, when the Bluetooth connection is successful, the second state pin of the Bluetooth module is configured to input pull-down, and the CPU detects that the first level state is low level, the Bluetooth connection can be confirmed to be successful; and when the Bluetooth connection fails, the second state pin of the Bluetooth module is configured to be input to be pulled up, and at the moment, the CPU detects that the first level state is high level, so that the Bluetooth connection failure can be confirmed.
The specific step of enabling the bluetooth module to enter the corresponding application mode according to the second level state is as follows: when the second level state is a low level, enabling the Bluetooth module to enter a transparent transmission mode; and when the second level state is a high level, enabling the Bluetooth module to enter an AT mode.
Since the apparatus described in the fourth embodiment of the present invention is an apparatus used for implementing the method of the second embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the apparatus based on the method described in the second embodiment of the present invention, and thus the details are not described herein. All the devices adopted by the method of the second embodiment of the invention belong to the protection scope of the invention.
Based on the same inventive concept, the application provides an electronic device embodiment corresponding to the first embodiment, which is detailed in the fifth embodiment.
EXAMPLE five
The present embodiment provides an electronic device, as shown in fig. 6, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, any implementation manner of the first embodiment may be implemented.
Since the electronic device described in this embodiment is a device used for implementing the method in the first embodiment of the present application, based on the method described in the first embodiment of the present application, a specific implementation of the electronic device in this embodiment and various variations thereof can be understood by those skilled in the art, and therefore, how to implement the method in the first embodiment of the present application by the electronic device is not described in detail herein. The equipment used by those skilled in the art to implement the methods in the embodiments of the present application is within the scope of the present application.
Based on the same inventive concept, the application provides a storage medium corresponding to the sixth embodiment, which is described in detail in the sixth embodiment.
EXAMPLE six
The present embodiment provides a computer-readable storage medium, as shown in fig. 7, on which a computer program is stored, and when the computer program is executed by a processor, any one of the embodiments can be implemented.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages: make CPU only need just can realize acquireing bluetooth state and control bluetooth mode through a pin, compare with current CPU need use 2 pins when controlling bluetooth module, can reduce the waste of pin resource to reduce the cost of realization of hardware.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (9)

1. A method for realizing pin time-sharing multiplexing is characterized in that: the method is used for a CPU (Central processing Unit) end, and comprises the following steps:
after the power is on, configuring a first state pin of the CPU as an input suspension; enabling the first state pin to receive a first level state of a second state pin of the Bluetooth module, detecting the first level state received by the first state pin, and determining a Bluetooth connection state according to the first level state;
and when the Bluetooth connection is successful, configuring the input or the output of the first state pin according to the requirement of an application mode so that the Bluetooth module enters a transparent transmission mode or an AT mode according to a second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin.
2. The method according to claim 1, wherein the method comprises the following steps: the method further comprises the following steps:
when the Bluetooth is required to be connected, the first power supply pin of the CPU is controlled to be pulled up, so that the Bluetooth module executes power-on operation according to a pull-up signal received by the second power supply pin;
when the Bluetooth is not required to be connected, the first power supply pin of the CPU is controlled to be pulled down, so that the Bluetooth module executes power-down operation according to a pull-down signal received by the second power supply pin.
3. The method according to claim 1, wherein the method comprises the following steps: the determining the bluetooth connection state according to the first level state specifically includes: when the first level state is a low level, the Bluetooth connection is considered to be successful; when the first level state is a high level, the Bluetooth connection is considered to be failed;
the configuring the input or output of the first state pin according to the application mode requirement specifically includes: when the transparent transmission mode needs to be entered, configuring the first state pin as an input suspension; and when the AT mode needs to be entered, configuring the first state pin to output a high level.
4. A method for realizing pin time-sharing multiplexing is characterized in that: the method is used for a Bluetooth module end, and comprises the following steps:
after the power is on, the Bluetooth module detects the Bluetooth connection state through a Bluetooth protocol stack, and the input of a second state pin is configured according to the Bluetooth connection state, so that the first state pin of the CPU determines the Bluetooth connection state according to the first level state after receiving the first level state;
and after the Bluetooth connection is successful, enabling the second state pin to receive the second level state of the first state pin of the CPU, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state.
5. The method for realizing pin time-sharing multiplexing according to claim 4, wherein: the input for configuring the second state pin according to the Bluetooth connection state specifically comprises: when the Bluetooth connection is successful, configuring the second state pin as an input pull-down; when the Bluetooth connection fails, configuring the second state pin as an input pull-up;
the specific step of enabling the bluetooth module to enter the corresponding application mode according to the second level state is as follows: when the second level state is a low level, enabling the Bluetooth module to enter a transparent transmission mode; and when the second level state is a high level, enabling the Bluetooth module to enter an AT mode.
6. The utility model provides a realize pin timesharing multiplex device which characterized in that: the device is a CPU and comprises a Bluetooth connection determining module and a mode configuration module;
the Bluetooth connection determining module is used for configuring a first state pin of the CPU as an input suspension after the power-on; enabling the first state pin to receive a first level state of a second state pin of the Bluetooth module, detecting the first level state received by the first state pin, and determining a Bluetooth connection state according to the first level state;
and the mode configuration module is used for configuring the input or the output of the first state pin according to the requirement of an application mode after the Bluetooth module is successfully connected so that the Bluetooth module can enter a transparent transmission mode or an AT mode according to the second level state after the second state pin of the Bluetooth module receives the second level state of the first state pin.
7. The utility model provides a realize pin timesharing multiplex device which characterized in that: the device is a Bluetooth module and comprises a Bluetooth connection configuration module and a mode entering module;
the Bluetooth connection configuration module is used for enabling the Bluetooth module to detect the Bluetooth connection state through a Bluetooth protocol stack after being powered on, and configuring the input of a second state pin according to the Bluetooth connection state, so that the first state pin of the CPU can determine the Bluetooth connection state according to a first level state after receiving the first level state;
and the mode entering module is used for enabling the second state pin to receive the second level state of the first state pin of the CPU after the Bluetooth connection is successful, detecting the second level state received by the second state pin, and enabling the Bluetooth module to enter a corresponding application mode according to the second level state.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 3 when executing the program.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 3.
CN201911265913.5A 2019-12-11 2019-12-11 Method, device, equipment and medium for realizing pin time-sharing multiplexing Active CN111182514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911265913.5A CN111182514B (en) 2019-12-11 2019-12-11 Method, device, equipment and medium for realizing pin time-sharing multiplexing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911265913.5A CN111182514B (en) 2019-12-11 2019-12-11 Method, device, equipment and medium for realizing pin time-sharing multiplexing

Publications (2)

Publication Number Publication Date
CN111182514A true CN111182514A (en) 2020-05-19
CN111182514B CN111182514B (en) 2023-06-30

Family

ID=70651947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911265913.5A Active CN111182514B (en) 2019-12-11 2019-12-11 Method, device, equipment and medium for realizing pin time-sharing multiplexing

Country Status (1)

Country Link
CN (1) CN111182514B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259999A (en) * 2012-02-20 2013-08-21 联发科技(新加坡)私人有限公司 Hot plug detection (HPD) signal output control method and high definition multimedia interface (HDMI) receiving end device and system
CN103311766A (en) * 2013-05-15 2013-09-18 深圳市文鼎创数据科技有限公司 Mobile equipment switching device and working mode switching method thereof
CN204103996U (en) * 2014-10-11 2015-01-14 上海安防电子股份有限公司 The mobile terminal device of a kind of security protection based on Bluetooth technology
CN105376758A (en) * 2015-10-09 2016-03-02 Tcl移动通信科技(宁波)有限公司 An SIM card disconnection detection method and system
CN107370978A (en) * 2017-07-12 2017-11-21 广州视源电子科技股份有限公司 A kind of control method, system and the storage medium of HDMI output equipments
CN107436854A (en) * 2017-07-20 2017-12-05 青岛海信医疗设备股份有限公司 The method and terminal being powered based on CPCI power supplys to the mainboard of terminal
CN107809272A (en) * 2017-11-22 2018-03-16 商亚锋 A kind of mobile terminal device of security protection based on Bluetooth technology
CN109239583A (en) * 2018-10-22 2019-01-18 上海艾为电子技术股份有限公司 Detect the circuit of pin floating state
CN110098826A (en) * 2019-04-19 2019-08-06 深圳市泰信通信息技术有限公司 The detection method of chip circuit and its state of a control, electronic equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259999A (en) * 2012-02-20 2013-08-21 联发科技(新加坡)私人有限公司 Hot plug detection (HPD) signal output control method and high definition multimedia interface (HDMI) receiving end device and system
CN103311766A (en) * 2013-05-15 2013-09-18 深圳市文鼎创数据科技有限公司 Mobile equipment switching device and working mode switching method thereof
CN204103996U (en) * 2014-10-11 2015-01-14 上海安防电子股份有限公司 The mobile terminal device of a kind of security protection based on Bluetooth technology
CN105376758A (en) * 2015-10-09 2016-03-02 Tcl移动通信科技(宁波)有限公司 An SIM card disconnection detection method and system
CN107370978A (en) * 2017-07-12 2017-11-21 广州视源电子科技股份有限公司 A kind of control method, system and the storage medium of HDMI output equipments
CN107436854A (en) * 2017-07-20 2017-12-05 青岛海信医疗设备股份有限公司 The method and terminal being powered based on CPCI power supplys to the mainboard of terminal
CN107809272A (en) * 2017-11-22 2018-03-16 商亚锋 A kind of mobile terminal device of security protection based on Bluetooth technology
CN109239583A (en) * 2018-10-22 2019-01-18 上海艾为电子技术股份有限公司 Detect the circuit of pin floating state
CN110098826A (en) * 2019-04-19 2019-08-06 深圳市泰信通信息技术有限公司 The detection method of chip circuit and its state of a control, electronic equipment and medium

Also Published As

Publication number Publication date
CN111182514B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN102508533B (en) Reset control device and method
CN103748569B (en) The system and method without driving operation of USB device
JP6074052B2 (en) Virtual GPIO
US9170832B2 (en) Virtual machine control apparatus and virtual machine control method
CN103645975B (en) A kind of method of abnormal restoring and serial bus transmission device
CN102799550B (en) Based on the waking up of chip chamber high-speed interface HSIC, hot-plug method and equipment
EP2372491A1 (en) Power lock-up setting method and electronic apparatus using the same
CN103345407A (en) Control circuit, connectivity controller, connectivity control method and main board
US20120131371A1 (en) Method for obtaining power states of a computer
CN102867158B (en) A kind of switch internal memory method, device and there is the terminal of dual system
CN109408126A (en) A kind of starting-up method of multipath server, BMC and multipath server
CN103778092A (en) USB and SD interface multiplex circuit and multiplex method
CN103412771A (en) Software upgrading processing method, device and system
CN103558907A (en) Electronic device and method for reducing power consumption of electronic device
CN108108314B (en) Exchanger system
CN111182514B (en) Method, device, equipment and medium for realizing pin time-sharing multiplexing
KR102428450B1 (en) Host controller, secure element and serial peripheral interface
CN112948297B (en) Screen control method and device, double-screen terminal equipment and storage medium
US8954717B2 (en) System capable of booting through a universal serial bus device and method thereof
CN112615739B (en) Method and system for adapting OCP3.0 network card in multi-host application environment
CN105446912A (en) Method and device of CPU (Central Processing Unit) for connecting WIFI module through HSIC (High Speed Inter-chip) bus interface
CN112433971A (en) Structure, method and medium for realizing processor self-adaptive SATA and NVME M.2
CN108388481B (en) Intelligent watchdog circuit system of OLT equipment
KR20200057158A (en) A receiving apparatus for recovering clock failure and transmission system including the same
CN102193609A (en) Setting method for power supply locking and electronic device 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