CN114328329A - Communication module design method and device compatible with master and slave devices - Google Patents

Communication module design method and device compatible with master and slave devices Download PDF

Info

Publication number
CN114328329A
CN114328329A CN202111321866.9A CN202111321866A CN114328329A CN 114328329 A CN114328329 A CN 114328329A CN 202111321866 A CN202111321866 A CN 202111321866A CN 114328329 A CN114328329 A CN 114328329A
Authority
CN
China
Prior art keywords
mode
value
communication module
pcie
flag bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111321866.9A
Other languages
Chinese (zh)
Inventor
李升根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202111321866.9A priority Critical patent/CN114328329A/en
Publication of CN114328329A publication Critical patent/CN114328329A/en
Priority to PCT/CN2022/097637 priority patent/WO2023082622A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits
    • H04B1/401Circuits for selecting or indicating operating mode

Abstract

The embodiment of the application discloses a master-slave device compatible communication module design method, which is applied to electronic equipment, wherein the electronic equipment is provided with a communication module, and the communication module is used for providing a network for the electronic equipment and comprises the following steps: determining the working mode of the communication module as a first mode based on a first value of the flag bit, wherein the working mode comprises a high-speed serial computer expansion bus (PCIe) master device mode and a PCIe slave device mode, and the flag bit is a flag bit of a memory of the communication module; changing the value of the flag bit from a first value to a second value if the first mode is different from the second mode; the operating mode of the communication module is determined to be the second mode based on the second value. According to the embodiment of the application, the application range of the communication module can be enlarged.

Description

Communication module design method and device compatible with master and slave devices
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a master-slave device compatible communication module design method and device.
Background
The wireless network card is a wireless terminal device, which can access the internet through wireless network connection under the wireless coverage of the wireless local area network. Namely, the electronic equipment can realize the internet access without connecting a network cable. The wireless network card can be divided into an external network card and an internal network card. The built-in network card can be a wireless network card integrated in electronic equipment such as a notebook, a smart phone, a tablet computer and the like. The external network card may be classified into a Universal Serial Bus (USB) wireless network card, a Peripheral Component Interconnect (PCI) wireless network card, and the like, and the external network card may be inserted into an electronic device such as a notebook computer to provide a network service.
However, when the external network card provides a network, an upper computer is always required, and the external network card can be used as a PCIe slave device. For example, a PCIe-m.2 keyB communication module type wireless external network card needs to have an internal network card as an upper computer inside a tablet computer, and the external network card is connected to the internal network card, so that a network can be provided, otherwise, the network cannot be provided.
Disclosure of Invention
The embodiment of the application discloses a master-slave device compatible communication module design method and device, which are used for expanding the use range of a communication module.
A first aspect discloses a master-slave device compatible communication module design method, including: the method is applied to electronic equipment, the electronic equipment is provided with a communication module, the communication module is used for providing a network for the electronic equipment, and the method comprises the following steps: determining an operating mode of the communication module as a first mode based on a first value of a flag bit, the operating mode including a high-speed serial computer expansion bus (PCIe) master device mode and a PCIe slave device mode, the flag bit being a flag bit of a memory of the communication module; changing the value of the flag bit from the first value to a second value if the first mode is different from a second mode; determining an operating mode of the communication module as the second mode based on the second value.
In the embodiment of the application, the electronic device defines that the values of different flag bits in the memory represent different working modes, and switches the working modes by changing the values of the flag bits, so that the PCIe-m.2 keyB communication module can work not only in a PCIe slave device mode but also in a PCIe master device mode. Therefore, the free switching of the working modes can be realized according to the needs of users, so that the use range of the PCIe-M.2 keyB communication module can be expanded, and the use flexibility is improved.
As a possible implementation, the method further comprises: receiving the second mode of user input.
In the embodiment of the application, the electronic device can determine which mode the current working mode needs to be switched to according to the working mode input by the user, so that the operability of the user is improved, and the switching flexibility is improved.
As a possible implementation, the second mode is a mode stored by the electronic device.
In this embodiment of the application, the second mode may also be a working mode already stored in the electronic device, and when the electronic device acquires the second mode, it may be further determined whether the second mode is the same as the first mode, and it may be further determined whether the working mode needs to be switched. Therefore, the autonomy that the electronic equipment can switch the working mode is higher, the operation participated by the user is simpler, and the user experience can be improved.
As a possible implementation, after the changing the value of the flag bit from the first value to the second value, the method further includes: storing the second value; and restarting the electronic equipment.
In the embodiment of the application, after the flag bit is changed from the first value to the second value, the electronic device may be restarted (restarted or restarted after shutdown), and during the startup process of the electronic device, the electronic device may be restarted to determine the working mode according to the value of the flag bit, so that the switching may be completed. The restart is now a necessary step in the handover process so that the integrity of the method can be guaranteed.
As a possible implementation, the changing the value of the flag bit from the first value to the second value in the case that the first mode is different from the second mode includes: generating an AT instruction under the condition that the first mode is different from the second mode; and changing the value of the flag bit from the first value to a second value according to the AT instruction.
As a possible implementation, the changing the value of the flag bit from the first value to the second value in the case that the first mode is different from the second mode includes: receiving a switching instruction input by a user, wherein the switching instruction is an instruction for indicating to switch the current working mode by the user under the condition that the first mode and the second mode are different; changing the value of the flag bit from the first value to a second value in response to the switch instruction.
In the embodiment of the application, a user may make a determination of whether to switch according to the current first mode and the current second mode, and when the user determines that the current working mode needs to be switched, the user needs to input a switching instruction (for example, click a control for determining switching, or input a command for switching). When the electronic device receives a switch instruction, the switch may be performed in response to the instruction. In the process, the judgment of whether the switching is performed or not is mastered in the hand of the user, so that the user experience can be improved.
As a possible implementation manner, the first mode is a PCIe slave mode, the second mode is a PCIe master mode, and the flag bit is a register value or a custom pin level value of a memory of the communication module.
A second aspect discloses an electronic device comprising: one or more processors and one or more memories for storing computer program code comprising computer instructions, the electronic device being provided with a communication module for providing a network for the electronic device, which when executed by the one or more processors, causes the electronic device to perform: determining an operating mode of the communication module as a first mode based on a first value of a flag bit, the operating mode including a PCIe master device mode and a PCIe slave device mode, the flag bit being a flag bit of a memory of the communication module; changing the value of the flag bit from the first value to a second value if the first mode is different from a second mode; determining an operating mode of the communication module as the second mode based on the second value.
In the embodiment of the application, the electronic device defines different values of the flag bit to indicate different working modes, and switches the working modes by changing the value of the flag bit, so that the PCIe-m.2 keyB communication module can work not only in a PCIe slave device mode but also in a PCIe master device mode. Therefore, the free switching of the working modes can be realized according to the needs of users, so that the use range of the PCIe-M.2 keyB communication module can be expanded, and the use flexibility is improved.
As a possible implementation, the electronic device further performs: receiving the second mode of user input.
In the embodiment of the application, the electronic device can determine which mode the current working mode needs to be switched to according to the working mode input by the user, so that the operability of the user is improved, and the switching flexibility is improved.
As a possible implementation, the second mode is a mode stored by the electronic device.
In this embodiment of the application, the second mode may also be a working mode already stored in the electronic device, and when the electronic device acquires the second mode, it may be further determined whether the second mode is the same as the first mode, and it may be further determined whether the working mode needs to be switched. Therefore, the autonomy that the electronic equipment can switch the working mode is higher, the operation participated by the user is simpler, and the user experience can be improved.
As a possible implementation manner, after changing the value of the flag bit from the first value to the second value, the electronic device further performs: storing the second value; and restarting the electronic equipment.
In the embodiment of the application, after the flag bit is changed from the first value to the second value, the electronic device may be restarted (restarted or restarted after shutdown), and during the startup process of the electronic device, the electronic device may be restarted to determine the working mode according to the value of the flag bit, so that the switching may be completed. The restart is now a necessary step in the handover process so that the integrity of the method can be guaranteed.
As a possible implementation manner, when the first mode is different from the second mode, the electronic device changes the value of the flag bit from the first value to a second value, and specifically performs: generating an AT instruction under the condition that the first mode is different from the second mode; and changing the value of the flag bit from the first value to a second value according to the AT instruction.
As a possible implementation manner, when the first mode is different from the second mode, the electronic device changes the value of the flag bit from the first value to a second value, and specifically performs: receiving a switching instruction input by a user, wherein the switching instruction is an instruction for indicating to switch the current working mode by the user under the condition that the first mode and the second mode are different; changing the value of the flag bit from the first value to a second value in response to the switch instruction.
In the embodiment of the application, a user may make a determination of whether to switch according to the current first mode and the current second mode, and when the user determines that the current working mode needs to be switched, the user needs to input a switching instruction (for example, click a control for determining switching, or input a command for switching). When the electronic device receives a switch instruction, the switch may be performed in response to the instruction. In the process, the judgment of whether the switching is performed or not is mastered in the hand of the user, so that the user experience can be improved.
As a possible implementation manner, the first mode is a PCIe slave mode, the second mode is a PCIe master mode, and the flag bit is a register value or a custom pin level value of a memory of the communication module.
A third aspect discloses a computer-readable storage medium, in which a computer program or computer instructions are stored, and when the computer program or the computer instructions are executed, the method for designing a communication module compatible with a master device and a slave device as disclosed in the first aspect or any embodiment of the first aspect is implemented.
A fourth aspect discloses a computer program product comprising computer program code which, when executed, causes the method described above to be performed.
Drawings
FIG. 1 is a schematic structural diagram of a PCIe device disclosed in the embodiments of the present application;
fig. 2 is a schematic structural diagram of an electronic device and a communication module disclosed in an embodiment of the present application;
FIG. 3 is a schematic diagram of another PCIe device disclosed in the embodiments of the present application;
fig. 4 is a schematic flowchart of a method for designing a communication module compatible with a master device and a slave device according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating a method for designing another master-slave device compatible communication module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another PCIe device disclosed in the embodiment of the present application.
Detailed Description
The embodiment of the application discloses a master-slave device compatible communication module design method and device, which are used for expanding the use range of a communication module. The details will be described below.
In order to facilitate understanding of a communication module design method and apparatus compatible with a master device and a slave device disclosed in the embodiments of the present application, the following first introduces related technologies related to the embodiments of the present application:
PCIe-M.2 keyB communication module
The PCIe-M.2 keyB communication module is a module with an interface type for providing network services for PCIe-M.2 keyB users. Such as a network card module, etc.
PCIe is an end-to-end interconnection protocol, and two devices (for example, device a and device B) can be connected to two ends of the PCIe bus, and the two devices can perform data transmission through the PCIe bus.
M.2 is an interface/slot type, and m.2 interfaces and slots can be divided into two types, keyB (socket2) keyM (socket 3). The keyB can support the PCI-Ex2 and SATA interfaces, the keyM can support the PCI-Ex4, and the speed of the keyM interface is much higher than that of the keyB.
PCIe master device and PCIe slave device
The PCIe-m.2 keyB communication module is a PCIe device, and the PCIe device can be divided into a PCIe master device and a PCIe slave device. A PCIe master device is a PCIe device that provides a clock, and correspondingly, a PCIe slave device is a PCIe device that receives a clock.
Fig. 1 is a schematic structural diagram of a PCIe device disclosed in the embodiment of the present application. As shown in fig. 1, the PCIe master device and the PCIe slave device may be connected to each other through a PCIe interface, and thus may transfer data to each other. The PCIe slave devices all need to be connected to the PCIe master device, which may be referred to as the host computer of its PCIe slave device.
The PCIe master device and the PCIe slave device may be correspondingly referred to as different modes, a mode of the PCIe slave device (PCIe slave device mode) is referred to as an End Point (EP) mode (EP mode), and a mode of the PCIe master device (PCIe master device mode) is referred to as a Root Complex (RC) mode (RC mode).
The following describes a structure of a PCIe device according to an embodiment of the present application.
For convenience of description, the PCIe-m.2 keyB communication module may be simply referred to as a communication module.
Fig. 2 is a schematic structural diagram of an electronic device and a communication module disclosed in an embodiment of the present application. As shown in fig. 2, the electronic device may be connected to the communication module, for example, the communication module may be inserted into the electronic device, and the electronic device may read and write from and to the communication module. The communication module may include a master chip, a memory, and a PCIe interface. The master chip may be coupled with the memory and the PCIe interface. When the main control chip of the communication module can read the computer program in the memory, and execute the relevant command according to the read program. The electronic device can control the communication module through the main control chip.
Illustratively, fig. 2 is a schematic structural diagram of a PCIe interface module disclosed in the embodiment of the present application. The PCIe interface module may be a specific type of PCIe interface in fig. 2. Such as an FM150-m.2-5G module. One side of the M150-m.2-5G module may be a PCIe physical interface through which another PCIe device may be connected. The other side of the FM150-M.2-5G module is an interface connected with a main control chip (To CPU), and the interface can comprise pins of PCIe three control signals (a reset PERST signal, a wake-up PWAKE signal and a clock request CLKRREQ signal). The interface is coupled to a two-way level shift (two-way level shift) module. The bidirectional level conversion module is coupled with the left PCIe physical interface through an M.2 interface. Therefore, two ends of the PCIe interface module of the communication module may be respectively coupled to the main control chip of the communication module and another PCIe device (which may be a PCIe master device or a PCIe slave device).
When the communication module is accessed into the electronic device and is in use, the communication module usually serves as a PCIe slave device (EP mode). Fig. 3 is a schematic structural diagram of another PCIe device disclosed in the embodiment of the present application, and as shown in fig. 3, the electronic device may be a PCIe master device in the PCIe device, the communication module is a PCIe slave device, and the electronic device and the PCIe-m.2 keyB communication module may be connected through a PCIe interface.
The PCIe-m.2 keyB communication module may be used in different scenarios.
In one possible scenario, in a Personal Computer (PC), the PCIe-m.2 keyB communication module may act as a network card device. The PCIe-M.2 keyB communication module can be inserted into a PC, and the module can be controlled by the PC and is used for realizing wireless internet access of the PC. At this time, the upper computer is an electronic device PC.
In another possible scenario, the PCIe-m.2 keyB communication module may be used in a Customer Premise Equipment (CPE), and may demodulate a 4G or 5G wireless signal in a public network into a baseband signal, and send the baseband signal to the main control chip through a PCIe interface. The main control chip sends the demodulated baseband signal to the WiFi module, so that a WiFi hotspot can be formed, and the terminal equipment can surf the internet through WiFi. At this time, the electronic device of the upper computer is a main control chip built in the CPE.
In the use process of the PCIe-m.2 keyB communication module, the communication module is all used as a PCIe slave device, however, the PCIe slave device needs a corresponding upper computer, and the PCIe-m.2 keyB communication module of the electronic device cannot be used in the case that the upper computer is not present. In addition, as the demands of users are different, namely some users need the PCIe-m.2 keyB communication module as a PCIe slave device to provide a network for the electronic device, and other users need the PCIe-m.2 keyB communication module as a PCIe master device to mount other slave devices. Therefore, the PCIe-M.2 keyB communication module is singly used as a PCIe slave device, and the use time limit of the PCIe-M.2 keyB communication module is larger.
In view of the above problems, in the embodiment of the present application, the electronic device may change the flag bit and the corresponding working mode of the PCIe-m.2 keyB communication module according to the user requirement. For example, when the flag is 0, the electronic device may determine that the PCIe-m.2 keyB communication module currently uses the EP mode (PCIe slave mode); when the flag is 1, the electronic device may determine that the PCIe-m.2 keyB communication module currently uses the RC mode (PCIe master mode). In the case that the mode needs to be replaced, the electronic device may modify the flag bit of the PCIe-m.2 keyB communication module to switch the operation mode (the operation mode includes an EP mode (i.e., PCIe slave mode), and an RC mode (i.e., PCIe master mode)). In this way, the electronic device can freely switch the mode of the communication device to expand the range of use of the PCIe-m.2 keyB communication module.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating a method for designing a communication module compatible with a master device and a slave device according to an embodiment of the present disclosure. Wherein the method can be applied to electronic devices. The electronic device is connected to the communication module in a manner as described with reference to fig. 2. A method of master-slave compatible communication module design may include the steps of:
s401, the communication module determines that the working mode of the communication module is the first mode based on the value of the flag bit.
The operating modes of the communication module may include a PCIe master device mode (RC mode) and a PCIe slave device mode (EP mode). Under the condition that the electronic equipment is started, the communication module is also started. The working mode of the communication module is determined in the process of opening the electronic equipment.
The electronic device may obtain a value of a flag bit of the working mode in the memory through a main control chip of the communication module, where the obtained value of the flag bit is a first value. In the case where the electronic device obtains the first value of the flag, the electronic device may determine the operating mode of the communication module based on the first value. The value (first value) of the flag bit is used to indicate a working mode used by the communication module, the first value may be a value indicating that the PCIe working mode of the communication module is a PCIe master device mode, or may be a value indicating that the PCIe working mode of the communication module is a PCIe slave device mode, and the first value of the flag bit may only indicate one of the two working modes.
Two cases of determining the operation mode based on the first value of the flag bit are explained below:
in one possible case, when the first value of the flag bit obtained by the electronic device indicates that the operation mode is the PCIe slave mode, the electronic device may determine that the current communication module operation mode is the PCIe slave mode, and may perform operation through this mode. For example, when the first value of the flag bit read by the electronic device through the main control chip to the memory is "0" (the value of the flag bit is "1" indicating the PCIe master mode, and the value of the flag bit is "0" indicating the PCIe slave mode), the communication module may enter the PCIe slave mode to operate.
In another possible case, when the first value of the flag bit or the level value obtained by the electronic device indicates that the working mode is the PCIe master mode, the electronic device may determine that the current communication module working mode is the PCIe master mode, and may work in this mode. For example, when the first value of the flag bit read by the main control chip to the memory by the communication module is "1" (the value of the flag bit is "1" indicates the PCIe master mode, and the value of the flag bit is "0" indicates the PCIe slave mode), the communication module may enter the PCIe master mode to operate.
In both cases, the flag bit may be a register value or a custom pin level value of the memory of the communication module. In a possible embodiment, the flag bit may be a register value of a memory of the communication module, that is, a certain bit or several bits in the memory, and different values of the flag bit may indicate different operation modes. For example, the electronic device may set a one-bit flag bit in memory, a "1" indicating a PCIe master mode and a "0" indicating a PCIe slave mode. The number of possible flags of the flag bit is merely illustrated here, and the specific flag bit representation method is not limited. In another possible implementation, the flag bit may be a certain custom pin level high-low value of the communication module. For example, the level "high" (1) indicates the PCIe master mode, and the level "low" (0) indicates the PCIe slave mode.
It should be noted that, in the case that the electronic device is powered on, the operating mode of the communication module is also determined. The computer program of the operation mode included in the communication module should be one in which both the PCIe master device mode and the PCIe slave device mode exist (PCIe master-slave device mode is compatible). Namely, the main control chip of the communication module supports both the RC mode and the EP mode.
S402, the electronic equipment judges whether the first mode is the same as the second mode. If so, ending the current flow of FIG. 4; otherwise, step S403 is performed.
The second mode is a target operating mode that the communication mode needs to use, and the second mode may be a PCIe master device mode or a PCIe slave device mode.
The electronic device determines that the current operating mode of the communication module is the first mode, and then may determine whether the current operating mode is the second mode. In the case where the first mode is the same as the second mode, at this time, the communication module already uses the target operation mode, and no switching is required, so that the electronic device may end the current flow of fig. 4. If the first mode is different from the second mode, the operation mode used by the communication module is not the target operation mode, and the current operation mode needs to be switched to the second mode, so S403 needs to be further executed.
Two embodiments for determining whether the first mode and the second mode are the same are described below:
in one possible implementation, the electronic device may determine whether the first mode and the second mode are the same based on the first mode and the second mode. Wherein the second mode may be fixed or may be variable. The second mode may be an operation mode stored in the electronic device, or may be an operation mode determined according to a user's requirement. For example, when the user needs to adjust the second mode, the user may input second mode information to the electronic device, and when the electronic device receives the second mode information input by the user, the second mode may be determined.
In another possible implementation, the user may determine whether the first mode is the same as the second mode according to the current operating mode determined by the electronic device. In case of non-uniformity, the user may input a switching instruction. The switching instruction is an instruction instructing to switch the operation mode of the current communication module. When the electronic device receives the switching instruction, the electronic device executes step S403 in response to the switching instruction. In the same case, the current flow ends.
Several cases of determining whether the first mode and the second mode are the same are described below:
in one possible case, when the first mode is the PCIe slave mode (the target mode is known as the PCIe master mode), the electronic device may determine that the first mode is different from the second mode, and need to perform step S403.
In another possible case, in a case that the first mode is the PCIe slave device mode (the target mode is known as the PCIe slave device mode), the electronic device may determine that the first mode is the same as the second mode, and end the current flow.
In another possible case, when the first mode is the PCIe master mode (the target mode is known as the PCIe slave mode), the electronic device may determine that the first mode is different from the second mode, and need to perform step S403.
In another possible case, in a case where the first mode is the PCIe master mode (the target mode is known as the PCIe master mode), the electronic device may determine that the first mode is the same as the second mode, and end the current flow.
The target mode may be determined by the operating mode set by the user or by the electronic device. The target mode may be variable, for example, the target mode is a PCIe slave mode, and the user needs to use a PCIe master mode, and the target mode may be set to the PCIe master mode.
S403, the electronic equipment changes the value of the flag bit from the first value to a second value, and determines the working mode of the communication module as a second mode based on the second value.
The electronic device may change the value of the memory flag bit in the current communication module from a first value to a second value, the second value being the value of the flag bit indicating that the operating mode is the second mode. For example, where the first value of the flag bit is 0, the electronic device may change the first value to a second value of 1 ("1" representing PCIe master device mode, "0" representing PCIe slave device mode); in the case where the first value of the flag bit is 1, the electronic device may change the first value to a second value of 0.
The electronic device may generate an Attention (AT) command, which is used to change the value of the flag of the communication module. Thereafter, the electronic device can send an AT command to the communication module. After the communication module receives the AT command, the communication module may further execute the AT command through the main control chip, that is, the main control chip changes the flag bit of the current memory based on the AT command. Wherein the first value is different from the second value.
After the value of the flag bit in the memory of the communication module is changed to the second value, the electronic device may be rebooted (for example, booting after powering off or directly rebooting), and in the process of rebooting the electronic device, the communication module may re-read the flag bit of the memory to the second value, thereby determining that the working mode of the communication module is the second mode. The specific determination process may refer to the related description of step S401. Wherein the first value indicates that the operating mode is the first mode and the second value indicates that the operating mode is the second mode. Therefore, in the process of determining the working mode, the communication module can complete the switching of the working mode.
Through the method embodiment, the communication module can switch the working mode, namely can switch the PCIe slave device mode and the PCIe master device mode, and at the moment, the communication module can be used as the PCIe slave device to be mounted on other PCIe master devices; the PCIe slave device can also be used as a PCIe master device to hang on other PCIe slave devices. When free switching can be realized, the working mode of the communication module can better adapt to the requirements of users so as to provide network services. This way. The range of use of the communication module can be expanded.
In addition, under the condition that the communication module can not be used as a PCIe main device, PCIe must be provided with an upper computer and connected with the upper computer, the system is complex at the moment, the cost is high, and under the condition that the communication module is used as the PCIe main device, the communication module is the upper computer, the system can be simplified, and the cost is reduced.
In the embodiment of the present application, the electronic device may be any terminal device having communication capability, processing function and storage capability, for example, a computer, a CPE, and the like. I.e. the electronic device may be all possible devices providing a network via the communication module, without limitation here.
Illustratively, according to the above method embodiments, a method for designing a master-slave device compatible communication module is specifically described. Referring to fig. 5, fig. 5 is a schematic flow chart illustrating another method for designing a communication module compatible with a master device and a slave device according to an embodiment of the present application. As shown in fig. 5, the method for designing the communication module compatible with the master device and the slave device is as follows:
the memory and the main control chip in the communication module may be preset in advance. The preset master control chip can be compatible with a PCIe master device mode and a PCIe slave device mode. And a flag bit is preset in the communication module memory, and two numbers of the flag bit can respectively correspond to a PCIe master device mode and a PCIe slave device mode. The default flag bit in the communication module is "0", namely, the communication module indicates the PCIe slave device mode; and the flag bit is "1", i.e., indicating PCIe master mode.
The following describes a specific process of switching the operation mode of the communication module of the electronic device.
S501, the electronic equipment determines the flag bit, and determines that the working mode is the PCIe slave equipment mode under the condition that the flag bit is '0'.
When the electronic device is started, the communication module is also started, in the starting process, the communication module reads that the default zone bit is 0, and the communication module is in a PCIe slave device mode according to the current working mode of the zone bit 0, namely the PCIe in the main control chip of the communication module is set to be in the slave device mode.
S502, the electronic equipment changes the flag bit of the communication module to be changed to be 1 of the flag bit (second value) of the PCIe main equipment mode.
After the boot is completed, when the user determines that the required working mode is the PCIe master device mode (target mode) and the current working mode is the PCIe slave device mode, the electronic device may change the flag bit of the communication module to "1" through the AT instruction, that is, change the flag bit to the flag bit corresponding to the PCIe master device mode.
S503, the communication module reads the flag bit again, and determines that the working mode is the PCIe master device mode under the condition that the flag bit is '1'.
After step S502 is completed, the electronic device may be restarted or restarted after shutdown, and during the startup process, the communication module reads the flag bit again to be "1" and sets the operating mode to be the PCIe master mode.
After the above-mentioned switching process is completed, the communication module may mount other PCIe slave devices. Illustratively, fig. 6 is a schematic structural diagram of another PCIe device disclosed in the embodiment of the present application, and as shown in fig. 6, the FM150-m.2-5G communication module may be used as a PCIe master device, and mount a PCIe slave device (RTL8111H) directly outside through a PCIe interface. At the moment, the FM150-M.2-5G communication module does not need an upper computer, can directly demodulate the 4G and 5G signals into baseband signals, and sends the baseband signals to RTL8111H (PCIe slave device) through a PCIe interface. After receiving the baseband signal, RTL8111H converts the baseband signal into a wired network card signal, which may then provide a network source for a PC or WiFi router.
The above-mentioned embodiments, objects, technical solutions and advantages of the present application are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present application should be included in the scope of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.

Claims (10)

1. A master-slave device compatible communication module design method is applied to an electronic device, the electronic device is provided with a communication module, the communication module is used for providing a network for the electronic device, and the method comprises the following steps:
determining an operating mode of the communication module as a first mode based on a first value of a flag bit, the operating mode including a high-speed serial computer expansion bus (PCIe) master device mode and a PCIe slave device mode, the flag bit being a flag bit of a memory of the communication module;
changing the value of the flag bit from the first value to a second value if the first mode is different from a second mode;
determining an operating mode of the communication module as the second mode based on the second value.
2. The method of claim 1, further comprising:
receiving the second mode of user input.
3. The method of claim 1, wherein the second mode is a mode stored by the electronic device.
4. The method of claim 1, wherein after changing the value of the flag bit from the first value to the second value, the method further comprises:
storing the second value;
and restarting the electronic equipment.
5. The method according to any one of claims 1 to 4, wherein the changing the value of the flag bit from the first value to a second value in the case that the first mode is different from the second mode comprises:
generating an AT instruction under the condition that the first mode is different from the second mode;
and changing the value of the flag bit from the first value to a second value according to the AT instruction.
6. The method according to any one of claims 1 to 5, wherein the changing the value of the flag bit from the first value to a second value in the case that the first mode is different from the second mode comprises:
receiving a switching instruction input by a user, wherein the switching instruction is an instruction for indicating to switch the current working mode by the user under the condition that the first mode and the second mode are different;
changing the value of the flag bit from the first value to a second value in response to the switch instruction.
7. The method of any of claims 1-6, wherein the first mode is a PCIe slave mode, the second mode is a PCIe master mode, and the flag bit is a register value or a custom pin level value of a memory of the communications module.
8. An electronic device, comprising: one or more processors and one or more memories for storing computer program code comprising computer instructions, the electronic device being provided with a communication module for providing a network for the electronic device, which when executed by the one or more processors, causes the electronic device to perform:
determining an operating mode of the communication module as a first mode based on a first value of a flag bit, the operating mode including a PCIe master device mode and a PCIe slave device mode, the flag bit being a flag bit of a memory of the communication module;
changing the value of the flag bit from the first value to a second value if the first mode is different from a second mode;
determining an operating mode of the communication module as the second mode based on the second value.
9. A computer-readable storage medium, in which a computer program or computer instructions are stored which, when executed, implement the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that, when the computer program product is run on a computer, it causes the computer to perform the method according to any of claims 1-7.
CN202111321866.9A 2021-11-09 2021-11-09 Communication module design method and device compatible with master and slave devices Pending CN114328329A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111321866.9A CN114328329A (en) 2021-11-09 2021-11-09 Communication module design method and device compatible with master and slave devices
PCT/CN2022/097637 WO2023082622A1 (en) 2021-11-09 2022-06-08 Method for designing communication module having master and slave devices compatible, and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111321866.9A CN114328329A (en) 2021-11-09 2021-11-09 Communication module design method and device compatible with master and slave devices

Publications (1)

Publication Number Publication Date
CN114328329A true CN114328329A (en) 2022-04-12

Family

ID=81044550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111321866.9A Pending CN114328329A (en) 2021-11-09 2021-11-09 Communication module design method and device compatible with master and slave devices

Country Status (2)

Country Link
CN (1) CN114328329A (en)
WO (1) WO2023082622A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826907A (en) * 2022-04-22 2022-07-29 西安广和通无线通信有限公司 PCIe RC and EP mode switching method, device, equipment and medium
WO2023082622A1 (en) * 2021-11-09 2023-05-19 深圳市广和通无线股份有限公司 Method for designing communication module having master and slave devices compatible, and apparatus

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070130407A1 (en) * 2005-11-22 2007-06-07 Olson David M Bus system with multiple modes of operation
CN102082667A (en) * 2010-11-17 2011-06-01 北京曙光天演信息技术有限公司 Method for switching master mode and slave mode of encryption card and encryption card
US20160179735A1 (en) * 2014-12-18 2016-06-23 Emc Corporation Managing a peripheral component interface express device hotplug
CN206100018U (en) * 2016-09-06 2017-04-12 深圳市乙辰科技股份有限公司 Multimedia smart "Residential gateway" , management system and TV box of high integration
US20200073840A1 (en) * 2018-09-05 2020-03-05 Fungible, Inc. Dynamically changing configuration of data processing unit when connected to storage device or computing device
CN110941576A (en) * 2018-09-21 2020-03-31 苏州库瀚信息科技有限公司 System, method and device for memory controller with multi-mode PCIE function
CN210899167U (en) * 2019-12-16 2020-06-30 闻泰通讯股份有限公司 Communication chip module and electronic product
CN112292672A (en) * 2019-11-05 2021-01-29 深圳市大疆创新科技有限公司 Switching control method, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328329A (en) * 2021-11-09 2022-04-12 深圳市广和通无线股份有限公司 Communication module design method and device compatible with master and slave devices

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070130407A1 (en) * 2005-11-22 2007-06-07 Olson David M Bus system with multiple modes of operation
CN102082667A (en) * 2010-11-17 2011-06-01 北京曙光天演信息技术有限公司 Method for switching master mode and slave mode of encryption card and encryption card
US20160179735A1 (en) * 2014-12-18 2016-06-23 Emc Corporation Managing a peripheral component interface express device hotplug
CN206100018U (en) * 2016-09-06 2017-04-12 深圳市乙辰科技股份有限公司 Multimedia smart "Residential gateway" , management system and TV box of high integration
US20200073840A1 (en) * 2018-09-05 2020-03-05 Fungible, Inc. Dynamically changing configuration of data processing unit when connected to storage device or computing device
CN110941576A (en) * 2018-09-21 2020-03-31 苏州库瀚信息科技有限公司 System, method and device for memory controller with multi-mode PCIE function
CN112292672A (en) * 2019-11-05 2021-01-29 深圳市大疆创新科技有限公司 Switching control method, electronic equipment and computer readable storage medium
CN210899167U (en) * 2019-12-16 2020-06-30 闻泰通讯股份有限公司 Communication chip module and electronic product

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023082622A1 (en) * 2021-11-09 2023-05-19 深圳市广和通无线股份有限公司 Method for designing communication module having master and slave devices compatible, and apparatus
CN114826907A (en) * 2022-04-22 2022-07-29 西安广和通无线通信有限公司 PCIe RC and EP mode switching method, device, equipment and medium
CN114826907B (en) * 2022-04-22 2023-08-11 西安广和通无线通信有限公司 PCIe RC and EP mode switching method, device, equipment and medium

Also Published As

Publication number Publication date
WO2023082622A1 (en) 2023-05-19

Similar Documents

Publication Publication Date Title
US7739487B2 (en) Method for booting a host device from an MMC/SD device, a host device bootable from an MMC/SD device and an MMC/SD device method a host device may booted from
US8484394B2 (en) USB device election of becoming a host after receiving information about device capability of the host
US20060136899A1 (en) Method for programming/updating software using USB OTG
WO2023082622A1 (en) Method for designing communication module having master and slave devices compatible, and apparatus
JP2013512510A (en) Configurable connector for system level communication
US20110055434A1 (en) Methods and systems for operating a computer via a low power adjunct processor
US20060160569A1 (en) Cellular phone and portable storage device using the same
WO2015059654A1 (en) Universal serial bus (usb) hub for switching downstream ports between host mode and slave mode
CN103106109A (en) Mobile communication device and application interface switching method
TWI529535B (en) Resource sharing devices
KR20090091343A (en) Intergrated communication and information processing system
WO2023087696A1 (en) Communication module and external interface configuration method and configuration apparatus therefor, and storage medium
CN116431546B (en) Parameter configuration method, electronic device, storage medium, and program product
EP2174232B1 (en) Interface for multiple modems
CN115733549B (en) PCIE network card, switching method of interface modes of PCIE network card, electronic equipment and storage medium
CN114185720B (en) Method, device, equipment and storage medium for dynamic hot backup of server
EP1056006A2 (en) Method for loading user interface software
KR20030057250A (en) USB Camera System with Host Function
CN213069764U (en) Touch control equipment
CN101998691A (en) Method, system and device for data transmission
KR200420506Y1 (en) Network switching apparatus for providing security function about mobile storage device and security computer system using by the network switching apparatus
JP2004302778A (en) Interface device
JP2005078625A (en) Portable electronic system and its access method
CN116737601B (en) Method, device and storage medium for expanding peripheral registers into system RAM
CN109165099B (en) Electronic equipment, memory copying method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination