A method, device and computer-readable storage medium for identifying charging type

By establishing a channel for charging type recognition in the terminal device, the problem of interference between the main chip of the baseband and the charging chip is solved, and the user experience of accurate charging type detection and upgrading is realized.

CN111049202BActive Publication Date: 2025-01-28XIAN ZHONGXING NEW SOFTWARE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811183634.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-11
Publication Date
2025-01-28
Estimated Expiration
2039-02-28

AI Technical Summary

Technical Problem

The baseband main chip and the external charging chip interfere with each other, resulting in an error in charging type detection and affecting the user experience.

Method used

By detecting the detection signal connected to the charger, establish the first path dedicated to charging type recognition, and disconnect the second channel used for data communication to avoid interference and accurately identify the charging type of charger.

Benefits of technology

Effectively prevent the charging type identification error, improve the user experience, and ensure the accuracy of the charging type detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111049202B_ABST
    Figure CN111049202B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for identifying charging type, detecting connection to a charger, generating an insertion detection signal based on the charger; establishing a first path and disconnecting a second path according to the insertion detection signal; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the charging type of the charger is identified through the first path; the present invention also discloses a device for identifying charging type and a computer-readable storage medium. The solution of the present invention can solve the problem of mutual interference between the baseband main chip and the external charging chip, effectively prevent the problem of incorrect identification of the charging type of the inserted charger, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of terminal technology, and relate to but are not limited to a method, device and computer-readable storage medium for identifying a charging type. Background Art

[0002] Most handheld mobile devices such as mobile phones are powered by batteries. With the advancement of technology, charging interfaces and technical indicators are constantly updated. Even the same interface can support different charging types, so handheld terminal products must have the ability to identify charging types.

[0003] In the related art, the solution for identifying the charging type is a discrete solution of a baseband main chip plus a charging (Charger) chip, and the charging type detection and identification operation is completed through the Charger chip. However, the baseband main chip, USB connector and Charger chip of this solution are all connected together through D+ and D-, and the baseband main chip and the external Charger chip interfere with each other, thereby causing a fault in incorrect charging type detection on the Charger side. Summary of the invention

[0004] The embodiments of the present invention are intended to provide a method, device and computer-readable storage medium for identifying charging type, which can solve the problem of mutual interference between a baseband main chip and an external charging chip.

[0005] The technical solution of the embodiment of the present invention is achieved as follows:

[0006] The present invention provides a method for identifying a charging type, the method comprising:

[0007] detecting connection to a charger and generating an insertion detection signal based on the charger;

[0008] According to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication;

[0009] A charging type of the charger is identified through the first path.

[0010] The present invention also provides a device for identifying charging type, the device comprising: a processor 1001, a baseband main chip 1002, a charging chip 1003, a path switching switch 1004 and a connector 1005; wherein,

[0011] The charging chip 1003 is used to detect connection to a charger and generate an insertion detection signal based on the charger;

[0012] The processor 1001 is used to establish a first path and disconnect a second path according to the insertion detection signal; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the first path includes the charging chip 1003, the path switching switch 1004 and the connector 1005, and the second path includes the baseband main chip 1002, the path switching switch 1004 and the connector 1005;

[0013] The charging chip 1003 is further used to identify the charging type of the charger through the first path.

[0014] The present invention also provides a device for identifying charging types, comprising a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, it executes the steps of the method for identifying charging types described in the above-mentioned scheme applied to the terminal device.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method for identifying the charging type described in the above-mentioned scheme applied to the terminal device are implemented.

[0016] The method, device and computer-readable storage medium for identifying charging types provided in the embodiments of the present invention detect connection to a charger and generate an insertion detection signal based on the charger; according to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the charging type of the charger is identified through the first path; in this way, the problem of mutual interference between the baseband main chip and the external charging chip is solved, the problem of incorrect identification of the charging type of the inserted charger is effectively prevented, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of the implementation flow of the method for identifying the charging type in the first embodiment of the present invention;

[0018] Figure 2 It is a structural schematic diagram of a charging type detection circuit in the related art;

[0019] Figure 3a This is the timing diagram for charging type SDP;

[0020] Figure 3b A timing diagram for identifying the charging type SDP as DCP;

[0021] Figure 4 is a circuit structure diagram of a charging type detection process in Embodiment 2 of the present invention;

[0022] Figure 5 This is a circuit structure diagram of DCP Primary Detection in Embodiment 2 of the present invention;

[0023] Figure 6 is a circuit structure diagram of DCP Secondary Detection in Embodiment 2 of the present invention;

[0024] Figure 7 This is a schematic diagram of the implementation flow of the method for identifying the charging type in the second embodiment of the present invention;

[0025] Figure 8 The structure of the device for identifying the charging type in the second embodiment of the present invention is shown in FIG. Figure 1 ;

[0026] Fig. 9 The structure of the device for identifying the charging type in the second embodiment of the present invention is shown in FIG. Figure 2 ;

[0027] Fig.10 This is a schematic diagram of the structure of the device for identifying the charging type in the third embodiment of the present invention;

[0028] Fig.11 This is a schematic diagram of the structure of a device for identifying charging type in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] Embodiment 1

[0031] Figure 1 FIG. 1 is a schematic diagram of the implementation flow of the method for identifying the charging type in the first embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0032] Step 101: Detect connection to a charger, and generate an insertion detection signal based on the charger;

[0033] When the charger is inserted into the terminal, the terminal detects the charger, generates an insertion detection signal based on the inserted charger, and establishes a corresponding path to identify the charging type of the charger. At this time, a charging type detection signal is generated, and the charging type of the charger is identified in the charging chip.

[0034] In actual applications, after the charger is plugged into the USB connector of the terminal, the terminal receives a Vbus interrupt signal indicating that the charger is plugged in, and reports the interrupt to the processor, informing the processor that the charging type of the charger needs to be detected.

[0035] Step 102: establishing a first path and disconnecting a second path according to the insertion detection signal; the first path is used to identify the charging type of the charger, and the second path is used for data communication;

[0036] According to the generated insertion detection signal, it can be determined that the charging type of the charger needs to be detected. When detecting the charging type of the charger, it is necessary to detect through the first path. At this time, the first path needs to be established and the second path needs to be disconnected. The first path and the second path have different functions. The first path is used to identify the charging type of the charger, and the second path is used for data communication.

[0037] In one embodiment, establishing the first path and disconnecting the second path includes: connecting the charging chip and the connector through a path switching switch according to the insertion detection signal to establish the first path between the charging chip and the connector; disconnecting the baseband main chip and the connector through the path switching switch to disconnect the second path between the baseband main chip and the connector.

[0038] Here, the path switching switch may include: a dual-channel high-speed analog switch, a single-pole double-throw switch, a relay, and other devices with a switching function.

[0039] According to the generated insertion detection signal, it is determined that the charging type of the charger needs to be detected through the first path. When the first path is established, the charging chip and the connector are connected through the path switching switch, thereby establishing the first path between the charging chip and the connector, and at the same time, the second path is disconnected, and the baseband main chip and the connector are disconnected through the path switching switch, and the second path between the baseband main chip and the connector is disconnected. At this time, only the first path exists, the second path is disconnected, and the second path will not affect the first path.

[0040] The first path includes a charging chip, a path switching switch and a connector, and is used to identify the charging type of the charger; the second path includes a baseband main chip, a path switching switch and a connector, and is used for data communication.

[0041] In actual applications, the data pins of the connector include: D+, D-, and a path switching switch is set on D+, D- to connect the charging chip and the connector, or to connect the baseband main chip and the connector.

[0042] It should be noted that a path switching switch may be set on D+ and D- respectively, or a path switching switch may be set on D+ and D- for unified management.

[0043] Step 103: Identify the charging type of the charger through the first path.

[0044] After the first path is established and the second path is disconnected, the charging type of the charger is identified through the first path including the charging chip, the path switching switch and the connector, and the charging type of the charger will not be affected by the second path during the process of identifying the charging type of the charger.

[0045] In one embodiment, identifying the charging type of the charger through the first path includes: detecting a pulse signal of a data pin of the connector; and determining the charging type of the charger according to the pulse signal.

[0046] A pulse signal on a data pin of a connector in the first path is detected, and a charging type of the charger is determined according to an amplitude of the detected pulse signal.

[0047] In practical applications, the charging type of the charger is generally detected by adding a pulse signal to the data pin D+ / D- of the connector, and then detecting the amplitude of the pulse signal fed back from the data pin D- / D+ of the connector. The charging type of the charger is determined based on the amplitude of the feedback pulse signal.

[0048] It should be noted that when determining the charging type of the charger, the charging chip determines the charging type of the charger according to the amplitude and number of the feedback pulse signal.

[0049] In one embodiment, after identifying the charging type of the charger through the first path, the method further includes: establishing the second path, disconnecting the first path; and performing data communication through the second path.

[0050] After identifying the charging type of the charger through the first channel, a charging type detection completion signal is generated. According to the generated charging type detection completion signal, the terminal needs to establish a connection with an external device for data communication. At this time, a second channel needs to be established and the first channel is disconnected. Data communication is performed between the terminal and the charger through the second channel. During the data communication process, it will not be affected by the first channel.

[0051] It should be noted that the external device may be a charger, a personal computer, a converter (On The Go, OTG) or other external devices.

[0052] In one embodiment, establishing the second path and disconnecting the first path includes: connecting the baseband main chip and the connector through a path switching switch to establish the second path between the baseband main chip and the connector; disconnecting the charging chip and the connector through the path switching switch to disconnect the first path between the charging chip and the connector.

[0053] After the charger completes the charging type detection, according to the generated charging type detection completion signal, the terminal and the charger need to communicate data through the second path. When establishing the second path, the baseband main chip and the connector are connected through the path switching switch, thereby establishing the second path between the baseband main chip and the connector, and disconnecting the first path at the same time. The charging chip and the connector are disconnected through the path switching switch, and the first path between the charging chip and the connector is disconnected. At this time, only the second path exists, the first path is disconnected, and the first path will not affect the second path.

[0054] The first path includes a charging chip, a path switching switch and a connector, which are used to identify the charging type of the charger; the second path includes a baseband main chip, a path switching switch and a connector, which are used for data communication. In practical applications, the processor can control the path switching switch to connect the charging chip and the connector to establish the first path, or control the path switching switch to connect the baseband main chip and the connector to establish the second path.

[0055] It should be noted that the device that controls the path switching switch to switch can be a processor or a baseband main chip, and the baseband main chip can also be located inside the processor.

[0056] In an embodiment of the present invention, connection to a charger is detected, and an insertion detection signal is generated based on the charger; according to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the charging type of the charger is identified through the first path; in this way, the problem of mutual interference between the baseband main chip and the external charging chip can be solved, and the problem of incorrect identification of the charging type of the inserted charger can be effectively prevented, thereby improving the user experience.

[0057] Embodiment 2

[0058] This embodiment takes a path switching switch that is a dual-path high-speed analog switch as an example to illustrate the method for identifying the charging type provided by the embodiment of the present invention.

[0059] In the related art, under the commonly used BC1.2 (Battery Charging Specification 1.2) specification, there are three types of charging ports: dedicated charger (Dedicated Charging Port, DCP), standard downstream port (Standard Downstream Port, SDP), and high current charging port (Charging Downstream Port, CDP).

[0060] DCP: This is the charger that is usually connected to a 220V socket. It cannot enumerate USB devices, but can provide a stable voltage of (4.75V to 5.25V) and a charging current of 0.5A to 5A. The internal signal lines D+D- are short-circuited.

[0061] SDP: When using the USB2.0 specification, the maximum charging current is 500mA.

[0062] CDP: A USB port on a personal computer (PC) or a hub that can provide a high current of 1.5A to 5A for charging and can also be used to transmit data.

[0063] When the terminal is plugged into the charger, the corresponding charging detection circuit can detect different charging port types. The charging detection circuit includes a baseband main chip and a power chip PMI, or a baseband main chip and a Charger chip. In the process of identifying the charging type, when the baseband main chip cannot enumerate the charging protocol through the internal USB port physical layer (PHY) circuit, a Charger chip with its own charging protocol detection is required to complete it.

[0064] When different types of chargers are inserted into the USB connector, the Charger chip detects the charging type by identifying the enumeration signals on the D+ and D- lines. For example, after adding a pulse signal to D+ / D-, the feedback on D- / D+ is detected. The different charging types are judged by detecting the amplitude and number of pulses. In this detection process, there is a certain reference standard for the voltage of the pulse.

[0065] In the related technology, the charging detection related circuit is as follows Figure 2 As shown in the figure, the baseband main chip, USB connector and Charger chip of the circuit are connected together through D+ and D-. During the detection process, the state of the D+ and D- pins on the main chip side will affect the voltage amplitude of the detection pulse on the D+ and D- lines. When the pulse voltage amplitude on D+ and D- is not within the detection standard range, it will cause the fault of incorrect charging type detection on the Charger side. For example: when the charging type DCP is mistakenly identified as SDP, it will cause a slow charging fault; Figure 3a As shown in Figure 1, when the inserted charging type is DCP, the normal enumeration pulse amplitude is 590mV, while Figure 3b As shown, since the enumeration pulse amplitude on D- is too low, only 190mV, which is lower than the detection standard voltage of 350mV, the charging type DCP will be identified as SDP, where L3 is the supply voltage.

[0066] The charging type identification related circuit mainly involves three parts: baseband main chip, USB connector and Charger chip. When the charger is inserted, there will be five detection processes: power line detection VBUS Detect, data connection detection Data Contact Detect, primary detection, secondary detection, and charging adapter detection ACADetection. Figure 4 The embodiment of the present invention mainly solves the problem that the enumeration signal on D+D- is interfered in the two stages of Primary Detection and Secondary Detection.

[0067] Taking DCP as an example, the charging type detection inside the Charger mainly consists of two steps. The first step is the Primary Detection stage. Figure 5 As shown in the figure; first turn on the D+ source voltage VDP_SRC (0.5~0.7v) and D- sink current IDM_SINK (25~175μA). D+ and D- are short-circuited through the dedicated charging port resistor RDCP_DAT (max=200Ω), and the mobile device (Portable Device, PD) detects whether the voltage of D- reaches VDP_SRC (0.5~0.7v). The voltage comparator of PD on D- compares the D- voltage with the data detection voltage VDAT_REF (0.25~0.4v). If D- is greater than VDAT_REF, it can be determined that the PD is connected to the charging port, and it can be further detected whether it is connected to DCP or CDP.

[0068] The second step is the Secondary Detection stage, such as Figure 6As shown in the figure, the secondary detection is used to distinguish whether the charging type is DCP or CDP. During the effective session TSVLD_CON_PWD (max = 1s) of PD detecting the connection of the power cord VBUS to the external power supply, if PD is not ready for enumeration, PD is required to perform re-detection. If PD is ready for enumeration, the re-detection can be skipped. Being ready for enumeration means establishing connectivity, that is, the downstream device has enabled the 1.5K pull-up resistors on the D+ and D- lines, and the data lines have entered the corresponding signal modes. PD enables the D- source voltage VDM_SRC on D-, turns on the D+ sink current IDP_SINK, and compares the voltages of D+ and VDAT_REF. Since D+ and D- signal lines are short-circuited through RDCP_DAT inside DCP, the voltage of this voltage source VDM_SRC makes VDAT_REF < D+ < VDM_SRC. When PD detects VDAT_REF < D+, it determines that it is connected to DCP. Among them, VDAT_REF (0.25 - 0.4v) is the reference voltage of the enumeration pulse.

[0069] The embodiment of the present invention adopts an independent dual-switch connection scheme, adding switch modules on the D+ and D- lines of the baseband main chip and the USB connector connected to the Charger chip, enabling both connections to work independently, thereby ensuring that the data transmission between the baseband main chip and the USB end and the charging type identification of the Charger chip do not affect each other.

[0070] The process of charging type identification in the embodiment of the present invention is as Figure 7 shown, including the following steps:

[0071] Step 701: The charger is inserted into the USB connector;

[0072] Step 702: The Charger chip detects the insertion of the charger and reports it to the baseband main chip;

[0073] Step 703: The baseband main chip controls the switch to throw downwards;

[0074] Step 704: The Charger chip completes the charging type identification;

[0075] Step 705: The baseband main chip controls the switch to throw upwards;

[0076] Step 706: The baseband main chip is connected to the USB connector and waits for data communication.

[0077] The improved charging type detection circuit is as Figure 8As shown, a switch module is added to the D+ and D- lines of the baseband main chip connected to the Charger chip and the USB connector, and a general purpose input output (GPIO) port of the baseband main chip is used to control the on and off of the switch module, so that both connections can work independently. The switch is a dual-channel high-speed analog switch with a switching frequency of 480Mbps, which is well compatible with the USB2.0 protocol. Its working process is:

[0078] S1. After the charger is plugged into the USB connector, the Charger chip receives the interrupt signal VBus, and then reports to the baseband main chip that it needs to perform a charging type detection operation. The baseband main chip controls the analog switch to throw downward, and the Charger chip performs an enumeration operation on the D+ and D- lines. At this time, there is only a connection path between the USB connector and the Charger, so the detection of the enumeration signal on the Charger side is not affected by the D+ and D- lines on the baseband main chip side.

[0079] S2. After the charging detection is completed, the baseband main chip controls the analog switch to throw upward. At this time, there is only a connection path between the baseband main chip and the USB connector. The baseband main chip communicates data with the USB end, and the data transmission on the D+ and D- lines will not be affected by the Charger side.

[0080] A kind of Figure 8 Devices that identify charging types based on the same principle, such as Fig. 9 As shown, its working process is:

[0081] After the charger is plugged into the USB connector, the Charger chip receives the interrupt signal VBus, and then reports to the baseband main chip that it needs to perform a charging type detection operation. The baseband main chip controls analog switch B to close and A to open, and the Charger chip performs an enumeration operation on the D+ and D- lines. At this time, there is only a connection path between the USB connector and the Charger, so the detection of the enumeration signal on the Charger side is not affected by D+ and D- on the baseband main chip side.

[0082] After the charging type detection is completed, the baseband main chip controls the analog switch A to close and B to open. At this time, there is only a connection path between the baseband main chip and the USB connector. The baseband main chip communicates data with the USB end, and the data transmission on the D+ and D- lines will not be affected by the Charger side.

[0083] The embodiment of the present invention solves the problem of mutual interference between two parallel circuits connected to the USB connector, and the solution adopted is to add high-speed switches to the two parallel paths respectively, and switch the paths in time as needed. Solutions such as switching between the two paths of the USB connector and the baseband main chip and the Charger chip through switches through software modification or similar circuits are all within the scope of the concept of the present invention, for example: adding switches to each line, etc.

[0084] The solution provided by the embodiment of the present invention can save costs by using a Charger chip, and the signals on D+ and D- on the Charger side and the baseband main chip side are independently connected without affecting each other. In particular, in the charging detection stage, the charging type enumeration signals on D+ and D- on the Charger side are not affected by the state of the baseband main chip side, which can effectively prevent the problem of incorrect recognition of the charging type of the inserted charger and improve the user experience.

[0085] Embodiment 3

[0086] This embodiment provides a device for identifying charging type, such as Fig.10 As shown, the device 100 for identifying the charging type includes: a processor 1001, a baseband main chip 1002, a charging chip 1003, a path switching switch 1004 and a connector 1005; wherein,

[0087] The charging chip 1003 is used to detect connection to a charger and generate an insertion detection signal based on the charger;

[0088] The processor 1001 is used to establish a first path and disconnect a second path according to the insertion detection signal; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the first path includes a charging chip 1003, a path switching switch 1004 and a connector 1005, and the second path includes a baseband main chip 1002, a path switching switch 1004 and a connector 1005;

[0089] The charging chip 1003 is further used to identify the charging type of the charger through the first path.

[0090] In one embodiment, the processor 1001 is further used to connect the charging chip 1003 and the connector 1005 through the path switching switch 1004 according to the insertion detection signal, so as to establish a first path between the charging chip 1003 and the connector 1005; and to disconnect the second path between the baseband main chip 1002 and the connector 1005 through the path switching switch 1004.

[0091] In one embodiment, the charging chip 1003 is further used to detect a pulse signal of a data pin of the connector; and determine the charging type of the charger according to the pulse signal.

[0092] In one embodiment, after identifying the charging type of the charger through the first path, the processor 1001 is further configured to establish the second path, disconnect the first path, and perform data communication through the second path.

[0093] In one embodiment, the processor 1001 is further used to connect the baseband main chip 1002 and the connector 1005 through the path switching switch 1004 to establish the second path between the baseband main chip 1002 and the connector 1005; and disconnect the first path between the charging chip 1003 and the connector 1005 through the path switching switch 1004.

[0094] It should be noted that: the device for identifying the charging type provided in the above embodiment only uses the division of the above program modules as an example when identifying the charging type. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the device for identifying the charging type provided in the above embodiment and the method embodiment for identifying the charging type belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0095] Embodiment 4

[0096] Based on the foregoing embodiments, the present invention provides a device for identifying a charging type, such as Fig.11 As shown, the apparatus includes a processor 1102 and a memory 1101 for storing a computer program that can be run on the processor 1102; wherein the processor 1102 is used to run the computer program to achieve:

[0097] detecting connection to a charger and generating an insertion detection signal based on the charger;

[0098] According to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication;

[0099] A charging type of the charger is identified through the first path.

[0100] The method disclosed in the above embodiment of the present invention can be applied to the processor 1102, or implemented by the processor 1102. The processor 1102 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1102. The above-mentioned processor 1102 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1102 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1101. The processor 1102 reads the information in the memory 1101 and completes the steps of the above method in combination with its hardware.

[0101] It can be understood that the memory (memory 1101) of the embodiment of the present invention can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.

[0102] It should be noted here that the description of the above terminal embodiment items is similar to the above method description and has the same beneficial effects as the method embodiment, so it is not repeated here. For technical details not disclosed in the terminal embodiment of the present invention, those skilled in the art should refer to the description of the method embodiment of the present invention for understanding, and in order to save space, it is not repeated here.

[0103] Embodiment 5

[0104] In an exemplary embodiment, the embodiment of the present invention further provides a computer storage medium, specifically a computer readable storage medium, for example, including a memory 1101 storing a computer program, and the computer program can be processed by a processor 1102 to complete the steps of the aforementioned method. The computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0105] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is processed by a processor, the following is implemented:

[0106] detecting connection to a charger and generating an insertion detection signal based on the charger;

[0107] According to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication;

[0108] A charging type of the charger is identified through the first path.

[0109] It should be noted here that the description of the above computer medium embodiment is similar to the above method description and has the same beneficial effects as the method embodiment, so it is not repeated here. For technical details not disclosed in the terminal embodiment of the present invention, those skilled in the art should refer to the description of the method embodiment of the present invention for understanding, and in order to save space, it is not repeated here.

[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. A method for identifying a charging type, characterized in that: The method comprises: detecting connection to a charger and generating an insertion detection signal based on the charger; According to the insertion detection signal, a first path is established and a second path is disconnected; the first path is used to identify the charging type of the charger, and the second path is used for data communication; the first path is a path between the charging chip and the connector; the second path is a path between the baseband main chip and the connector; identifying a charging type of the charger through the first path; After the charging type of the charger is identified through the first path, the second path is established, the first path is disconnected, and data communication is performed through the second path.

2. The method according to claim 1, characterized in that The step of establishing the first path and disconnecting the second path comprises: According to the insertion detection signal, the charging chip and the connector are connected through a path switching switch to establish a first path between the charging chip and the connector; The baseband main chip and the connector are disconnected by the path switching switch, thereby disconnecting the second path between the baseband main chip and the connector.

3. The method according to claim 2, characterized in that The identifying the charging type of the charger through the first path includes: Detecting a pulse signal of a data pin of the connector; The charging type of the charger is determined according to the pulse signal.

4. The method according to claim 1, characterized in that: The establishing the second path and disconnecting the first path comprises: Connecting the baseband main chip and the connector through a path switching switch to establish the second path between the baseband main chip and the connector; The charging chip and the connector are disconnected by the path switching switch, thereby disconnecting the first path between the charging chip and the connector.

5. A device for identifying charging type, characterized in that: The device comprises: a processor (1001), a baseband main chip (1002), a charging chip (1003), a path switching switch (1004) and a connector (1005); wherein, The charging chip (1003) is used to detect connection to a charger and generate an insertion detection signal based on the charger; The processor (1001) is used to establish a first path and disconnect a second path according to the insertion detection signal; the first path is used to identify the charging type of the charger, and the second path is used to perform data communication; the first path includes the charging chip (1003), the path switching switch (1004) and the connector (1005), and the second path includes the baseband main chip (1002), the path switching switch (1004) and the connector (1005); the first path is a path between the charging chip and the connector; the second path is a path between the baseband main chip and the connector; The charging chip (1003) is further used to identify the charging type of the charger through the first path; The processor (1001) is further used for establishing the second path and disconnecting the first path after identifying the charging type of the charger through the first path; and performing data communication through the second path.

6. The device according to claim 5, characterized in that The processor (1001) is further configured to connect the charging chip (1003) and the connector (1005) through the path switching switch (1004) according to the insertion detection signal, so as to establish a first path between the charging chip (1003) and the connector (1005); The second path between the baseband main chip (1002) and the connector (1005) is disconnected by the path switching switch (1004).

7. The device according to claim 5, characterized in that The processor (1001) connects the baseband main chip (1002) and the connector (1005) via the path switching switch (1004), thereby establishing the second path between the baseband main chip (1002) and the connector (1005); The first path between the charging chip (1003) and the connector (1005) is disconnected by the path switching switch (1004).

8. A device for identifying charging type, characterized in that: The invention comprises a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the steps of the method according to any one of claims 1 to 4 are executed.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Charging method, mobile terminal and computer readable storage medium

    CN107394287A

  • USB / charger insert recognition device of mobile terminal

    CN201550170U