Function switching circuit and method, electronic equipment and readable medium

By designing a function switching circuit in electronic devices, the connection switching between the general serial bus interface and multiple functional modules is achieved, which solves the problem of inconsimplicity and unsightly caused by multiple leak interfaces of existing equipment, and realizes the equipment's Miniaturization and reliability improvement.

CN119493750APending Publication Date: 2025-02-21ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311037565.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-16
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

Due to functional and debugging requirements, existing RSU or OBU devices with C-V2X functions usually have multiple leak interfaces, which leads to insimplicity and beauty, which hinders the development of miniaturization.

Method used

Design a function switching circuit, and connect the universal serial bus interface, the first function module and the second function module through the switching switch circuit, so as to realize the connection switching of the first function module and the second function module, so as to share one Universal serial bus interface.

Benefits of technology

On the premise of ensuring the function of the equipment, the debugging, upgrading and other operations of multiple functional modules are realized through a single universal serial bus interface, which reduces the maintenance cost, improves the user experience, and reduces the number of leaky interfaces and increases the equipment reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493750A_ABST
    Figure CN119493750A_ABST
Patent Text Reader

Abstract

The invention provides a function switching circuit and method, electronic equipment and a readable medium, and belongs to the technical field of electronics. The function switching circuit comprises a universal serial bus interface; a first functional module; a second functional module; a switching circuit; the change-over switch circuit is respectively connected with the universal serial bus interface, the first functional module and the second functional module; and the change-over switch circuit is used for switching and connecting the universal serial bus interface between the first functional module and the second functional module. The function switching circuit is used for multiple functions to share a single USB interface, and the number of exposed interfaces is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic technology, and in particular to a function switching circuit, method, electronic device and readable medium. Background Art

[0002] Terminal products are evolving towards miniaturization, convenience, and aesthetics. The rapid development of C-V2X (Cellular-Vehicle to Everything) technology, especially in-vehicle products used in automobiles (such as OBU (On board Unit), TBOX (Onboard communication box), VBOX (TBOX with CV2X function), IHU (In-vehicle infotainment system unit), etc.) and outdoor terminal electronic products (such as RSU (Roadside Unit), CPE (a mobile signal access device that receives mobile signals and forwards them as wireless WIFI signals), etc.), has increased the requirements for the "three protections" and size of such terminal products, which has also led to extremely high requirements for the number of exposed interfaces of structural parts for such terminal products.

[0003] At present, RSU or OBU with C-V2X function usually adopts AP (application processor) + MODEM (modem) hardware architecture. In order to consider functions and debugging, traditional RSU generally has network ports, multiple USB (universal serial bus) interfaces, buttons and other exposed interfaces, which makes the product not simple and beautiful, and also hinders the development of miniaturization. Summary of the invention

[0004] Embodiments of the present disclosure provide a function switching circuit, method, electronic device, and readable medium.

[0005] A first aspect of an embodiment of the present disclosure provides a function switching circuit, which is applied to an electronic device, including:

[0006] Universal Serial Bus interface;

[0007] A first functional module;

[0008] A second functional module;

[0009] Switching circuit;

[0010] The switching circuit is respectively connected to the universal serial bus interface, the first functional module and the second functional module;

[0011] The switching circuit is used to switch the connection between the universal serial bus interface and the first functional module and the second functional module, so as to switch from connecting the first functional module to connecting the second functional module or from connecting the second functional module to connecting the first functional module.

[0012] A second aspect of the embodiments of the present disclosure provides a function switching method, which is applied to an electronic device including the function switching circuit described in the first aspect, wherein the electronic device is connected to a host computer via the universal serial bus interface, and the method includes:

[0013] Reporting the working status of the first functional module and the second functional module to the host computer;

[0014] Obtaining a function switching instruction input by the host computer through the universal serial bus interface;

[0015] The switching circuit is controlled according to the function switching instruction to switch the connection between the universal serial bus interface and the first function module and the second function module.

[0016] A third aspect of the present disclosure provides a function switching method, which is applied to a host computer device, wherein the host computer device is connected to a universal serial bus interface in the function switching circuit of the first aspect, and the method includes:

[0017] Acquire the working status of the first functional module and the working status of the second functional module;

[0018] According to the working status of the first functional module and the working status of the second functional module, a function switching instruction is input to the universal serial bus interface to switch the connection between the first functional module and the second functional module and the universal serial bus interface.

[0019] A fourth aspect of an embodiment of the present disclosure provides an electronic device, comprising the function switching circuit described in the first aspect.

[0020] A fifth aspect of the present disclosure provides an electronic device, including:

[0021] at least one processor;

[0022] A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the method according to the second aspect, or implements the method according to the third aspect;

[0023] At least one I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.

[0024] A sixth aspect of an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to the second aspect is implemented, or the method according to the third aspect is implemented.

[0025] In the disclosed embodiment, a switching switch circuit is provided in the function switching circuit of the electronic device, and a universal serial bus interface, a first functional module and a second functional module are connected through the switching switch circuit. The switching switch circuit switches between the first functional module and the second functional module to connect to the universal serial bus interface, so as to switch from connecting to the first functional module to connecting to the second functional module or from connecting to the second functional module to connecting to the first functional module, so that the first functional module and the second functional module share a universal serial bus interface. Under the premise of ensuring the function of the electronic device, the debugging, upgrading and other operations of multiple functional modules in the electronic device can be realized through a single universal serial bus interface without increasing the cost or disassembling the device, thereby reducing the maintenance cost, improving the user experience, reducing the number of exposed interfaces of the electronic device, increasing the reliability of the electronic device, and providing the possibility for the aesthetics and miniaturization of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of the structure of a function switching circuit provided in an embodiment of the present disclosure;

[0027] Figure 2 Another structural schematic diagram of a function switching circuit provided in an embodiment of the present disclosure;

[0028] Figure 3 A schematic diagram of the structure of a switching circuit provided in an embodiment of the present disclosure;

[0029] Figure 4 Another structural schematic diagram of a function switching circuit provided in an embodiment of the present disclosure;

[0030] Figure 5 Another structural schematic diagram of a function switching circuit provided in an embodiment of the present disclosure;

[0031] Figure 6 A schematic diagram of an example of an AP+MODEM function switching circuit provided in an embodiment of the present disclosure;

[0032] Figure 7a A schematic diagram of a USB 3.0 switch structure provided in an embodiment of the present disclosure;

[0033] Figure 7b A schematic diagram of a USB2.0 switch structure provided in an embodiment of the present disclosure;

[0034] Figure 7c Another structural diagram of a USB2.0 switch provided in an embodiment of the present disclosure

[0035] Figure 7d A schematic diagram of a circuit structure of a USB physical port provided in an embodiment of the present disclosure;

[0036] Figure 7e A structural schematic diagram of a D flip-flop circuit provided in an embodiment of the present disclosure;

[0037] Figure 7f A schematic diagram of the circuit structure of a reset and forced download module provided in an embodiment of the present disclosure;

[0038] Figure 7g A schematic diagram of the circuit structure of an indicator light module provided in an embodiment of the present disclosure;

[0039] Figure 8 A schematic diagram of a function switching method provided by an embodiment of the present disclosure;

[0040] Fig. 9 A schematic diagram of another function switching method provided by an embodiment of the present disclosure;

[0041] Fig.10 A flowchart of a method for switching PC control functions provided by an embodiment of the present disclosure;

[0042] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0044] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0045] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0046] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0047] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0048] The disclosed embodiments are aimed at terminal devices such as RSU installed in outdoor environments. In order to meet the high requirements of such terminal devices for "three-proof" and size, a function switching circuit applied to electronic devices is provided to implement operations such as debugging and upgrading of multiple functional modules inside the electronic device through a USB physical interface, and to implement forced downloading when one of the functional modules freezes or encounters an abnormal situation such as an abnormality.

[0049] Figure 1 The figure shows a schematic diagram of the structure of a function switching circuit provided by an embodiment of the present disclosure, and the function switching circuit is applied to any type of electronic device.

[0050] The function switching circuit mainly includes:

[0051] Universal serial bus interface 10;

[0052] A first functional module 11;

[0053] The second functional module 12;

[0054] Switching switch circuit 13;

[0055] The switching circuit 13 is connected to the universal serial bus interface 10, the first functional module 11 and the second functional module 12 respectively;

[0056] The switch circuit 13 is used to switch the connection between the USB interface 10 and the first functional module 11 and the second functional module 12, so as to switch from connecting to the first functional module 11 to connecting to the second functional module 12 or from connecting to the second functional module 12 to connecting to the first functional module 11.

[0057] In some embodiments, Figure 2 Another structural schematic diagram of the function switching circuit provided by the embodiment of the present disclosure is shown, and the function switching circuit also includes a trigger module 40, the input end of the trigger module 40 is connected to the power supply end of the universal serial bus interface 10, and the switch control output end of the trigger module 40 is connected to the control end of the switching switch circuit 13; the trigger module 40 is used to convert the level state of the signal of the switch control output end when triggered, and control the switching switch circuit 13 to switch the connection between the universal serial bus interface 10 and the first function module 11 and the second function module 12. For example, the switch control output end of the trigger module 40 outputs a first level signal, and the switch control output end of the trigger module 40 is converted to a second level signal when the trigger module 40 is triggered once; similarly, the switch control output end of the trigger module 40 outputs a second level signal, and the switch control output end of the trigger module 40 is converted to a first level signal when the trigger module 40 is triggered once.

[0058] In an exemplary embodiment, the trigger module 40 is implemented by a D flip-flop.

[0059] In some embodiments, the triggering module 40 is triggered in at least one of the following ways:

[0060] A triggering mode for plugging and unplugging the universal serial bus interface;

[0061] Physical button triggering method;

[0062] Virtual button triggering method.

[0063] Exemplarily, the trigger module is triggered by plugging in and out of a USB port, or by clicking a button set between the trigger module input terminal and the USB power terminal, or by connecting or disconnecting the trigger module input terminal and the USB power terminal through a virtual button on a display screen. This is just an example, and at least two triggering methods can be combined in an application, such as combining the pressing operation of a physical button and a virtual button as an effective triggering method.

[0064] In some embodiments, Figure 3 1 is a schematic diagram of the structure of a switching circuit provided in an embodiment of the present disclosure, wherein the switching circuit 13 includes a first switch module 20 , a second switch module 21 and a third switch module 22 .

[0065] The first universal serial bus interface signal transmission end of the first functional module 11 is connected to the first connection end of the first switch module 20; the second universal serial bus interface transmission end of the first functional module 11 is connected to the first connection end of the second switch module 21; the third universal serial bus interface transmission end of the first functional module 11 is connected to the first connection end of the third switch module 22;

[0066] The first universal serial bus interface signal transmission end of the second functional module 12 is connected to the second connection end of the second switch module 21; the second universal serial bus interface signal transmission end of the second functional module 12 is connected to the second connection end of the third switch module 22;

[0067] The second connection end of the first switch module 20 is connected to the third connection end of the second switch module 21;

[0068] The third connection end of the first switch module 20 is connected to the universal serial bus interface 10;

[0069] The control ends of the first switch module 20, the second switch module 21 and the third switch module 22 are respectively connected to the switch control output end of the first functional module 11, and the control ends of the first switch module 20, the second switch module 21 and the third switch module 22 are respectively connected to the switch control output end of the trigger module 40.

[0070] In some embodiments, the switch control output terminal of the first functional module 11 outputs a first level signal, or the switch control output terminal of the trigger module 40 outputs a first level signal;

[0071] The first switch module 20 is used to connect the first function module 11 and the universal serial bus interface 10 when a first level signal is input to the control end of the first switch module 20;

[0072] The second switch module 21 is used to connect the low-level protocol version of the universal serial bus interface signal transmission channel between the first function module 11 and the second function module 12 when a first level signal is input to the control end of the second switch module 21;

[0073] The third switch module 22 is used for connecting the high-level protocol version of the universal serial bus interface signal transmission channel between the first functional module 11 and the second functional module 12 when a first level signal is input to the control end of the third switch module 22 .

[0074] In some embodiments, the switch control output terminal of the first functional module 11 outputs a second level signal, or the switch control output terminal of the trigger module 40 outputs a second level signal;

[0075] The first switch module 20 is used to disconnect the first universal serial bus interface signal transmission end of the first functional module 11 when a second level signal is input to the control end of the first switch module 20;

[0076] The second switch module 21 is used to disconnect the second universal serial bus interface transmission end of the first functional module 11 when a second level signal is input to the control end of the second switch module 21;

[0077] The third switch module 22 is used to disconnect the third universal serial bus interface transmission end of the first functional module 11 when a second level signal is input to the control end of the third switch module 22;

[0078] The first switch module 20 and the second switch module 21 are further used to connect the second functional module 12 and the universal serial bus interface 10 under the control of the second level signal.

[0079] In some embodiments, Figure 4 As shown is another structural schematic diagram of the function switching circuit provided by an embodiment of the present disclosure, the function switching circuit also includes a forced download module 30, which is connected between the first function module 11 and the second function module 12; the forced download module 30 is used to control the first function module 11 to perform a forced download operation according to the input first function module repair instruction; and is used to control the second function module 12 to perform a forced download operation according to the input second function module repair instruction; wherein the forced download operation includes: hard reset and entering forced download mode.

[0080] Among them, when the universal serial bus interface 10 is connected to the first functional module 11, the first functional module 11 is used to input the second functional module repair instruction to the forced download module 30 according to the input second functional module repair instruction; when the universal serial bus interface 10 is connected to the second functional module 12, the second functional module 12 is used to input the first functional module repair instruction to the forced download module 30 according to the input first functional module repair instruction.

[0081] Exemplarily, the first functional module 11 is used to input the second functional module repair instruction to the forced download module 30 according to the input second functional module repair instruction; the forced download module 30 is used to control the second functional module 12 to perform a hard reset and enter a forced download mode according to the input second functional module repair instruction.

[0082] Exemplarily, the trigger module 40 is used to output a second level signal at the switch control output end of the trigger module 40 after plugging and unplugging the universal serial bus interface 10; the first switch module 20 is used to disconnect the connection with the first universal serial bus interface signal transmission end of the first functional module 11 under the control of the second level signal; the second switch module 21 is used to disconnect the connection with the second universal serial bus interface transmission end of the first functional module 11 under the control of the second level signal; the third switch module 22 is used to disconnect the connection with the third universal serial bus interface transmission end of the first functional module 11 under the control of the second level signal; the second functional module 12 is used to input a repair instruction to the forced download module 30 according to the input first functional module repair instruction; the forced download module 30 is used to control the first functional module 11 to perform a hard reset and enter a forced download mode according to the input repair instruction.

[0083] In an exemplary embodiment, the first level signal is a low level signal, and the second level signal is a high level signal.

[0084] In some embodiments, the first switch module 20 supports the Universal Serial Bus 2.0 protocol, also referred to herein as USB2.0 switch 1; the second switch module 21 supports the Universal Serial Bus 2.0 protocol, also referred to herein as USB2.0 switch 2; the third switch module 22 supports the Universal Serial Bus 3.0 protocol, also referred to herein as USB3.0 switch.

[0085] In some embodiments, Figure 5 Shown is another structural schematic diagram of the function switching circuit provided by an embodiment of the present disclosure, the function switching circuit also includes an indicator light module 50, the first input end of the indicator light module 50 is connected to the indicator light control signal output end of the first function module 11, and the second input end of the indicator light module 50 is connected to the indicator light control signal output end of the second function module 12; the indicator light module 50 is used to control the indicator light to turn on and off according to the indicator light control signal output from the indicator light control signal output end of the first function module 11 and the indicator light control signal output from the indicator light control signal output end of the second function module 12.

[0086] The number of indicator lights included in the indicator light module 50 is not limited, and can be one or more.

[0087] Exemplarily, when the indicator light module 50 includes an indicator light, the indicator light control signal output by the first functional module 11 controls the indicator light to light up and off in a first manner, and the indicator light control signal output by the second functional module 12 controls the indicator light to light up and off in a second manner, wherein the frequencies of turning on and off of the indicator lights corresponding to the first manner and the second manner are different, for example, the first manner is always on, and the second manner is alternating between turning on and off.

[0088] When the indicator light module 50 includes at least two indicator lights, the indicator light control signal output by the first functional module 11 controls the lighting of the first group of indicator lights, and the indicator light control signal output by the second functional module 12 controls the lighting of the second group of indicator lights, wherein the first group of indicator lights includes at least one indicator light, the second group of indicator lights includes at least one indicator light, and at least one of the first group of indicator lights and the second group of indicator lights is different.

[0089] Exemplarily, the indicator light module 50 is used to control the first indicator light on and off according to the indicator light control signal output from the indicator light control signal output end of the first functional module 11; and is used to control the second indicator light on and off according to the indicator light control signal output from the indicator light control signal output end of the second functional module 12. The first indicator light and the second indicator light are two indicator lights. In the case where the switching switch circuit 13 is connected to the universal serial bus interface 10 and the first functional module 11, the indicator light control signal output from the indicator light control signal output end of the first functional module 11 is used to control the first indicator light on, and the indicator light control signal output from the indicator light control signal output end of the second functional module 12 is used to control the second indicator light off; in the case where the switching switch circuit 13 is connected to the universal serial bus interface 10 and the second functional module 12, the indicator light control signal output from the indicator light control signal output end of the first functional module 11 is used to control the first indicator light off, and the indicator light control signal output from the indicator light control signal output end of the second functional module 12 is used to control the second indicator light on.

[0090] In the exemplary embodiment, the first indicator light is green and the second indicator light is blue. This is just an example. The two indicator lights can also be set to other colors as needed. The green light indicates that the USB port is currently enumerated as the debug port of the first functional module, and the blue light indicates that the USB port is currently enumerated as the debug port of the second functional module.

[0091] In some embodiments, the first functional module is an application processor, and the second functional module is a modem.

[0092] In an exemplary embodiment, after the electronic device is powered off and restarted, the function switching circuit enumerates the USB port as the debug port of the first function module (i.e., AP) by default, that is, the switch control output end of the first function module outputs a first level signal after power off and restart, and the switch control output end of the trigger module outputs a first level signal after power off and restart, so that the USB port is connected to the first function module.

[0093] In an exemplary embodiment, the function switching circuit can realize multi-function switching through a single USB port, specifically including: (1) when the AP (i.e., the first function module) and MODEM (i.e., the second function module) of the electronic device are working normally, the USB port is switched to the AP end to realize debugging and upgrading of the AP; (2) when the AP and MODEM of the device are working normally, the USB port is switched to the MODEM end to realize debugging and upgrading of the MODEM; (3) when the MODEM of the device crashes, the USB port is first switched to the AP end, and the user inputs the AP end command to make the MODEM enter the hard reset and forced download mode (Force USB Boot Mode), so as to realize upgrading and repairing the MODEM; (4) when the AP of the device crashes, the USB port is first switched to the MODEM end, and the user inputs the MODEM end command to make the AP enter the hard reset and forced download mode (Force USB Boot Mode), so as to realize upgrading and repairing the AP.

[0094] In an exemplary embodiment, Figure 6 The figure shows a schematic diagram of the structure of an example of an AP+MODEM function switching circuit. The USB switch control 1 signal output from the switch control output end of the AP is configured to be low level by default. The USB switch control 2 signal output from the switch control output end of the D flip-flop is also output at a low level by default. When the device is working normally, the USB3.0 switch is turned on, and the USB2.0 signal between the AP and the MODEM (abbreviated as MDM in the figure) is connected through the USB2.0 switch 2, so that the AP and the MODEM can communicate normally through the USB. At this time, the USB2.0 switch 1 connects another set of USB signals (AP_USB2.0_1) of the AP processor to the USB physical interface of the device, and the AP outputs the LED control 1 signal to a high level, so that the green LED indicator of the device is lit. The user can debug and upgrade the AP processor by connecting the USB interface of the device to the PC. Figure 6 The module named Hard Reset / BOOT is a mandatory download module.

[0095] The user inputs a switching command on the AP side to control the USB switch control 1 signal output by the AP to be pulled high, and the device can execute the switching of the USB2.0 signal (MDM_USB_2.0) of the MODEM. At this time, the USB3.0 switch is disconnected. Due to the joint action of USB2.0 switch 1 and USB2.0 switch 2, the USB port of the device is switched to the USB2.0 signal of the MODEM, and the MODEM outputs the LED control 2 signal as a high level, so that the blue LED indicator of the device lights up, so as to realize the debugging and upgrading of the MODEM.

[0096] If the MODEM of the device crashes and becomes a brick, plug the USB port into the PC and the port can be enumerated to the AP side. The user can input the MODEM repair command on the AP side, and the AP can execute the hard reset of the MODEM and enter the forced download mode, and switch the USB port to the MODEM, thereby completing the download repair of the MODEM; if the AP processor of the device crashes and becomes a brick, by plugging and unplugging the USB interface between the device and the PC, a signal flip will occur on USB_5V. Using the state latching principle of the D flip-flop, the D flip-flop output (USB switch control 2) signal will also change its state, thereby controlling the USB switch to switch the USB port to the MODEM side. By inputting the AP repair command to the MODEM, the MODEM executes the AP hard reset and enters the forced download mode, thereby completing the download repair of the AP processor.

[0097] It can be seen that a single USB interface can realize multi-function switching as follows: (1) The AP and MODEM of the device are working normally, and the USB interface is switched to the AP side to realize AP debugging and upgrading, etc.; (2) The AP and MODEM of the device are working normally, and the USB interface is switched to the MODEM side to realize MODEM debugging and upgrading, etc.; (3) The MODEM of the device is frozen, and the USB interface is first switched to the AP side. By inputting the AP side command, the MODEM enters the hard reset and forced download mode (Boot Mode), and the MODEM can be upgraded and repaired; (4) The AP of the device is frozen, by plugging and unplugging the USB between the device and the PC, the USB interface is first switched to the MODEM side, and by inputting the MODEM side command, the AP enters the hard reset and forced download mode (Boot Mode), and the AP can be upgraded and repaired.

[0098] in, Figure 7a The D5 device shown is a USB 3.0 switch. Figure 7b and Figure 7c The D19 and D43 devices shown are USB 2.0 switches. Figure 7d The circuit structure diagram of the USB physical port is shown. The AP processor selected in this exemplary embodiment has two groups of USB signals, of which USB1 only supports USB2.0 for debugging and upgrading the AP, and the other USB2 supports USB3.0 and USB2.0 for USB communication with the MODEM during normal operation. The MODEM of this device has only one group of USB, supporting USB3.0 and USB2.0. In the normal working scenario of the device, it communicates with the USB2 of the AP. In the debugging scenario, the USB physical interface of the device can switch to the USB2.0 signal of the MODEM for debugging and upgrading the MODEM.

[0099] AP_USB2_SS3_RX_P, AP_USB2_SS3_RX_M, AP_USB2_SS3_TX_P, AP_USB2_SS3_TX_M are the USB3.0 signals of AP's USB2, USB_SS_RX_P, USB_SS_RX_M, USB_SS_TX_P, USB_SS_TX_M are the USB3.0 signals of MODEM. AP_USB2_DP, AP_USB2_DM are the USB2.0 signals of AP's USB2. AP_USB1_DP, AP_USB1_DM are the USB2.0 signals of AP's USB1. 5G_USB_DP, 5G_USB_DM are the USB2.0 signals of MODEM.

[0100] The CONN_USB_CTL signal is the control signal of the USB switch. It is low by default when working normally. The USB signal between the AP and the MODEM communicates normally. The USB2.0 signal of the AP's USB1 is connected to the device's USB port by default. The user connects to the PC and can debug and upgrade the AP. When the CONN_USB_CTL signal is high, the USB signal between the AP and the MODEM is disconnected, and the MODEM's USB2.0 signal will switch to the device's USB port. The user can debug and upgrade the MODEM. The CONN_USB_CTL signal can be high when the AP processor receives the instruction and executes the USB switching action of the MODEM, or it can be low when the MODEM receives the instruction and executes the USB switching of the AP.

[0101] Figure 7e The structure diagram of the D flip-flop circuit is shown. The specific working principle of triggering and power-off restart recovery is as follows: Due to the charging characteristics of capacitor C261, after the device is powered on, the initial logic of CLR_N of the D flip-flop chip D22 is 0, and the initial logic of PR_N is 1, so the default logic of the output signal Q (i.e. CONN_USB_CTL) of D22 is low. Connect the USB interface of the device to the PC. If the user performs a plug-in action, a positive pulse signal D_CLK is generated, and the CONN_USB_CTL signal logic is flipped to a high level at the rising edge, controlling the USB switch circuit, so that the USB interface of the device switches to MODEM. VD11 plays the role of forward signal conduction and reverse isolation. After power off and restart, CONN_USB_CTL returns to a low level, and the device enumerates the AP debug port by default.

[0102] Figure 7fThe figure shows a circuit structure diagram of the forced download module. The working principle is: when the MODEM crashes, after the AP inputs a command, it can execute the reset of the MODEM and control the MODEM to enter the forced download mode, and switch the USB port to the MODEM for upgrading; when the AP crashes, by plugging and unplugging the USB between the device and the PC, the USB port can be switched to the MODEM, and after the MODEM side inputs a command, it can execute the reset of the AP and control the AP to enter the forced download mode, and switch the USB port to the AP for upgrading.

[0103] Figure 7g The circuit structure diagram of the indicator light module is shown. The working principle is: when the electronic device is working normally, the USB signal (AP_USB2.0_1) of the AP processor is connected to the USB physical port of the electronic device. At this time, the AP processor outputs the AP_LED_CTL signal as a high level, so that the green LED indicator of the electronic device is lit, indicating that the electronic device is currently enumerating the debug port of the AP; when the user switches the USB2.0 signal (MDM_USB_2.0) of the MODEM, the MODEM outputs the MDM_LED_CTL signal as a high level, so that the blue LED indicator of the electronic device is lit, indicating that the electronic device is currently enumerating the debug port of the MODEM. After the electronic device freezes or becomes bricked and is repaired, the LED light can display the corresponding green or blue according to the currently enumerated USB debug port of the AP or the USB debug port of the MODEM.

[0104] In the disclosed embodiment, a switching switch circuit is provided in the function switching circuit of the electronic device, and a universal serial bus interface, a first functional module and a second functional module are connected through the switching switch circuit. The switching switch circuit switches between the first functional module and the second functional module to connect to the universal serial bus interface, so that the first functional module and the second functional module share a universal serial bus interface. Therefore, under the premise of ensuring the function of the electronic device, debugging, upgrading and other operations of multiple functional modules in the electronic device can be implemented through a single universal serial bus interface without increasing costs or disassembling the device, thereby reducing maintenance costs, improving user experience, reducing the number of exposed interfaces of the electronic device, increasing the reliability of the electronic device, and providing the possibility for the aesthetics and miniaturization of the electronic device.

[0105] An embodiment of the present disclosure also provides an electronic device, including the function switching circuit described above.

[0106] The electronic device provided by the embodiment of the present disclosure realizes switching of different functional states of the electronic device through a USB port, which not only makes the device more beautiful and more compact, but also saves the number of exposed interfaces of structural parts, increases the reliability of the device, and saves costs. In addition, the device can be upgraded by forcibly downloading the device through a hardware switching circuit when the device freezes or becomes bricked, without disassembling the device, thereby greatly reducing maintenance costs and improving user experience.

[0107] In an exemplary embodiment, the electronic device is a terminal device such as RSU, and the electronic device includes an application processor and a modem. Through a single USB port, it can realize AP debugging, AP upgrade, MODEM debugging, MODEM upgrade, and in the case of AP or MODEM crash of the device, forced download can be achieved without destroying the structural parts. The function switching circuit, a hardware circuit, can be used to switch different functional states of the electronic device through a single USB port. During normal operation, the user connects the USB port of the electronic device to a host computer (such as a PC) and inputs a switching instruction. The electronic device can execute USB switching between the AP processor and the MODEM to meet the debugging requirements of different scenarios. If the device crashes and becomes a brick, the USB switching between the AP processor and the MODEM can also be achieved by plugging and unplugging the USB port between the device and the PC, and the forced download of the device can be achieved.

[0108] In an exemplary embodiment, the electronic device includes but is not limited to RSU, OBU, TBOX, VBOX, IHU, CPE, portable WIFI device (also called UFI), and other terminal electronic products with a single USB port and realizing multiple functions.

[0109] In the above embodiments, the specific structure of the function switching circuit is not limited. The above only takes the combination of two functional modules, a USB2.0 switch, a USB3.0 switch, a USB port and a D flip-flop as an example. Other forms of combinations can also be used. For example, the number of USB switches and the number of D flip-flops can be set as needed. In addition to AP and MODEM, the functional module can also be other functional modules, etc., which are not listed one by one here.

[0110] The present disclosure also provides a function switching method, which is applied to an electronic device including the function switching circuit described above, wherein the electronic device is connected to a host computer via a universal serial bus interface, such as Figure 8 As shown, the method mainly includes:

[0111] Step 801, reporting the working status of the first functional module and the second functional module to the host computer;

[0112] Step 802, obtaining a function switching instruction input by the host computer through the universal serial bus interface;

[0113] Step 803: Control the switch circuit to switch the connection between the universal serial bus interface and the first function module and the second function module according to the function switching instruction.

[0114] The working states of the first functional module and the second functional module include but are not limited to the following:

[0115] The working states of the first functional module and the second functional module are both normal;

[0116] The working state of the first functional module is normal and the working state of the second functional module is abnormal;

[0117] The working state of the first functional module is abnormal and the working state of the second functional module is normal;

[0118] The working states of the first functional module and the second functional module are both abnormal, which is not within the scope of discussion of the embodiments of the present disclosure.

[0119] The embodiment of the present disclosure further provides a function switching method, which is applied to a host computer device, wherein the host computer device is connected to the universal serial bus interface in the function switching circuit described above.

[0120] Fig. 9 The figure is a schematic diagram of the function switching method provided by the embodiment of the present disclosure, which mainly includes:

[0121] Step 901, obtaining the working status of the first functional module and the working status of the second functional module;

[0122] Step 902: input a function switching instruction to the universal serial bus interface according to the working status of the first functional module and the working status of the second functional module, so as to switch the connection between the first functional module and the second functional module and the universal serial bus interface.

[0123] In some embodiments, according to the working state of the first functional module and the working state of the second functional module, inputting a function switching instruction to the universal serial bus interface to switch the connection between the first functional module and the second functional module and the universal serial bus interface includes:

[0124] When the working states of the first function module and the second function module are both normal, inputting a function switching instruction for enabling the first function module into the universal serial bus interface, so that the function switching circuit connects the first function module and the universal serial bus interface;

[0125] or

[0126] When the working states of the first function module and the second function module are both normal, inputting a function switching instruction for enabling the second function module into the universal serial bus interface, so that the function switching circuit connects the second function module and the universal serial bus interface;

[0127] or

[0128] When the working state of the first functional module is normal and the working state of the second functional module is abnormal, inputting a second functional module repair instruction to the universal serial bus interface so that the function switching circuit connects the first functional module and the universal serial bus interface, and the first functional module performs a forced download operation on the second functional module through the forced download module;

[0129] or

[0130] When the working state of the first functional module is abnormal and the working state of the second functional module is normal, a first functional module repair instruction is input into the universal serial bus interface, so that the function switching circuit connects the second functional module and the universal serial bus interface, and the second functional module performs a forced download operation on the first functional module through a forced download module.

[0131] In one exemplary embodiment, see Fig.10 As shown in the flowchart, the PC, which is the host device, controls Figure 6 The method flow of the AP+MODEM function switching circuit for performing function switching is as follows:

[0132] Insert the device's USB port into the PC to determine whether the device is frozen and execute subsequent processes based on the determination result;

[0133] If the device is not frozen, enter the AP test command. At this time, the USB switch control 1 signal outputs a low level, the USB switch control 2 signal outputs a low level, the LED control 1 signal outputs a high level, and the LED control 2 signal outputs a low level. The device can realize AP debugging and upgrading. Enter the MODEM test command. At this time, the USB switch control 1 signal outputs a high level, the USB switch control 2 signal outputs a low level, the LED control 1 signal outputs a low level, and the LED control 2 signal outputs a high level. The device can realize MODEM debugging and upgrading.

[0134] If the device crashes, first determine whether it is the AP or the MODEM. If it is the MODEM, since the device USB port enumerates the AP's debug port by default, enter the MODEM repair command. At this time, the USB switch control 1 signal outputs a low level, and the USB switch control 2 signal outputs a low level. The MODEM is reset through the AP and enters the forced download mode to complete the upgrade and repair of the MODEM. If it is the AP, plug in and unplug the USB between the device and the PC, switch the USB port to the MODEM first, and enter the AP repair command. At this time, the USB switch control 1 signal outputs a low level, and the USB switch control 2 signal outputs a high level. The AP is reset through the MODEM and enters the forced download mode to complete the upgrade and repair of the AP.

[0135] It should be noted that the above embodiments only illustrate debugging, upgrading, and forced downloading of the functional modules, which are not all operations on the functional modules. Other operations on the functional modules through the USB port are also included, which are not listed here one by one.

[0136] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this disclosure. Adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this disclosure.

[0137] Reference Fig.11 , an embodiment of the present disclosure provides an electronic device, comprising:

[0138] at least one processor 1101;

[0139] A memory 1102 storing at least one program, and when the at least one program is executed by the at least one processor, the at least one processor implements the above method;

[0140] At least one I / O interface 1103 is connected between the processor and the memory and is configured to implement information exchange between the processor and the memory.

[0141] Among them, the processor 1101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 1102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 1103 is connected between the processor 1101 and the memory 1102, and can realize information interaction between the processor 1101 and the memory 1102, including but not limited to a data bus (Bus), etc.

[0142] In some embodiments, the processor 1101 , the memory 1102 , and the I / O interface 1103 are connected to each other via a bus, and further connected to other components of the computing device.

[0143] This embodiment further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in this embodiment is implemented. To avoid repeated description, the specific steps of the method are not repeated here.

[0144] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods applied for above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0145] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0146] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0147] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A function switching circuit, characterized in that: Used in electronic equipment, including: Universal Serial Bus interface; A first functional module; A second functional module; Switching circuit; The switching circuit is respectively connected to the universal serial bus interface, the first functional module and the second functional module; The switching circuit is used to switch the connection between the universal serial bus interface and the first functional module and the second functional module, so as to switch from connecting the first functional module to connecting the second functional module or from connecting the second functional module to connecting the first functional module.

2. The function switching circuit according to claim 1, characterized in that: The function switching circuit further comprises a trigger module, an input end of the trigger module is connected to the power end of the universal serial bus interface, and a switch control output end of the trigger module is connected to the control end of the switching switch circuit; The trigger module is used to switch the level state of the signal at the switch control output end when triggered, and control the switching circuit to switch the connection between the universal serial bus interface and the first functional module and the second functional module.

3. The function switching circuit according to claim 2, characterized in that: The triggering mode of the trigger module includes at least one of the following: A triggering mode for plugging and unplugging the universal serial bus interface; Physical button triggering method; Virtual button triggering method.

4. The function switching circuit according to claim 2, characterized in that: The switching circuit includes a first switch module, a second switch module and a third switch module; The first universal serial bus interface signal transmission end of the first functional module is connected to the first connection end of the first switch module; the second universal serial bus interface transmission end of the first functional module is connected to the first connection end of the second switch module; the third universal serial bus interface transmission end of the first functional module is connected to the first connection end of the third switch module; The first universal serial bus interface signal transmission end of the second functional module is connected to the second connection end of the second switch module; the second universal serial bus interface signal transmission end of the second functional module is connected to the second connection end of the third switch module; The second connection end of the first switch module is connected to the third connection end of the second switch module; The third connection end of the first switch module is connected to the universal serial bus interface; The control ends of the first switch module, the second switch module and the third switch module are respectively connected to the switch control output end of the first functional module, and the control ends of the first switch module, the second switch module and the third switch module are respectively connected to the switch control output end of the trigger module.

5. The function switching circuit according to claim 4, characterized in that: The first switch module is used to connect the first function module and the universal serial bus interface when a first level signal is input to the control end of the first switch module; and, when a second level signal is input to the control end of the first switch module, disconnecting the first universal serial bus interface signal transmission end of the first functional module; The second switch module is used for connecting the low-level protocol version of the universal serial bus interface signal transmission channel between the first function module and the second function module when a first level signal is input to the control end of the second switch module; and, when a second level signal is input to the control end of the second switch module, disconnecting the second universal serial bus interface transmission end of the first functional module; The third switch module is used for connecting the high-level protocol version of the universal serial bus interface signal transmission channel between the first function module and the second function module when a first level signal is input to the control end of the third switch module; and, when a second level signal is input to the control end of the third switch module, disconnecting the third universal serial bus interface transmission end of the first functional module; The first switch module and the second switch module are further used to connect the second functional module and the universal serial bus interface under the control of the second level signal.

6. The function switching circuit according to any one of claims 1 to 5, characterized in that: The function switching circuit further includes a forced download module connected between the first function module and the second function module; The forced download module is used to control the first functional module to perform a forced download operation according to the input first functional module repair instruction; And used for controlling the second functional module to execute the forced download operation according to the input second functional module repair instruction; wherein the forced download operation includes: hard reset and entering forced download mode.

7. The function switching circuit according to claim 6, characterized in that: When the universal serial bus interface is connected to the first functional module, the first functional module is used to input the second functional module repair instruction to the forced download module according to the input second functional module repair instruction; When the universal serial bus interface is connected to the second functional module, the second functional module is used to input the first functional module repair instruction to the forced download module according to the input first functional module repair instruction.

8. The function switching circuit according to claim 1, characterized in that: The function switching circuit also includes an indicator light module, a first input end of the indicator light module is connected to an indicator light control signal output end of the first function module, and a second input end of the indicator light module is connected to an indicator light control signal output end of the second function module.

9. The function switching circuit according to claim 1, characterized in that: The first functional module is an application processor, and the second functional module is a modem.

10. A function switching method, characterized in that: Applied to an electronic device comprising the function switching circuit according to any one of claims 1 to 9, the electronic device is connected to a host computer via the universal serial bus interface, and the method comprises: Reporting the working status of the first functional module and the second functional module to the host computer; Obtaining a function switching instruction input by the host computer through the universal serial bus interface; The switching circuit is controlled according to the function switching instruction to switch the connection between the universal serial bus interface and the first function module and the second function module.

11. A function switching method, characterized in that: Applied to a host computer device, the host computer device is connected to a universal serial bus interface in a function switching circuit according to any one of claims 1 to 9, the method comprising: Acquire the working status of the first functional module and the working status of the second functional module; According to the working status of the first functional module and the working status of the second functional module, a function switching instruction is input to the universal serial bus interface to switch the connection between the first functional module and the second functional module and the universal serial bus interface.

12. The function switching method according to claim 11, characterized in that: Inputting a function switching instruction to the universal serial bus interface according to the working state of the first functional module and the working state of the second functional module to switch the connection between the first functional module and the second functional module and the universal serial bus interface includes: When the working states of the first function module and the second function module are both normal, inputting a function switching instruction for enabling the first function module into the universal serial bus interface, so that the function switching circuit connects the first function module and the universal serial bus interface; or When the working states of the first function module and the second function module are both normal, inputting a function switching instruction for enabling the second function module into the universal serial bus interface, so that the function switching circuit connects the second function module and the universal serial bus interface; or When the working state of the first functional module is normal and the working state of the second functional module is abnormal, inputting a second functional module repair instruction to the universal serial bus interface so that the function switching circuit connects the first functional module and the universal serial bus interface, and the first functional module performs a forced download operation on the second functional module through the forced download module; or When the working state of the first functional module is abnormal and the working state of the second functional module is normal, a first functional module repair instruction is input into the universal serial bus interface, so that the function switching circuit connects the second functional module and the universal serial bus interface, and the second functional module performs a forced download operation on the first functional module through a forced download module.

13. An electronic device, characterized in that: Includes the function switching circuit described in any one of claims 1-9.

14. An electronic device, characterized in that: include: at least one processor; A memory having at least one program stored thereon, when the at least one program is executed by the at least one processor, the at least one processor implements The method according to claim 10, or the method according to any one of claims 11-12; At least one I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.

15. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to claim 10 is implemented, or the method according to any one of claims 11-12 is implemented.

Citation Information

Cited By

  • 5G module and download port adaptive system based on USB protocol

    CN120614717A