Low-power UART communication system and method
By introducing the clock control module in the UART communication system, the dynamic management of sending modules and the opening and closing of the receiving module solve the problem of UART's high power consumption in idle conditions, and realize low -power UART communication.
Patent Information
- Application Number
- CN202411500131.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
AI Technical Summary
In electronic systems with low power consumption requirements, UART communication consumes a high power consumption in idle state, which requires saving power consumption.
Design a low -power UART communication system, turn on the sending module and receiving module through the clock control module during the UART communication, and turn off these modules during UART idle.
Effectively saved the power consumption of UART in the idle state, and only dynamically enable the module when the communication needs to reduce unnecessary power consumption.
Smart Images

Figure CN119383701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of UART (Universal Asynchronous Receiver / Transmitter) communication technology, and in particular to a low-power UART communication system and method. Background Art
[0002] In electronic systems, there are many protocols for inter-chip communication, among which UART is a commonly used data frame structure, such as Figure 1 shown.
[0003] The UART data frame is used to form a multi-byte data packet to realize chip communication. The first data frame in the data packet is usually fixed data (such as 0x55) to allow the receiving end to identify the baud rate used by the current data packet. Figure 2 shown.
[0004] Usually, UART communication in electronic systems is only performed when there is a need to update configuration or obtain internal information of the chip. Under normal working conditions, UART communication is in an idle state, such as Figure 3 shown.
[0005] UART communication in electronic systems is asynchronous serial data transmission and reception. The chip supporting UART communication must have a system clock inside to control the reception and transmission of communication data. The higher the baud rate of UART communication, the faster the internal clock frequency of the chip supporting UART communication is required. In electronic systems with low power consumption requirements, it is necessary to save the power consumption of UART in idle state. When the internal system clock of the chip supporting UART communication is 32 MHz and the operating voltage is 5V, the power consumption saved is in the milliampere level. Summary of the invention
[0006] The present invention aims to provide a low-power UART communication system and method to save the power consumption of the UART in an idle state.
[0007] A low-power UART communication system provided by the present invention includes a clock control module, wherein the clock control module is used for:
[0008] During UART communication, the sending module and the receiving module are turned on through clock control;
[0009] During the UART idle period, the sending module and the receiving module are turned off through clock control.
[0010] In some embodiments, the clock control module performs clock control through a 0x55 data structure.
[0011] In some embodiments, when the sending module and the receiving module are turned on by clock control, the default level of the UART when idle is the IDLE high level. Based on the data structure of 0x55, when communication starts, a start bit with a width of 1 bit is sent first, and the start bit is a low level. At the falling edge of the start bit from the IDLE high level to the low level, the clock control module outputs a clock signal, and the receiving module and the sending module are turned on by enabling the start bit.
[0012] In some embodiments, the baud rate identification module needs to calculate the baud rate based on the 8-bit width after the start bit.
[0013] In some embodiments, when the sending module and the receiving module are turned off by clock control,
[0014] If there is no need to reply to the sent data after receiving, the sending module and the receiving module will be closed immediately;
[0015] If the data needs to be sent back after receiving, the receiving module will be turned off immediately after receiving, and the clock will be turned off after sending.
[0016] The present invention also provides a low-power UART communication method, comprising:
[0017] During UART communication, the sending module and the receiving module are turned on through clock control;
[0018] During the UART idle period, the sending module and the receiving module are turned off through clock control.
[0019] In some embodiments, the clock control module performs clock control through a 0x55 data structure.
[0020] In some embodiments, the default level when the UART is idle is the IDLE high level. When the sending module and the receiving module are to be turned on through clock control, based on the data structure of 0x55, a start bit with a width of 1 bit is first sent, and the start bit is at a low level. At the falling edge of the start bit from the IDLE high level to the low level, the sending module and the receiving module are turned on.
[0021] In some embodiments, the baud rate identification module needs to calculate the baud rate based on the 8-bit width after the start bit.
[0022] In some embodiments, when the sending module and the receiving module are turned off by clock control,
[0023] If there is no need to reply to the sent data after receiving, the sending module and the receiving module will be closed immediately;
[0024] If the data needs to be sent back after receiving, the receiving module will be turned off immediately after receiving, and the clock will be turned off after sending.
[0025] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0026] In the present invention, when the UART is idle, only the clock control module has dynamic power consumption, and the logic function of this part is relatively small, and the power consumption is much less than that of the receiving module and the sending module, so the power consumption of the UART in the idle state can be saved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of the UART basic data frame.
[0028] Figure 2 This is a schematic diagram of the UART data packet.
[0029] Figure 3 This is a schematic diagram of the UART communication interval.
[0030] Figure 4 Schematic diagram of a low-power UART communication system in an embodiment of the present invention.
[0031] Figure 5 Schematic diagram of the data structure of 0x55 in an embodiment of the present invention.
[0032] Figure 6 Schematic diagram of a complete UART communication clock switch in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0034] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Example
[0036] like Figure 1 As shown, this embodiment provides a low-power UART communication system, including a clock control module, wherein the clock control module is used to:
[0037] During UART communication, the sending module and the receiving module are turned on through clock control;
[0038] During the UART idle period, the sending module and the receiving module are turned off through clock control.
[0039] That is, by adding a clock control module to the traditional UART function module, the entire low-power UART communication system is Figure 4 As shown, the clock control module manages the clocks of the receiving module and the sending module. During the UART idle period, the clock control module turns off the clocks of the receiving module and the sending module. When the UART communication system needs to receive or send data, the clocks of the receiving module and the sending module are turned on. The receiving module completes the reception of UART communication data, and the sending module completes the sending of UART communication data.
[0040] like Figure 4 In the UART communication system shown, only the clock control module has dynamic power consumption when the UART is idle. The logic function of this part is relatively small, and the power consumption is much less than that of the receiving module and the sending module.
[0041] Figure 4 The specific implementation of the clock control module is described as follows:
[0042] (1) Conditions for clock activation:
[0043] When the sending module and receiving module are turned on by clock control, the default level of UART is IDLE high level when it is idle, based on a 0x55 data structure, such as Figure 5 As shown, when communication starts, a 1-bit start bit is sent first, and the start bit is at a low level. At the falling edge of the start bit from the IDLE high level to the low level, the clock control module outputs a clock signal, and the receiving module and the sending module are turned on by enabling the start bit.
[0044] Due to the delay in clock start, the clock acquisition width will have a large error during the start bit. Therefore, the baud rate recognition module in the receiving module will ignore the start bit and need to calculate the baud rate based on the 8-bit width from bit0 to bit7.
[0045] It should be noted that among the 8 bits from bit0 to bit7, there are 4 high levels and 4 low levels, and the high and low levels are balanced, which can eliminate the impact of high and low levels.
[0046] (2) Conditions for clock shutdown:
[0047] After the clock is turned on, the receiving module and the sending module work normally. The conditions for turning off the clock can be set according to the specific application scenario. In this embodiment, the settings are as follows:
[0048] If there is no need to reply to the sending data UART_TXD after receiving the data UART_RXD is completed, the sending module and the receiving module are immediately closed;
[0049] If the receiving data UART_RXD needs to reply the sending data UART_TXD after the receiving data is completed, the receiving module will be turned off immediately after the receiving is completed, and the clock will be turned off after the sending is completed, such as Figure 6 shown.
[0050] Based on the same inventive concept, this embodiment also provides a low-power UART communication method, including:
[0051] During UART communication, the sending module and the receiving module are turned on through clock control;
[0052] During the UART idle period, the sending module and the receiving module are turned off through clock control.
[0053] The principle of the low-power UART communication method is described in the aforementioned low-power UART communication system, which will not be repeated here.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A low-power UART communication system, characterized in that: A clock control module is included, and the clock control module is used for: During UART communication, the sending module and the receiving module are turned on through clock control; During the UART idle period, the sending module and the receiving module are turned off through clock control.
2. The low-power UART communication system according to claim 1, characterized in that: The clock control module performs clock control via a 0x55 data structure.
3. The low-power UART communication system according to claim 2, characterized in that: When the sending module and the receiving module are turned on by clock control, the default level of the UART when idle is the IDLE high level. Based on the data structure of 0x55, when communication starts, a 1-bit start bit is sent first, and the start bit is a low level. At the falling edge of the start bit from the IDLE high level to the low level, the clock control module outputs a clock signal, and the receiving module and the sending module are turned on by enabling the start bit.
4. The low-power UART communication system according to claim 3, characterized in that: The baud rate recognition module needs to calculate the baud rate based on the 8-bit width after the start bit.
5. The low-power UART communication system according to claim 1, characterized in that: To shut down the sending and receiving modules through clock control, If there is no need to reply to the sent data after receiving, the sending module and the receiving module will be closed immediately; If the data needs to be sent back after receiving, the receiving module will be turned off immediately after receiving, and the clock will be turned off after sending.
6. A low-power UART communication method, characterized in that: include: During UART communication, the sending module and the receiving module are turned on through clock control; During the UART idle period, the sending module and the receiving module are turned off through clock control.
7. The low-power UART communication method according to claim 6, characterized in that: The clock control module performs clock control via a 0x55 data structure.
8. The low-power UART communication method according to claim 7, characterized in that: When UART is idle, the default level is IDLE high level. When the sending module and the receiving module are turned on by clock control, based on the data structure of 0x55, a 1-bit start bit is sent first, and the start bit is low level. At the falling edge of the start bit from IDLE high level to low level, the sending module and the receiving module are turned on.
9. The low-power UART communication method according to claim 8, characterized in that: The baud rate recognition module needs to calculate the baud rate based on the 8-bit width after the start bit.
10. The low-power UART communication method according to claim 6, characterized in that: To shut down the sending and receiving modules through clock control, If there is no need to reply to the sent data after receiving, the sending module and the receiving module will be closed immediately; If the data needs to be sent back after receiving, the receiving module will be turned off immediately after receiving, and the clock will be turned off after sending.