How to keep USB charging mode

By modifying the status of the configuration module and locking module in the USB charging system, it is ensured that the charging mode remains unchanged during system initialization, which solves the problem of unstable output caused by changes in charging mode and improves the stability during charging.

CN118672375BActive Publication Date: 2024-10-22成都星拓微电子科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162818.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-10-22
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the USB charging protocol, the charging mode will change when the system is initialized or reset, causing the charging port output to be unstable and unable to meet the growing demand for high-speed charging.

Method used

By modifying the register in the configuration module, unlock the locked module, make the configuration holding module in an updateable state, send the configuration value to the storage module, and lock it after locking to ensure that the charging mode remains unchanged during system initialization.

Benefits of technology

Maintaining the USB charging mode before powering on and after powering off improves the output stability during charging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672375B_ABST
    Figure CN118672375B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for maintaining a USB charging mode. To avoid inconsistency of the charging mode when powering on and off, the method for maintaining the USB charging mode of the present invention comprises: modifying a register associated with selecting a charging mode in a configuration module, obtaining a configuration value of a configuration module in the configuration module; unlocking a locking module, so that the configuration holding module is in an updateable state; sending the configuration value of the configuration module to the configuration holding module, and writing the configuration value of the configuration module into a storage module in the configuration holding module, and then locking the locking module; and a charging mode selection module selects and executes a charging mode indicated by the configuration value of the configuration module stored in the storage module according to the configuration value of the configuration module stored in the storage module in the configuration holding module. The present invention does not change the charging mode, and can improve the stability of USB charging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of power management, and in particular to a method for maintaining a USB charging mode. Background Art

[0002] USB (Universal Serial Bus) is a new generation interface standard jointly launched by world-renowned computer and communication companies. It is a high-speed, flexible serial communication bus interface designed to solve the contradiction between the increasing number of PC peripherals and the limited motherboard slots and ports. The USB interface speed is divided into low speed, full speed, high speed and super speed, corresponding to USB 1.0, USB 1.1, USB 2.0 and USB 3.0 standards respectively. Among them, USB 3.0 is further subdivided into GEN1 and GEN2 versions, and the latest USB 4 represents a technological innovation.

[0003] Although USB was originally designed for desktop computers and not for mobile environments, its software architecture ensures that USB has wide scalability in the future by supporting various host controllers. As a cable bus, USB supports data transmission between the host and various plug-and-play peripherals. Through standard protocols predetermined by the host, each device can share the USB bandwidth. In addition, during the operation of the host and other devices, the USB bus allows the dynamic addition, configuration, use and removal of peripherals, which greatly improves the convenience of use.

[0004] BC1.2 (Battery Charging v1.2) is a battery charging protocol developed by the Battery Charging (BC) group under the USB Implementers Forum (USB-IF). The main purpose of this protocol is to standardize the requirements for battery charging, and it was originally implemented based on the USB 2.0 protocol. However, the USB 2.0 protocol stipulates that the maximum current that an external device can draw from a USB charger is 500mA, and this limitation can no longer meet the growing demand for high-speed charging.

[0005] To solve this problem, the BC1.2 protocol introduces a charging port identification mechanism, which defines the following USB charging port types: Standard Downstream Port (SDP), Charging Downstream Port (CDP) and Dedicated Charging Port (DCP). Through software configuration, you can select different USB charging port types, that is, select SDP charging mode, CDP charging mode or DCP charging mode to meet different charging needs.

[0006] However, in the current BC1.2 battery charging protocol, each host has a certain charging mode. When the entire system is initialized or reset, the charging mode will be initialized directly, resulting in constant changes in the USB charging port type, which in turn affects the output stability of the charging port. Summary of the invention

[0007] In order to alleviate or partially alleviate the above technical problems, the solution of the present invention is as follows:

[0008] A method for maintaining a USB charging mode comprises the following steps: modifying a register associated with selecting a charging mode in a configuration module to obtain a configuration value of a configuration module in the configuration module; unlocking a locking module to place the configuration maintaining module in an updateable state; sending the configuration value of the configuration module to the configuration maintaining module, and writing the configuration value of the configuration module into a storage module in the configuration maintaining module, and then locking the locking module; and a charging mode selection module selects and executes a charging mode indicated by the configuration value of the configuration module stored in the storage module according to the configuration value of the configuration module stored in the storage module in the configuration maintaining module.

[0009] Furthermore, the USB charging mode includes: SDP charging mode, CDP charging mode and DCP charging mode.

[0010] Further, the configuration maintenance module also includes a storage data input module;

[0011] When the locking module is in the unlocking state, the storage data input module writes the configuration value of the configuration module into the storage module in the configuration holding module through a predetermined timing.

[0012] Further, the configuration maintenance module also includes a storage protection module;

[0013] The storage protection module ensures that the data in the storage module is not rewritten by sending an interrupt to the storage module.

[0014] Further, when powered on, the configuration values ​​of the configuration modules in the configuration module are changed during the initialization process.

[0015] Further, the configuration value of the configuration module stored in the storage module in the configuration holding module at power-on is the same as the configuration value of the configuration module stored in the storage module in the configuration holding module at the last power-off.

[0016] Furthermore, after the locking module is locked, the configuration value of the configuration module in the configuration module cannot be sent to the configuration holding module.

[0017] The technical solution of the present invention has the following beneficial technical effects:

[0018] Maintaining the USB charging mode unchanged before power on and after power off improves the output stability during USB charging.

[0019] In addition, other beneficial effects of the present invention will be mentioned in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a system block diagram of the present invention for maintaining USB charging mode;

[0021] Figure 2 It is a block diagram of the configuration holding module of the present invention;

[0022] Figure 3 It is a flow chart of the method for maintaining USB charging mode of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. 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.

[0024] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

[0025] Figure 1 The system block diagram of the present invention for maintaining the USB charging mode includes a configuration module, a locking module, a configuration maintaining module and a charging mode selection module.

[0026] The configuration module includes the configuration value of the configuration module, that is, the configuration value of the configuration module in the configuration module. After the entire system is powered on again, the configuration module will be initialized and the configuration value of the configuration module will change.

[0027] Locking module, in unlocked state, the configuration value of the configuration module can be transmitted to the configuration holding module; in locked state, the configuration value of the configuration module in the configuration holding module will not change in real time with the change of the configuration module.

[0028] The configuration holding module comprises a storage module, in which the configuration value of the configuration module is stored. The configuration value of the configuration module stored in the storage module will not be changed due to the initialization of the entire system.

[0029] The charging mode selection module selects and executes the charging mode.

[0030] Figure 2 The configuration and maintenance module of the present invention is a block diagram. The configuration and maintenance module specifically includes a storage module, a storage data input module and a storage protection module.

[0031] When the locking module is in the unlocked state, the storage data input module stores the configuration value of the configuration module into the storage module in the configuration holding module through a predetermined timing sequence, and the storage protection module sends an interrupt to the storage module to ensure that the data in the storage module is not rewritten.

[0032] Figure 3 It is a flow chart of the method for maintaining USB charging mode of the present invention.

[0033] First, the charging mode of the configuration module is configured by software configuration, that is, the configuration value of the configuration module is obtained. Generally, at this time, a suitable charging mode is selected according to needs. For example, the SDP charging mode, the CDP charging mode or the DCP charging mode is selected.

[0034] Then, the locking module is unlocked, and the configuration value of the configuration module is transmitted to the configuration holding module.

[0035] After the configuration holding module completes the update of the configuration value of the configuration module, it locks the locking module. After that, the configuration value of the configuration module in the configuration holding module will not change with the state of the configuration module as in the prior art. In other words, the configuration value of the configuration module in the configuration holding module will not change with the initialization in various scenarios, and will be locked and remain unchanged, even if the configuration module undergoes initialization. This is the basis for ensuring the stability of the charging mode.

[0036] For example, assume that after the entire system is initialized, the configuration value of the configuration module in the configuration module is initialized to the SDP charging mode. By configuring or modifying the register associated with the selected charging mode through software, the configuration value of the configuration module in the configuration module is modified to the CDP charging mode, and the locking module is unlocked, so that the configuration holding module is in an updateable state. Then, the configuration value of the configuration module is sent to the configuration holding module, and then the locking module is locked.

[0037] Finally, by configuring the configuration value of the configuration module in the configuration holding module, the charging mode selection module is controlled to select and execute the charging mode indicated by the configuration value of the configuration module stored in the storage module in the configuration holding module, such as the CDP charging mode.

[0038] After locking the locking module, the configuration value of the configuration module in the configuration holding module will not be affected by the configuration value of the configuration module in the configuration module, so the charging mode selection module will still maintain the charging mode before power-off when it is powered on next time, thereby keeping the USB charging mode stable.

[0039] In order to better illustrate the present invention, numerous specific details are provided in the above specific embodiments. It should be understood by those skilled in the art that the present invention can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

[0040] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for maintaining USB charging mode, characterized in that: The steps include: Modify a register associated with selecting a charging mode in the configuration module to obtain a configuration value of the configuration module in the configuration module; Unlock the locked module so that the configuration holding module is in an updateable state; Sending the configuration value of the configuration module to the configuration holding module, and writing the configuration value of the configuration module into the storage module in the configuration holding module, and then locking the locking module; The charging mode selection module selects and executes the charging mode indicated by the configuration value of the configuration module stored in the storage module according to the configuration value of the configuration module stored in the storage module in the configuration holding module.

2. The method for maintaining USB charging mode according to claim 1, characterized in that: The USB charging mode includes: SDP charging mode, CDP charging mode and DCP charging mode.

3. The method for maintaining USB charging mode according to claim 2, characterized in that: The configuration maintenance module also includes a storage data input module; When the locking module is in the unlocking state, the storage data input module writes the configuration value of the configuration module into the storage module in the configuration holding module through a predetermined timing.

4. The method for maintaining USB charging mode according to claim 3, characterized in that: The configuration maintenance module also includes a storage protection module; The storage protection module ensures that the data in the storage module is not rewritten by sending an interrupt to the storage module.

5. The method for maintaining USB charging mode according to claim 4, characterized in that: When powered on, the configuration values ​​of the configuration modules in the configuration module are changed during the initialization process.

6. The method for maintaining USB charging mode according to claim 5, characterized in that: The configuration value of the configuration module stored in the storage module in the configuration holding module at power-on is the same as the configuration value of the configuration module stored in the storage module in the configuration holding module at the last power-off.

7. The method for maintaining USB charging mode according to claim 6, characterized in that: When the locking module is locked, the configuration value of the configuration module in the configuration module cannot be sent to the configuration holding module.