CN110888829A - Method for starting up and awakening communication module through serial port - Google Patents
Method for starting up and awakening communication module through serial port Download PDFInfo
- Publication number
- CN110888829A CN110888829A CN201911211161.4A CN201911211161A CN110888829A CN 110888829 A CN110888829 A CN 110888829A CN 201911211161 A CN201911211161 A CN 201911211161A CN 110888829 A CN110888829 A CN 110888829A
- Authority
- CN
- China
- Prior art keywords
- signal
- serial port
- mcu
- communication module
- starting
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
Abstract
The invention discloses a method for starting up and awakening a communication module through a serial port, which belongs to the technical field of communication modules.A D trigger circuit is adopted to convert a TX signal of an MCU serial port into a starting up/awakening signal aiming at the communication module, and meanwhile, after the module is started up/awakened, the starting up/awakening signal is controlled to be turned off through GPIO output; the MCU _ TX is connected to the L620C _ RX and simultaneously connected to the CLK signal of the D flip-flop, and the D signal of the D flip-flop is connected to VCC; according to the invention, in the terminal of the Internet of things, the MCU part and the wireless communication part can realize the functions of communication, starting and awakening only by connecting the serial ports, so that the IO port resource of the MCU is saved, the signal wires connected between the MCU and the wireless communication module are reduced, the problem that only two serial ports RX/TX signal wires are connected between the MCU module and the wireless communication module to realize awakening and communication is solved, and the condition that the wireless module is shut down accidentally is protected.
Description
Technical Field
The invention relates to the technical field of communication modules, in particular to a method for starting up and awakening a communication module through a serial port.
Background
Under the large background of the internet of everything, various internet of things terminals using wireless communication modules such as 2G, 3G, 4G, NB and the like as data transmission means are developed vigorously. The circuit core module of a general internet of things terminal is an MCU for realizing practical application and a communication module for realizing a wireless communication function, the MCU controls the communication module through a UART interface and an IO interface, wherein the UART interface is used for carrying out AT command and data communication, and the IO interface generally mainly comprises a starting control pin and a wake-up pin.
After the power-on of the wireless communication module, the power-on control pin needs to be pulled down for a short time to complete the power-on action, and then the power-on control pin needs to be pulled up again to keep the normal working state. If the power-on pin is pulled down for a long time, the module will be powered off or restarted. Take NB-IoT module L620C as an example (as shown in fig. 2): a30 th PIN (PWRKEY) of the module is a hardware starting input end, when the module is powered on, the module can be released after being pulled down for 300 ms-1 s, so that the module is started, a PIN30(PWRKEY) of the module is pulled down for 8 s-11 s to trigger the module to be shut down, and the shutdown process can be completed within 1 s. Pulling PWRKEY low while the module is in deep sleep (deep sleep) mode may cause the module to exit deep sleep mode. The module 3 rd pin (RTC _ EINT) is a wake-up pin, and when a user needs the module to exit the deep sleep mode, a low level lasting 80ms is input to the pin to trigger module wake-up. Therefore, 3-4 signal lines are generally required between the MCU and the communication module under this condition.
However, in some circuits of the internet of things terminal, the IO port resources of the MCU are very tight, and pins for starting up and waking up the module cannot be provided; in addition, in some application occasions, the MCU control module and the wireless communication module communicate in a long distance in a UART-RS232-UART mode, so that the IO ports for starting and waking up are inconvenient to convert into long-distance cables. Under the application scenes, a method for realizing the startup and awakening actions of the MCU on the wireless communication module through the serial port is really needed, the wireless communication module can be prevented from being shut down due to some unexpected conditions, and the wireless communication module can be started up protectively during the next communication.
Disclosure of Invention
The invention aims to provide a method for starting up and waking up a communication module through a serial port, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a method for starting up and waking up a communication module through a serial port adopts a D trigger circuit to convert a TX signal of an MCU serial port into a starting up/waking up signal aiming at the communication module, and simultaneously, after the module is started up/woken up, the starting up/waking up signal is turned off through GPIO output control;
the TX signal of the MCU serial port is connected with an RX signal of the L620C serial port and simultaneously connected with a CLK signal of the D trigger, the D signal of the D trigger is connected with VCC, the PR signal of the D trigger is connected with a GPIO signal of the L620C serial port and simultaneously connected with a pull-down resistor of 10K omega, and the/Q signal of the D trigger is connected with a PWRKEY signal of the L620C serial port.
Preferably: when the L620C is in shutdown or deep sleep, the external I/O ports are all closed and in a floating state, so the PR pin of the D flip-flop is pulled down to low level at this time, resulting in high level of/Q output.
Preferably: the MCU needs to send a data/AT command to the L620C, and first sends any wake-up data, and generates a rising edge waveform AT the TX pin, i.e., the CLK pin of the D flip-flop, which will cause the/Q output low level, and pull down the L620C _ PWRKEY to perform the power-on/wake-up action.
Preferably: after the L620C is powered on/awakened, software is executed, the L620C _ GPIO is set to output high level, the/Q of the D trigger is forcibly set to high level through the PR pin, so that the phenomenon of shutdown or restart caused by long-time pulling down of the L620C _ PWRKEY is avoided, and then the MCU can communicate with a normal serial port of the L620C.
Preferably: the MCU and the L620C finish communication, after a period of time, the L620C enters deep sleep, the L620C _ GPIO is closed to be in a floating state, the PR pin of the D trigger is pulled down to be in a low level, the state returns to the step one, and the MCU can generate the low level on the Q pin through the rising edge on the TX to start up/wake up the L620.
Compared with the prior art, the invention has the beneficial effects that:
1) according to the invention, the MCU part and the wireless communication part in the terminal of the Internet of things can realize the functions of communication, starting and awakening only by connecting serial ports, so that the IO port resource of the MCU is saved and signal wires connected between the MCU and the wireless communication module are reduced;
2) the invention solves the problem that only two signal wires of a serial port RX/TX are connected between the MCU module and the wireless communication module to realize awakening and communication;
3) the invention protects the condition that the wireless module is accidentally powered off (the MCU carries out a power-on time sequence every time when sending data to the wireless communication module).
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a circuit serial port connection of an Internet of things terminal according to the invention;
fig. 2 is a schematic diagram of a circuit serial port connection of a terminal of the existing internet of things.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, the present invention provides a technical solution: a method for starting up and waking up a communication module through a serial port adopts a D trigger circuit to convert a TX signal of an MCU serial port into a starting up/waking up signal aiming at the communication module, and simultaneously, after the module is started up/woken up, the starting up/waking up signal is turned off through GPIO output control;
the MCU _ TX is connected to L620C _ RX and simultaneously connected to a CLK signal of a D flip-flop, a D signal of the D flip-flop is connected to VCC, a PR signal of the D flip-flop is connected to L620C _ GPIO and simultaneously connected to a pull-down resistor of 10K, and a/Q signal of the D flip-flop is connected to L620C _ PWRKEY;
the method comprises the following steps: when the L620C is in shutdown or deep sleep, the external I/O port is completely closed and is in a floating state, so that the PR pin of the D trigger is pulled down to be at a low level at the moment, and the/Q output is at a high level;
step two: the MCU needs to send a data/AT command to the L620C, firstly sends any awakening data, generates a rising edge waveform AT a TX pin, namely a CLK pin of the D trigger, and causes a/Q output low level to be pulled down, and the L620C _ PWRKEY is pulled down to execute a power-on/awakening action;
step three: after the L620C is started up/awakened, software is executed, the L620C _ GPIO is set to output high level, the Q/of the D trigger is forcibly set to be high level through the PR pin, so that the phenomenon of shutdown or restart caused by long-time pull-down of the L620C _ PWRKEY is avoided, and then the MCU can communicate with a normal serial port of the L620C;
step four: the MCU completes communication with L620C, after a while, L620C goes into deep sleep, L620C _ GPIO is turned off to a floating state, PR pin of D flip-flop is pulled down to low level, after which the state returns to step one, MCU can turn on/wake up L620 by generating low level on/Q pin by rising edge on TX.
According to the invention, the MCU part and the wireless communication part in the terminal of the Internet of things can realize the functions of communication, starting and awakening only by connecting serial ports, so that the IO port resource of the MCU is saved and signal wires connected between the MCU and the wireless communication module are reduced; the problem that awakening and communication can be realized only by connecting two serial ports RX/TX signal wires between an MCU module and a wireless communication module is solved; the wireless module is protected from being accidentally turned off (a turn-on sequence is performed every time the MCU sends data to the wireless communication module).
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims (5)
1. A method for starting up and waking up a communication module through a serial port is characterized in that: a D trigger circuit is adopted to convert a TX signal of an MCU serial port into a starting/waking signal aiming at a communication module, and the starting/waking signal is turned off through GPIO output control after the module is started/wakened;
the TX signal of the MCU serial port is connected with an RX signal of the L620C serial port and simultaneously connected with a CLK signal of the D trigger, the D signal of the D trigger is connected with VCC, the PR signal of the D trigger is connected with a GPIO signal of the L620C serial port and simultaneously connected with a pull-down resistor of 10K omega, and the/Q signal of the D trigger is connected with a PWRKEY signal of the L620C serial port.
2. The method for booting and waking up the communication module through the serial port according to claim 1, characterized in that: when the L620C is in shutdown or deep sleep, the external I/O ports are all closed and in a floating state, so the PR pin of the D flip-flop is pulled down to low level at this time, resulting in high level of/Q output.
3. The method for booting and waking up the communication module through the serial port according to claim 1, wherein: the MCU needs to send a data/AT command to the L620C, and first sends any wake-up data, and generates a rising edge waveform AT the TX pin, i.e., the CLK pin of the D flip-flop, which will cause the/Q output low level, and pull down the L620C _ PWRKEY to perform the power-on/wake-up action.
4. The method for booting and waking up the communication module through the serial port according to claim 1, wherein: after the L620C is powered on/awakened, software is executed, the L620C _ GPIO is set to output high level, the/Q of the D trigger is forcibly set to high level through the PR pin, so that the phenomenon of shutdown or restart caused by long-time pulling down of the L620C _ PWRKEY is avoided, and then the MCU can communicate with a normal serial port of the L620C.
5. The method for booting and waking up the communication module through the serial port according to claim 1, wherein: the MCU and the L620C finish communication, after a period of time, the L620C enters deep sleep, the L620C _ GPIO is closed to be in a floating state, the PR pin of the D trigger is pulled down to be in a low level, the state returns to the step one, and the MCU can generate the low level on the Q pin through the rising edge on the TX to start up/wake up the L620.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911211161.4A CN110888829B (en) | 2019-12-02 | 2019-12-02 | Method for starting up and awakening communication module through serial port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911211161.4A CN110888829B (en) | 2019-12-02 | 2019-12-02 | Method for starting up and awakening communication module through serial port |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110888829A true CN110888829A (en) | 2020-03-17 |
CN110888829B CN110888829B (en) | 2021-03-26 |
Family
ID=69749900
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911211161.4A Active CN110888829B (en) | 2019-12-02 | 2019-12-02 | Method for starting up and awakening communication module through serial port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110888829B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023207187A1 (en) * | 2022-04-24 | 2023-11-02 | 深圳市广和通无线股份有限公司 | Upper computer wake-up methods, apparatus and system, electronic device, and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060164455A1 (en) * | 2004-05-27 | 2006-07-27 | Silverbrook Research Pty Ltd | Printhead module having operation controllable on basis of thermal sensors |
CN2852596Y (en) * | 2005-12-12 | 2006-12-27 | 王同先 | Intelligent lighting energy-saving control device |
CN101127023A (en) * | 2006-08-17 | 2008-02-20 | 四川维肯电子有限公司 | Universal asynchronous serial extended chip of multi-bus interface |
US20080212709A1 (en) * | 2007-03-02 | 2008-09-04 | Qualcomm Incorporated | Three phase and polarity encoded serial interface |
CN201926924U (en) * | 2011-01-04 | 2011-08-10 | 福建星网锐捷通讯股份有限公司 | Remote vehicle-mounted diagnosis and positioning system based on CAN bus and K-line |
CN102681953A (en) * | 2011-03-15 | 2012-09-19 | 联芯科技有限公司 | Direct memory access device and data receiving method thereof |
WO2013131228A1 (en) * | 2012-03-05 | 2013-09-12 | Rong Weihua | Digital television and system for achieving serial communications |
CN103309711A (en) * | 2013-06-18 | 2013-09-18 | 天津七一二通信广播有限公司 | Bootstrap loader circuit based on USB interface |
US8909852B1 (en) * | 2011-12-30 | 2014-12-09 | Google Inc. | Disabling write protection on a serial peripheral interface chip |
CN205193783U (en) * | 2015-09-25 | 2016-04-27 | 广州市星翼电子科技有限公司 | Circuit is downloaded to a singlechip key |
CN108958119A (en) * | 2018-07-23 | 2018-12-07 | 欣旺达电动汽车电池有限公司 | A kind of logic control scheme of battery management system auto sleep |
-
2019
- 2019-12-02 CN CN201911211161.4A patent/CN110888829B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060164455A1 (en) * | 2004-05-27 | 2006-07-27 | Silverbrook Research Pty Ltd | Printhead module having operation controllable on basis of thermal sensors |
CN2852596Y (en) * | 2005-12-12 | 2006-12-27 | 王同先 | Intelligent lighting energy-saving control device |
CN101127023A (en) * | 2006-08-17 | 2008-02-20 | 四川维肯电子有限公司 | Universal asynchronous serial extended chip of multi-bus interface |
US20080212709A1 (en) * | 2007-03-02 | 2008-09-04 | Qualcomm Incorporated | Three phase and polarity encoded serial interface |
CN201926924U (en) * | 2011-01-04 | 2011-08-10 | 福建星网锐捷通讯股份有限公司 | Remote vehicle-mounted diagnosis and positioning system based on CAN bus and K-line |
CN102681953A (en) * | 2011-03-15 | 2012-09-19 | 联芯科技有限公司 | Direct memory access device and data receiving method thereof |
US8909852B1 (en) * | 2011-12-30 | 2014-12-09 | Google Inc. | Disabling write protection on a serial peripheral interface chip |
WO2013131228A1 (en) * | 2012-03-05 | 2013-09-12 | Rong Weihua | Digital television and system for achieving serial communications |
CN103309711A (en) * | 2013-06-18 | 2013-09-18 | 天津七一二通信广播有限公司 | Bootstrap loader circuit based on USB interface |
CN205193783U (en) * | 2015-09-25 | 2016-04-27 | 广州市星翼电子科技有限公司 | Circuit is downloaded to a singlechip key |
CN108958119A (en) * | 2018-07-23 | 2018-12-07 | 欣旺达电动汽车电池有限公司 | A kind of logic control scheme of battery management system auto sleep |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023207187A1 (en) * | 2022-04-24 | 2023-11-02 | 深圳市广和通无线股份有限公司 | Upper computer wake-up methods, apparatus and system, electronic device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110888829B (en) | 2021-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2017234405A1 (en) | Adaptive peripheral component interconnect express link substate initiation for optimal performance and power savings | |
US8195966B2 (en) | Electronic device for reducing power consumption during off of computer motherboard | |
CN109218785B (en) | Awakening method and system for intelligent television in standby state | |
US20120027061A1 (en) | Wireless modem device, wireless modem system, wireless modem device sleep/wake-up method, and terminal | |
CN101365998B (en) | Power conservation | |
CN110888829B (en) | Method for starting up and awakening communication module through serial port | |
CN105051712A (en) | Two-wire serial interface and protocol | |
WO2019119983A1 (en) | Control system for controlling smart system to lower power consumption on basis of bluetooth device | |
TW201822476A (en) | Receiver circuit with low power consumption and method for reducing power consumption of receiver system | |
CN210534715U (en) | Circuit for preventing computer from being halted due to long-time pressing of POWER key | |
CN114020138B (en) | Micro control unit chip and method for reducing electric quantity consumption | |
CN115639897A (en) | Real-time voltage control module | |
CN102981588B (en) | System and method capable of starting up through universal sequence bus device | |
JP7300667B2 (en) | Energy saving hub | |
CN220671926U (en) | PMU, wake-up circuit and MCU | |
CN204537119U (en) | A kind of touch-controlled electronic devices | |
CN212749586U (en) | Circuit for realizing edge-triggered wake-up conversion in NB-IOT system | |
CN116126117B (en) | Automatic management system and method for on-chip power consumption | |
CN110633002A (en) | Processing circuit and power management method thereof | |
CN111722559B (en) | Low-power-consumption processing method based on DSP and FPGA architecture | |
CN213582075U (en) | Remote starting circuit structure applied to computer mainboard | |
CN212969636U (en) | Integrated circuit based on wireless communication module | |
CN217388529U (en) | Control circuit, encryption chip and electronic equipment | |
CN114100156B (en) | Control method and system for electricity utilization state of electronic building block and building block system | |
CN114416190B (en) | Android device and computer USB linkage dormancy awakening circuit |
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 |