Wireless communication circuit, Bluetooth communication switching method and electronic equipment
Patent Information
- Application Number
- CN202380060628.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-18
- Filing Date
- 2023-04-24
- Publication Date
- 2025-04-04
AI Technical Summary
In existing electronic devices such as mobile phones, when Bluetooth and wireless Wi-Fi share an antenna, a large amount of Wi-Fi data will reduce the Bluetooth communication rate and affect the quality of Bluetooth communication.
Design a wireless communication circuit that obtains FEM communication status information through the processor and controls the switching circuit to switch Bluetooth communication from the busy first FEM to the second FEM to avoid time-sharing multiplexing of Wi-Fi and Bluetooth communication from occupying Bluetooth resources. , improve the quality of Bluetooth communication.
Effectively improves Bluetooth communication quality, prevents frequent switching, and ensures connection stability and user experience.
Smart Images

Figure CN119769174A_ABST
Abstract
Description
Wireless communication circuit, bluetooth communication switching method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 18, 2022, with application number 202210993102.2 and invention name “Wireless Communication Circuit, Bluetooth Communication Switching Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communications, and in particular to a wireless communication circuit, a Bluetooth communication switching method, and an electronic device. Background Art
[0003] In existing electronic devices such as mobile phones, Bluetooth (BT) and wireless fidelity (Wi-Fi) share the same antenna in a time-sharing manner. When the amount of data transmitted by Wi-Fi is large, the communication rate of Bluetooth will be reduced, thereby affecting the communication quality of Bluetooth.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide a wireless communication circuit, a Bluetooth communication switching method, and an electronic device for improving the communication quality of Bluetooth communication.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a wireless communication circuit is provided, comprising: a processor, a switching circuit, a modulator demodulator (MDM), a first front-end module (FEM), and a second FEM. The processor is coupled to the switching circuit, the modem, and the first FEM, and the modem is coupled to the second FEM via the switching circuit. The first FEM supports Wi-Fi or Bluetooth communication, and the second FEM supports cellular or Bluetooth communication. The processor is configured to obtain communication status information of the first FEM, where the communication status information indicates whether the first FEM is performing Wi-Fi communication. If the communication status information indicates that the first FEM is performing Wi-Fi communication, a first control command is sent to the switching circuit. The first control command is used to control the switching circuit to detect whether the modem sends a mobile industry processor interface (MIPI) command to the second FEM. If the modem does not send the MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication. If the communication status information indicates that the first FEM is not performing Wi-Fi communication, a second control command is sent to the switching circuit. The second control command is used to control the switching circuit to detect whether the modem sends a MIPI command to the second FEM. If the modem does not send the MIPI command to the second FEM, the modem is directly connected to the second FEM, so that the modem controls the second FEM to perform cellular communication.
[0008] In the wireless communication circuit provided in an embodiment of the present application, the first FEM supports Wireless Fidelity (Wi-Fi) communication or Bluetooth communication. When the first FEM performs Wi-Fi communication and the MDM does not send a MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication, thereby switching part or all of the Bluetooth communication of the first FEM to the relatively idle second FEM, thereby preventing time-sharing multiplexing of Wi-Fi and Bluetooth communications from crowding out Bluetooth communication resources and improving the communication quality of Bluetooth communication.
[0009] In one possible implementation, the switching circuit includes a controller, a MIPI slave module, a MIPI master module, and a bypass gating circuit; the controller is coupled to the modem through the MIPI slave module and the bypass gating circuit, and the controller is also coupled to the second FEM through the MIPI master module and the bypass gating circuit; the MIPI slave module is used to convert the MIPI command from the modem from the MIPI bus format to the on-chip bus format and send it to the controller; the MIPI master module is used to convert the MIPI command from the controller from the on-chip bus format to the MIPI bus format and send it to the second FEM through the bypass gating circuit; the controller is used to: if a first control command is received, control the bypass gating circuit to connect the MIPI slave module to the modem and connect the MIPI master module to the second FEM The second FEM is turned on, and the MIPI slave module is used to detect whether the modem sends a MIPI command to the second FEM. If the modem does not send a MIPI command to the second FEM, a first MIPI command is sent to the second FEM through the MIPI master module, and the first MIPI command is used to instruct the second FEM to perform Bluetooth communication. The controller is also used to: if a second control command is received, detect whether the modem sends a MIPI command to the second FEM through the MIPI slave module; if the modem does not send a MIPI command to the second FEM, control the bypass gating circuit to directly connect the modem and the second FEM, and send a second MIPI command to the second FEM through the MIPI master module, and the second MIPI command is used to instruct the second FEM to perform cellular communication.
[0010] This embodiment discloses a possible implementation of how the switching circuit is realized.
[0011] In one possible embodiment, the controller is further used to: after sending a first MIPI command to the second FEM through the MIPI master module, receive and cache the MIPI command from the MDM through the MIPI slave module; after sending a second MIPI command to the second FEM through the MIPI master module, send the cached MIPI command from the modem to the second FEM through the MIPI master module.
[0012] This embodiment allows the control logic between the modem and the second FEM to remain consistent before and after the switch.
[0013] In a possible implementation, the processor is specifically configured to: send a first control command to the switching circuit after a preset time if the communication status information indicates that the first FEM performs Wi-Fi communication.
[0014] This implementation can prevent the Bluetooth communication from frequently switching between the first FEM and the second FEM. The advantages of this solution are that the judgment conditions are simple and frequent switching will not occur from beginning to end.
[0015] In one possible implementation, the processor is specifically configured to: if the communication status information indicates that the first FEM is performing Wi-Fi communication, and the number of times the first FEM switches between performing Wi-Fi communication and not performing Wi-Fi communication within a first preset time is less than a number threshold, send a first control command to the switching circuit.
[0016] This implementation can prevent Bluetooth communication from frequently switching between the first FEM and the second FEM. The advantages of this solution are faster detection, faster state switching after connecting to Wi-Fi, and better user experience.
[0017] In a possible implementation, the processor is further configured to: if the number of times the first FEM switches between Wi-Fi communication and non-Wi-Fi communication within the first preset time is greater than or equal to a number threshold, obtain the communication status information of the first FEM again after a second preset time.
[0018] This implementation can avoid the state from never switching, and the state can be switched normally when the Wi-Fi connection is stable.
[0019] In a second aspect, a Bluetooth communication switching method is provided, including: obtaining communication status information of a first FEM, the first FEM supporting Wireless Fidelity (Wi-Fi) communication or Bluetooth communication, the communication status information being used to indicate whether the first FEM performs Wi-Fi communication; if the communication status information indicates that the first FEM performs Wi-Fi communication, sending a first control command to a switching circuit, the first control command being used to control the switching circuit to detect whether a modem sends a Mobile Industry Processor Interface (MIPI) command to a second FEM; if the modem does not send the MIPI command to the second FEM, controlling the second FEM to perform Bluetooth communication, the second FEM supporting cellular communication or Bluetooth communication; if the communication status information indicates that the first FEM does not perform Wi-Fi communication, sending a second control command to the switching circuit, the second control command being used to control the switching circuit to detect whether the modem sends a MIPI command to the second FEM; if the modem does not send the MIPI command to the second FEM, directly connecting the modem to the second FEM so that the modem controls the second FEM to perform cellular communication.
[0020] In a possible implementation, the method further includes: if a first control command is received, controlling the bypass gating circuit to connect the MIPI slave module to the modem and to connect the MIPI master module to the second FEM, detecting through the MIPI slave module whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, sending a first MIPI command to the second FEM through the MIPI master module, where the first MIPI command is used to instruct the second FEM to perform Bluetooth communication; if a second control command is received, detecting through the MIPI slave module whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, controlling the bypass gating circuit to directly connect the modem to the second FEM, and sending a second MIPI command to the second FEM through the MIPI master module, where the second MIPI command is used to instruct the second FEM to perform cellular communication.
[0021] In one possible implementation, the method further includes: after sending a first MIPI command to the second FEM through the MIPI master module, receiving and caching a MIPI command from the MDM through the MIPI slave module; and after sending a second MIPI command to the second FEM through the MIPI master module, sending the cached MIPI command from the MDM to the second FEM through the MIPI master module.
[0022] In a possible implementation, if the communication status information indicates that the first FEM performs Wi-Fi communication, sending a first control command to the switching circuit includes: if the communication status information indicates that the first FEM performs Wi-Fi communication, sending the first control command to the switching circuit after a preset time.
[0023] In one possible implementation, if the communication status information indicates that the first FEM is performing Wi-Fi communication, sending a first control command to the switching circuit includes: if the communication status information indicates that the first FEM is performing Wi-Fi communication, and the number of times the first FEM switches between performing Wi-Fi communication and not performing Wi-Fi communication within a first preset time is less than a number threshold, sending the first control command to the switching circuit.
[0024] In a possible implementation, the method further includes: if the number of times the first FEM switches between Wi-Fi communication and non-Wi-Fi communication within the first preset time is greater than or equal to a number threshold, acquiring communication status information of the first FEM again after a second preset time.
[0025] In a third aspect, an electronic device is provided, comprising a wireless communication circuit as in the first aspect and any embodiment thereof, or comprising a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the method as in the second aspect and any embodiment thereof is executed.
[0026] In a fourth aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method as described in the second aspect and any embodiment thereof.
[0027] In a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed on the electronic device, the electronic device executes the method as described in the second aspect and any embodiment thereof.
[0028] In a sixth aspect, a chip system is provided, comprising a processor configured to support an electronic device in implementing the functions described in the second aspect. In one possible design, the device further comprises an interface circuit configured to receive signals from other devices (e.g., a memory) or to send signals to other devices (e.g., a communication interface). The chip system may include a chip and may also include other discrete components.
[0029] The technical effects of the second to sixth aspects refer to the technical effects of the first aspect and any of its embodiments and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0031] FIG2 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0032] FIG3 is a schematic structural diagram of a wireless communication circuit provided in an embodiment of the present application;
[0033] FIG4 is a schematic diagram of a flow chart of a Bluetooth communication switching method provided in an embodiment of the present application;
[0034] FIG5 is a schematic diagram of a flow chart of another Bluetooth communication switching method provided in an embodiment of the present application;
[0035] FIG6 is a schematic diagram of a display interface provided in an embodiment of the present application;
[0036] FIG7 is a schematic diagram of another display interface provided in an embodiment of the present application;
[0037] FIG8 is a schematic diagram of another display interface provided in an embodiment of the present application;
[0038] FIG9 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] First, some concepts involved in this application are described.
[0040] The terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.
[0041] The terms "exemplary" or "for example" in the embodiments of this application are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0042] The terms "coupling" and "connection" involved in the embodiments of this application should be understood in a broad sense. For example, they may refer to a physical direct connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.
[0043] An embodiment of the present application provides an electronic device, which may be a device with a display function, and the electronic device may be mobile or fixed. The electronic device may be deployed on land (e.g., indoors or outdoors, handheld or vehicle-mounted, etc.), on water (e.g., ships, etc.), or in the air (e.g., airplanes, balloons, and satellites, etc.). The electronic device may be referred to as user equipment (UE), access terminal, terminal unit, subscriber unit, terminal station, mobile station (MS), mobile station, terminal agent, or terminal device, etc. For example, the electronic device may be a mobile phone, tablet computer, laptop computer, smart bracelet, smart watch, headset, smart speaker, virtual reality (VR) device, augmented reality (AR) device, terminal in industrial control, terminal in self-driving, terminal in remote medical, terminal in smart grid, terminal in transportation safety, terminal in smart city, terminal in smart home, etc. The embodiments of the present application do not limit the specific type and structure of the electronic device. A possible structure of the electronic device is described below.
[0044] Taking a mobile phone as an example, FIG1 shows a possible structure of an electronic device 101. The electronic device 101 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a power management module 240, a battery 241, a wireless charging coil 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone jack 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display 294, and a subscriber identification module (SIM) card interface 295.
[0045] Among them, the sensor module 280 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0046] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 101. In other embodiments of the present application, the electronic device 101 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0047] The processor 210 may include one or more processing units, for example: the processor 210 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), an application processor (AP), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. For example, the processor 210 may be an application processor AP. Alternatively, the processor 210 may be integrated into a system on chip (SoC). Alternatively, the processor 210 may be integrated into an integrated circuit (IC) chip. The processor 210 may include an analog front end (AFE) and a micro-controller unit (MCU) in an IC chip.
[0048] The controller may be the nerve center and command center of the electronic device 101. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0049] Processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 210. If processor 210 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 210 latency, and thus improves system efficiency.
[0050] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a USB interface.
[0051] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 101. In other embodiments of the present application, the electronic device 101 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.
[0052] The power management module 240 is configured to receive charging input from a charger. The charger may be a wireless charger (e.g., a wireless charging base for the electronic device 101 or other device capable of wirelessly charging the electronic device 101) or a wired charger. For example, the power management module 240 may receive charging input from a wired charger via the USB interface 230. The power management module 240 may also receive wireless charging input via the wireless charging coil 242 of the electronic device.
[0053] The power management module 240 can not only charge the battery 241 but also power the electronic device. The power management module 240 receives input from the battery 241 and provides power to the processor 210, the internal memory 221, the external memory interface 220, the display 294, the camera 293, and the wireless communication module 260. The power management module 240 can also be used to monitor parameters such as the battery capacity, battery cycle count, and battery health status (leakage, impedance) of the battery 241. In other embodiments, the power management module 240 can also be provided in the processor 210.
[0054] The wireless communication function of the electronic device 101 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor.
[0055] Electronic device 101 implements display functionality through a GPU, display screen 294, and an application processor. A GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.
[0056] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel and a touch screen. In some embodiments, the electronic device 101 may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0057] The electronic device 101 can implement a camera function using an ISP, a camera 293, a video codec, a GPU, a display 294, and an application processor. The ISP is used to process data fed back by the camera 293. In some embodiments, the ISP can be provided within the camera 293. The camera 293 is used to capture still images or videos. In some embodiments, the electronic device 101 can include one or N cameras 293, where N is a positive integer greater than one.
[0058] The external memory interface 220 can be used to connect an external memory card, such as a micro SanDisk (Micro SD) card, to expand the storage capacity of the electronic device 101. The external memory card communicates with the processor 210 via the external memory interface 220 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0059] The internal memory 221 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the electronic device 101 by running the instructions stored in the internal memory 221. In addition, the internal memory 221 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0060] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may 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), or a flash memory. The volatile memory may 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 RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0061] The electronic device 101 can implement audio functions such as music playback and recording through the audio module 270 , the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0062] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. In some embodiments, the audio module 270 can be set in the processor 210, or some functional modules of the audio module 270 can be set in the processor 210. The speaker 270A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 270B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone 270C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The electronic device 101 can be provided with at least one microphone 270C. The headphone jack 270D is used to connect wired headphones. The headphone jack 270D can be a USB interface 230, or it can be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0063] The buttons 290 include a power button, a volume button, etc. The buttons 290 can be mechanical buttons. They can also be touch buttons. The electronic device 101 can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device 101. The motor 291 can generate vibration prompts. The motor 291 can be used for incoming call vibration prompts or for touch vibration feedback. The indicator 292 can be an indicator light that can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 101 by inserting or removing it from the SIM card interface 295. The electronic device 101 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support nano SIM cards, micro SIM cards, SIM cards, etc. In some embodiments, the electronic device 101 uses an embedded SIM (eSIM) card. The eSIM card can be embedded in the electronic device 101 and cannot be separated from the electronic device 101.
[0064] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 101 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0065] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 101. The wireless communication module 260 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 101. In some embodiments, the antenna 1 of the electronic device 101 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 101 can communicate with the network and other devices through wireless communication technology.
[0066] As shown in Figure 2, in the prior art, the wireless communication module 260 includes a first FEM 261, and the mobile communication module 250 includes an MDM 251 and a second FEM 252. The first FEM 261 and the second FEM 252 are used to amplify transmitted or received RF signals. The MDM 251 is used to digitally modulate the baseband signal to generate an RF signal, and to demodulate the RF signal to obtain a digital signal. The second FEM 252 implements the transmission of RF signals for mobile communication (i.e., cellular communication), while the first FEM 261 implements time-sharing transmission of RF signals for Wi-Fi and Bluetooth. When a user moves indoors from outdoors and an electronic device uses Wi-Fi for communication, the amount of data transmitted via Wi-Fi is larger, while the amount of data transmitted via cellular communication is smaller. Since Wi-Fi and Bluetooth share the FEM and antenna, this reduces the Bluetooth communication rate, thereby affecting the Bluetooth communication quality. For example, the call quality of a Bluetooth headset is reduced and the Bluetooth transmission data rate is lowered.
[0067] To this end, an embodiment of the present application provides a wireless communication circuit applied to the above-mentioned electronic device, which reduces or prevents the impact on the Bluetooth communication rate by allowing Bluetooth to occupy the FEM and antenna of cellular communication.
[0068] As shown in Figure 3, the wireless communication circuit includes a processor 31, a switching circuit 32, an MDM 33, a first FEM 34, and a second FEM 35. The switching circuit 32 includes a serial peripheral interface (SPI) module 321, a controller 322, a mobile industry processor interface (MIPI) slave module 323, a MIPI master module 324, and a bypass gate circuit 325. The processor 31 is coupled to the switching circuit 32, the MDM 33, and the first FEM 34. The processor 31 is coupled to the controller 322 via the SPI module 321 in the switching circuit 32. The MDM 33 is coupled to the second FEM 35 via the switching circuit 32. Communication between the MDM 33, the switching circuit 32, and the second FEM 35 is performed using the MIPI bus.
[0069] The first FEM 34 and the second FEM 35 are used to amplify the transmitted or received radio frequency signals. The first FEM 34 can support time division multiplexing of Wi-Fi communication or Bluetooth communication, and the second FEM 35 can support cellular communication or Bluetooth communication.
[0070] The MDM 33 is configured to send MIPI commands to the second FEM 35 to control the second FEM 35 for cellular communication. The MDM 33 is further configured to digitally modulate the baseband signal to generate a radio frequency signal and transmit the signal through the second FEM 35. Furthermore, the MDM 33 is configured to demodulate the radio frequency signal received by the second FEM 35 to obtain a digital signal. The MDM 33 is further configured to send communication status information of the second FEM 35 to the processor 31.
[0071] The SPI module 321 is used to implement serial communication between the processor 31 and the controller 322 .
[0072] The bypass gating circuit 325 is controlled by the controller 322 and directly connects the MDM 33 to the second FEM 35 (the path indicated by the dashed arrow in the figure), or connects the MDM 33 to the controller 322 via the MIPI slave module 323, and connects the controller 322 to the second FEM 35 via the MIPI master module 324 (the path indicated by the solid arrow in the figure). The bypass gating circuit 325 can be implemented using analog circuits such as complementary metal oxide semiconductor (CMOS) or Verilog register transfer level (RTL) code, and the specific implementation method is not limited.
[0073] The MIPI slave module 323 is connected to the MDM 33 via a MIPI bus, and is connected to the controller 322 via an on-chip bus (e.g., an advanced high-performance bus (AHB) bus). The MIPI slave module 323 is used to convert MIPI commands (e.g., the first MIPI command described below) from the MDM 33 from a MIPI bus format to an on-chip bus format and send the command to the controller 322.
[0074] The MIPI master module 324 is connected to the second FEM 35 via a MIPI bus, and is connected to the controller 322 via an on-chip bus. The MIPI master module 324 is configured to convert MIPI commands (e.g., the second MIPI command described below) from the controller 322 from an on-chip bus format to a MIPI bus format and send the command to the second FEM 35.
[0075] The processor 31 can obtain communication status information of the first FEM 34, such as whether Wi-Fi communication is being performed (or, whether Wi-Fi communication or Bluetooth communication is being performed). The processor 31 can also obtain communication status information of the second FEM 35, such as whether cellular communication is being performed. The processor 31 can also send a first control command or a second control command (described below) to the controller 322 in the switching circuit 32 through the SPI module 321 based on the communication status information of the first FEM 34, so as to control the second FEM 35 to switch between the cellular communication state and the Bluetooth communication state through the switching circuit 32.
[0076] The controller 322 is configured to control the bypass gating circuit 325 to switch between the bypass mode and the non-bypass mode according to the first control command or the second control command from the processor 31 .
[0077] Specifically, the wireless communication circuit may execute the Bluetooth communication switching method involved in the present application, as shown in FIG4 , which includes:
[0078] S101 : The processor 31 obtains communication status information of the first FEM 34 .
[0079] The communication status information of the first FEM 34 is used to indicate whether the first FEM 34 performs Wi-Fi communication. In other words, the communication status information of the first FEM 34 is used to indicate whether the first FEM 34 performs Wi-Fi communication or Bluetooth communication.
[0080] S102 : If the communication status information of the first FEM 34 indicates that the first FEM 34 performs Wi-Fi communication (or establishes a Wi-Fi connection), the processor 31 sends a first control command to the controller 322 in the switching circuit 32 .
[0081] The first control command is used to control the switching circuit 32 to detect whether the MDM 33 sends a MIPI command to the second FEM 35. If the MDM 33 does not send a MIPI command to the second FEM 35, the switching circuit 32 controls the second FEM 35 to perform Bluetooth communication.
[0082] As shown in S1021-S1025 of FIG5 , in bypass mode, if the controller 322 in the switching circuit 32 receives a first control command from the processor 31, the controller 322 configures the mode switching register to non-bypass mode and controls the bypass gating circuit 325 to switch to non-bypass mode. The controller 322 then controls the bypass gating circuit 325 to connect the MIPI slave module 323 to the MDM 251 and connect the MIPI master module 324 to the second FEM 35. The controller 322 detects, via the MIPI slave module 323, whether the MDM 251 is sending a MIPI command to the second FEM 35. If the controller 322 detects that the MDM 251 is not sending a MIPI command to the second FEM 35 (i.e., the MIPI bus is idle), the controller 322 sends a first MIPI command to the second FEM 35 via the MIPI master module 324. If the controller 322 detects that the MDM 251 is sending a MIPI command to the second FEM 35, the controller 322 continues to wait for the MIPI bus to become idle. The detected MIPI command from the MDM 251 can be any MIPI command, and the first MIPI command is used to instruct the second FEM 35 to perform Bluetooth communication. That is, while the MDM 251 is not sending a MIPI command to the second FEM 35, the controller 322 switches the second FEM 35 from a cellular communication state to a Bluetooth communication state to avoid competition with the MDM 251 for the MIPI bus, which could result in transmission errors.
[0083] After the controller 322 sends the first MIPI command to the second FEM 35 through the MIPI master module 324 to instruct the second FEM 35 to perform Bluetooth communication, the controller 322 continues to receive and cache MIPI commands from the MDM 251 through the MIPI slave module 323. When the controller 322 subsequently controls the second FEM 35 to switch back to the Bluetooth communication state, the cached MIPI command from the MDM 251 is sent to the second FEM 35 through the MIPI master module 324, so that the control logic between the MDM 251 and the second FEM 35 remains consistent before and after the switch.
[0084] In addition, since the Wi-Fi connection is unstable in some scenarios, in order to prevent the Bluetooth communication from frequently switching between the first FEM 34 and the second FEM 35, the processor 31 can determine whether to switch to Bluetooth communication based on the time when the first FEM 34 performs Wi-Fi communication; or, the processor 31 can determine whether to switch to Bluetooth communication based on the number of times the first FEM 34 switches between performing Wi-Fi communication and not performing Wi-Fi communication within a preset time.
[0085] In one possible implementation, if the communication status information of the first FEM 34 indicates that the first FEM 34 is performing Wi-Fi communication, then after a preset time (e.g., one minute), the processor 31 sends a first control command to the controller 322 in the switching circuit 32. That is, after the electronic device has been stably connected to the Wi-Fi connection for the preset time, the processor 31 sends the first control command to the controller 322 in the switching circuit 32. This solution has the advantages of simple judgment conditions and avoids frequent switching.
[0086] In another possible implementation, if the communication status information of the first FEM 34 indicates that the first FEM 34 is performing Wi-Fi communication, and the number of times the first FEM 34 switches between Wi-Fi communication and non-Wi-Fi communication is less than a threshold (e.g., three times) within a first preset time period (e.g., 10 seconds), the processor 31 sends a first control command to the controller 322 in the switching circuit 32. If the number of times the first FEM 34 switches between Wi-Fi communication and non-Wi-Fi communication within the first preset time period is greater than or equal to the threshold, the processor 31 obtains communication status information from the first FEM 34 after a second preset time period (e.g., five minutes) and re-determines whether to send the first control command. This solution has the advantage of faster detection and faster state switching after Wi-Fi connection, resulting in a better user experience.
[0087] Since the electronic device can support Bluetooth communication (or pairing) with multiple other devices, the processor 31 can switch all or part of the Bluetooth communication from the first FEM 34 to the second FEM 35 to improve the Bluetooth communication quality. For example, as shown in FIG6 , this improvement in Bluetooth communication quality can be indicated by the Bluetooth icon in the status bar of the electronic device changing from A to B, or by the Bluetooth icon in a drop-down menu changing from C to D, where A and C represent standard Bluetooth communication functions and B and D represent enhanced Bluetooth communication functions. As shown in FIG7 , the Bluetooth pairing interface can be opened by clicking the triangle icon next to the Bluetooth icon in the drop-down menu, which displays the connection of different Bluetooth devices via different antennas. As shown in FIG8 , the Bluetooth settings menu can display whether the Bluetooth enhanced function switch is turned on. When the Bluetooth enhanced function switch is turned on, the electronic device can execute the Bluetooth communication switching method of the present application and can display the connection of different Bluetooth devices via different antennas. When the Bluetooth enhanced function switch is turned off, the electronic device does not execute the Bluetooth communication switching method of the present application.
[0088] S103 : If the communication status information of the first FEM 34 indicates that the first FEM 34 is not performing Wi-Fi communication (or disconnecting the Wi-Fi connection), the processor 31 sends a second control command to the controller 322 in the switching circuit 32 .
[0089] The second control command is used to control the switching circuit 32 to detect whether the MDM 33 sends a MIPI command to the second FEM 35. If the MDM 33 does not send a MIPI command to the second FEM 35, the switching circuit 32 directly connects the MDM 33 with the second FEM 35, so that the MDM 33 controls the second FEM 35 to perform cellular communication.
[0090] As shown in S1031-S1034 of FIG5 , in non-bypass mode, if the controller 322 in the switching circuit 32 receives a second control command from the processor 31, the controller 322 configures the mode switching register to bypass mode and controls the bypass gating circuit 325 to switch to bypass mode. At this time, the controller 322 detects, via the MIPI slave module 323, whether the MDM 251 sends a MIPI command to the second FEM 35. If it is detected that the MDM 251 does not send a MIPI command to the second FEM 35 (i.e., the MIPI bus is idle), the controller 322 controls the bypass gating circuit 325 to directly connect the MDM 251 to the second FEM 35 and sends a second MIPI command to the second FEM 35 via the MIPI master module 324. The second MIPI command is used to instruct the second FEM 35 to perform cellular communication. The MDM 251 is enabled to control the second FEM 35 to perform cellular communication. If it is detected that the MDM 251 sends a MIPI command to the second FEM 35, the controller 322 continues to wait for the MIPI bus to be idle. In other words, when the MDM 251 is not sending a MIPI command to the second FEM 35, the controller 322 switches the second FEM 35 from the Bluetooth communication state to the cellular communication state to avoid competition with the MDM 251 for the MIPI bus, which could cause transmission errors.
[0091] After the controller 322 sends the second MIPI command to the second FEM 35 through the MIPI master module 324 to instruct the second FEM 35 to perform cellular communication, the controller 322 also sends the previously cached MIPI command from the MDM 251 to the second FEM 35 through the MIPI master module 324, so that the control logic between the MDM 251 and the second FEM 35 remains consistent before and after the switching.
[0092] In the wireless communication circuit, Bluetooth communication switching method, and electronic device provided in the embodiments of the present application, a first FEM supports Wireless Fidelity (Wi-Fi) communication or Bluetooth communication. When the first FEM performs Wi-Fi communication and the MDM does not send a MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication, thereby switching part or all of the Bluetooth communication of the first FEM to the relatively idle second FEM, thereby preventing time-sharing multiplexing of Wi-Fi and Bluetooth communications from crowding out Bluetooth communication resources and improving the communication quality of Bluetooth communication.
[0093] As shown in Figure 9, an embodiment of the present application also provides a chip system. The chip system 60 includes at least one processor 601 and at least one interface circuit 602. At least one processor 601 and at least one interface circuit 602 can be interconnected via lines. The processor 601 is used to support the electronic device to implement the various steps in the above method embodiments, such as the methods shown in Figures 4 and 5, and at least one interface circuit 602 can be used to receive signals from other devices (such as memories) or send signals to other devices (such as communication interfaces). The chip system may include chips and may also include other discrete devices.
[0094] An embodiment of the present application also provides a computer-readable storage medium, which includes instructions. When the instructions are executed on the above-mentioned electronic device, the electronic device executes each step in the above-mentioned method embodiment, such as executing the method shown in Figures 4 and 5.
[0095] An embodiment of the present application also provides a computer program product including instructions. When the instructions are executed on the above-mentioned electronic device, the electronic device executes each step in the above-mentioned method embodiment, for example, executes the method shown in Figures 4 and 5.
[0096] Regarding the technical effects of the chip system, computer-readable storage medium, and computer program product, refer to the technical effects of the previous method embodiments.
[0097] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0098] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0099] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0101] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located on a single device or distributed across multiple devices. Some or all of the modules may be selected to achieve the purpose of the present embodiment as needed.
[0102] In addition, the functional modules in the various embodiments of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.
[0103] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0104] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A wireless communication circuit, characterized in that: include: A processor, a switching circuit, a modem, a first front-end module (FEM), and a second FEM; the processor is coupled to the switching circuit, the modem, and the first FEM; the modem is coupled to the second FEM via the switching circuit; the first FEM supports Wi-Fi communication or Bluetooth communication; the second FEM supports cellular communication or Bluetooth communication; the processor is configured to: Acquire communication status information of the first FEM, where the communication status information is used to indicate whether the first FEM performs Wi-Fi communication; If the communication status information indicates that the first FEM performs Wi-Fi communication, a first control command is sent to the switching circuit, where the first control command is used to control the switching circuit to detect whether the modem sends a Mobile Industry Processor Interface (MIPI) command to the second FEM, and if the modem does not send a MIPI command to the second FEM, control the second FEM to perform Bluetooth communication; If the communication status information indicates that the first FEM is not performing Wi-Fi communication, a second control command is sent to the switching circuit, where the second control command is used to control the switching circuit to detect whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, the modem is directly connected to the second FEM, so that the modem controls the second FEM to perform cellular communication.
2. The wireless communication circuit according to claim 1, wherein: The switching circuit includes a controller, a MIPI slave module, a MIPI master module, and a bypass gating circuit; the controller is coupled to the modem via the MIPI slave module and the bypass gating circuit, and the controller is also coupled to the second FEM via the MIPI master module and the bypass gating circuit; The MIPI slave module is used to convert the MIPI command from the modem from the MIPI bus format to the on-chip bus format and send it to the controller; the MIPI master module is used to convert the MIPI command from the controller from the on-chip bus format to the MIPI bus format and send it to the second FEM through the bypass gating circuit; The controller is configured to: upon receiving the first control command, control the bypass gating circuit to connect the MIPI slave module to the modem and connect the MIPI master module to the second FEM, detect through the MIPI slave module whether the modem sends a MIPI command to the second FEM, and if the modem does not send a MIPI command to the second FEM, send a first MIPI command to the second FEM through the MIPI master module, where the first MIPI command is used to instruct the second FEM to perform Bluetooth communication; The controller is further configured to: if the second control command is received, detect through the MIPI slave module whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, control the bypass gating circuit to directly connect the modem to the second FEM, and send a second MIPI command to the second FEM through the MIPI master module, where the second MIPI command is used to instruct the second FEM to perform cellular communication.
3. The wireless communication circuit according to claim 2, wherein: The controller is also used for: After sending the first MIPI command to the second FEM through the MIPI master module, receiving and buffering a MIPI command from the modem through the MIPI slave module; After sending the second MIPI command to the second FEM through the MIPI master module, sending the buffered MIPI command from the modem to the second FEM through the MIPI master module.
4. The wireless communication circuit according to any one of claims 1 to 3, characterized in that: The processor is specifically configured to: If the communication status information indicates that the first FEM performs Wi-Fi communication, the first control command is sent to the switching circuit after a preset time.
5. The wireless communication circuit according to any one of claims 1 to 4, characterized in that: The processor is specifically configured to: If the communication status information indicates that the first FEM performs Wi-Fi communication, and the number of times the first FEM switches between performing Wi-Fi communication and not performing Wi-Fi communication within a first preset time is less than a number threshold, the first control command is sent to the switching circuit.
6. The wireless communication circuit according to claim 5, wherein: The processor is further configured to: If the number of times the first FEM switches between Wi-Fi communication and non-Wi-Fi communication within the first preset time is greater than or equal to the number threshold, the communication status information is acquired again after a second preset time.
7. A Bluetooth communication switching method, characterized in that: include: Acquire communication status information of a first front-end module (FEM), where the first FEM supports Wireless Fidelity (Wi-Fi) communication or Bluetooth communication, and the communication status information is used to indicate whether the first FEM performs Wi-Fi communication; If the communication status information indicates that the first FEM performs Wi-Fi communication, a first control command is sent to the switching circuit, where the first control command is used to control the switching circuit to detect whether the modem sends a Mobile Industry Processor Interface (MIPI) command to the second FEM; if the modem does not send the MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication, where the second FEM supports cellular communication or Bluetooth communication; If the communication status information indicates that the first FEM is not performing Wi-Fi communication, a second control command is sent to the switching circuit, where the second control command is used to control the switching circuit to detect whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, the modem is directly connected to the second FEM, so that the modem controls the second FEM to perform cellular communication.
8. The method according to claim 7, characterized in that Also includes: If the first control command is received, controlling the bypass gating circuit to connect the MIPI slave module to the modem and to connect the MIPI master module to the second FEM, detecting, through the MIPI slave module, whether the modem sends a MIPI command to the second FEM; if the modem does not send a MIPI command to the second FEM, sending a first MIPI command to the second FEM through the MIPI master module, where the first MIPI command is used to instruct the second FEM to perform Bluetooth communication; If the second control command is received, the MIPI slave module is used to detect whether the modem sends a MIPI command to the second FEM. If the modem does not send a MIPI command to the second FEM, the bypass gating circuit is controlled to directly connect the modem to the second FEM, and a second MIPI command is sent to the second FEM through the MIPI master module. The second MIPI command is used to instruct the second FEM to perform cellular communication.
9. The method according to claim 8, characterized in that Also includes: After sending the first MIPI command to the second FEM through the MIPI master module, receiving and buffering a MIPI command from the modem through the MIPI slave module; After sending the second MIPI command to the second FEM through the MIPI master module, sending the buffered MIPI command from the modem to the second FEM through the MIPI master module.
10. The method according to any one of claims 7 to 9, characterized in that: If the communication status information indicates that the first FEM performs Wi-Fi communication, sending a first control command to the switching circuit includes: If the communication status information indicates that the first FEM performs Wi-Fi communication, the first control command is sent to the switching circuit after a preset time.
11. The method according to any one of claims 7 to 10, characterized in that: If the communication status information indicates that the first FEM performs Wi-Fi communication, sending a first control command to the switching circuit includes: If the communication status information indicates that the first FEM performs Wi-Fi communication, and the number of times the first FEM switches between performing Wi-Fi communication and not performing Wi-Fi communication within a first preset time is less than a number threshold, the first control command is sent to the switching circuit.
12. The method according to claim 11, characterized in that The method further comprises: If the number of times the first FEM switches between Wi-Fi communication and non-Wi-Fi communication within the first preset time is greater than or equal to the number threshold, the communication status information is acquired again after a second preset time.
13. An electronic device, characterized in that: The method comprises the wireless communication circuit according to any one of claims 1 to 6, or comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the method according to any one of claims 7 to 12 is executed.
14. A computer-readable storage medium, characterized in that The method comprises instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 7 to 12.