Method, device and equipment for multiplexing SDIO interface and eMMC interface and storage medium
By dynamically configuring the card to detect the valid or invalid state of the pin, the problem that SDIO and eMMC cannot multiplex the interface due to card detection pin differences is solved, and the interface is correctly configured in different modes is realized, and SDIO and eMMC share the same group of interfaces.
Patent Information
- Application Number
- CN202411080808.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-24
AI Technical Summary
SDIO and eMMC cannot multiplex the same set of interface pins due to differences in card detection pins, resulting in inconsistent design.
By configuring the interface mode to SDIO or eMMC, and dynamically setting the valid or invalid state of the card detection pin, the card detection pin is enabled or disabled by using the bit bits of the control register to realize the software dynamic configuration of the interface mode.
It solves the problem that SDIO and eMMC cannot multiplex interface pins due to card detection pin differences, and realizes the correct configuration of card detection pins in different modes, and supports SDIO and eMMC to share the same group of interfaces.
Smart Images

Figure CN119179663A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method for multiplexing an SDIO interface and an eMMC interface. Background Art
[0002] eMMC (embedded MultiMedia Card) is a flash memory card standard that defines the physical architecture, access interface and protocol of the storage system based on the embedded multimedia card. It is specifically established and released by the Joint Electronic Device Engineering Committee JEDEC. SDIO (Secure Digital Input and Output) is developed based on the SD card interface. It is used to connect SD cards and can connect SDIO interface devices, such as Bluetooth, WIFI, GPS, etc.
[0003] Both SDIO and eMMC are different specifications evolved based on the MMC (multiMedia card) communication protocol, that is, SDIO and eMMC use the same bus specification, that is, for the SDIO technology and eMMC technology on the chip, SDIO and eMMC can share the same set of pins, but because the SD card needs to be plugged in and out of the interface when SDIO is used, it is necessary to set an additional CD (Card Detect) detection pin to implement SD card plugging and unplugging detection, and the interface does not have such an application scenario when eMMC is used, so there is no need to set a CD detection pin. This leads to the traditional technical solution that, due to the existence of the CD detection pin, the pins of SDIO and eMMC on the chip are designed separately, and SDIO and eMMC cannot be set to reuse the same set of pins. Summary of the invention
[0004] In view of the above problems, the present application provides a method, apparatus, device and storage medium for multiplexing SDIO interface and eMMC interface to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for multiplexing an SDIO interface and an eMMC interface, comprising:
[0006] Configure the interface mode to SDIO interface or eMMC interface;
[0007] Get the current mode of the interface. If the current mode of the interface is the eMMC interface, configure the card detection pin of the interface to be in an invalid state; if the current mode of the interface is the SDIO interface, configure the card detection pin of the interface to be in a valid state.
[0008] In some embodiments, in the method for multiplexing the SDIO interface and the eMMC interface, the step of configuring the card detection pin of the interface to be in a valid state includes:
[0009] The card detection bit of the control register of the interface is configured to a first bit value to disable the card detection pin, and the control register is at least configured to enable the card detection pin of the interface through the card detection bit.
[0010] In some embodiments, in the method for multiplexing the SDIO interface and the eMMC interface, the step of configuring the card detection bit of the control register of the interface to a first bit value to disable the card detection pin includes:
[0011] Reading the value of the card detection bit, and storing the value of the card detection bit in a random access memory;
[0012] Modify the card detection bit value stored in the random access memory to a first bit value;
[0013] The value of the card detection bit stored in the random access memory is written into the card detection bit.
[0014] In some embodiments, in the method for multiplexing the SDIO interface and the eMMC interface, after the step of writing the value of the card detection bit stored in the random access memory into the card detection bit, the method further includes:
[0015] The card detection bit of the control register is detected, and if the value of the card detection bit is different from the first bit value, the value of the card detection bit is recorded as error information.
[0016] In some embodiments, in the method for multiplexing the SDIO interface and the eMMC interface, the step of configuring the card detection pin of the interface to be in a disabled state includes:
[0017] Terminating the execution step: configuring the card detection bit of the control register of the interface to a first bit value to disable the card detection pin.
[0018] In a second aspect, the present application provides a device for multiplexing an SDIO interface and an eMMC interface, comprising:
[0019] The interface mode setting module is used to configure the interface mode to be SDIO interface or eMMC interface;
[0020] The card detection pin setting module is used to obtain the current mode of the interface. If the current mode of the interface is the eMMC interface, the card detection pin of the interface is configured to be in an invalid state; if the current mode of the interface is the SDIO interface, the card detection pin of the interface is configured to be in a valid state.
[0021] In a third aspect, the present application provides an electronic device, including a memory and a processor, wherein:
[0022] The memory is used to store computer programs;
[0023] The processor is used to read the program in the memory and execute the steps of the method for multiplexing the SDIO interface and the eMMC interface as provided in the first aspect above.
[0024] In a fourth aspect, the present application provides a computer-readable storage medium having a readable computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for multiplexing the SDIO interface and the eMMC interface provided in the first aspect above are implemented.
[0025] The method, device, equipment and storage medium for multiplexing the SDIO interface and the eMMC interface provided by the present application configure the interface mode to be the SDIO interface or the eMMC interface; then obtain the current mode of the interface, if the current mode of the interface is the eMMC interface, configure the card detection pin of the interface to be in an invalid state; if the current mode of the interface is the SDIO interface, configure the card detection pin of the interface to be in a valid state. Through the above technical scheme, the method for multiplexing the SDIO interface and the eMMC interface provided by the present application realizes the dynamic configuration of the interface mode through software, thereby making the card detection pin invalid when the interface mode is the eMMC interface, and making the card detection pin valid when the interface mode is the SDIO interface, solving the technical problem that the interface pins of SDIO and eMMC cannot be multiplexed due to the card detection pin.
[0026] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] Figure 1 A flow chart of a method for multiplexing an SDIO interface and an eMMC interface provided in an embodiment of the present application is shown.
[0029] Figure 2 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application is shown.
[0030] Figure 3 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application is shown.
[0031] Figure 4 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application is shown.
[0032] Figure 5 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application is shown.
[0033] Figure 6 A schematic diagram of a device for multiplexing an SDIO interface and an eMMC interface provided in an embodiment of the present application is shown.
[0034] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application is shown.
[0035] Figure 8 A schematic diagram of a computer storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0037] Wherein, the term "comprises", "includes" or any other variation thereof is 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0038] The embodiment of the present application provides a method for multiplexing an SDIO interface and an eMMC interface, which is applied on a chip so that the SDIO and the eMMC share the pins of the same interface. Figure 1A flow chart of a method for multiplexing an SDIO interface and an eMMC interface provided in an embodiment of the present application is shown. Figure 1 As shown, the method of the SDIO interface and the eMMC interface includes:
[0039] Step S100: Configure the interface mode as an SDIO interface or an eMMC interface. Optionally, because the SDIO and eMMC on the chip can share the same set of pins (i.e., reuse the same IP core), in the embodiment of the present application, the SDIO interface on the chip hardware is also used as an eMMC interface, or the eMMC interface on the chip hardware is also used as an SDIO interface, and an additional card detection pin is added to the pin of the eMMC interface on the chip hardware. The method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is executed by the software layer of the chip. Specifically, when the operating system of the chip is started, the user chooses to configure the interface as an SDIO interface or an eMMC interface.
[0040] In some embodiments, the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiments of the present application is applied to a chip that executes a Linux operating system. The chip is configured to determine whether the user configures the interface to be an eMMC interface or an SDIO interface when the Linux operating system is started.
[0041] Step S200: Obtain the current mode of the interface. If the current mode of the interface is an eMMC interface, configure the card detection pin of the interface to be in an invalid state; if the current mode of the interface is an SDIO interface, configure the card detection pin of the interface to be in an effective state. Optionally, after the user configures the interface mode, the operating system obtains the interface mode configured by the user, thereby setting the card detection pin of the interface according to the interface mode, thereby making the interface an eMMC interface by setting the card detection pin invalid, and making the interface an SDIO pin by setting the card detection pin effective.
[0042] In some embodiments, the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiments of the present application is applied to a chip, which executes a Linux operating system. The chip is configured to determine whether the user configures the interface to be an eMMC interface or an SDIO interface when the Linux operating system is started, and the Linux system determines whether the user configured interface mode is an eMMC interface or an SDIO interface by reading a device tree.
[0043] It can be understood that when the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is applied to a chip, it is actually written into the chip in the form of a program, so that when the chip is started, the corresponding program can be read to execute the method for multiplexing the SDIO interface and the eMMC interface.
[0044] The method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application realizes dynamic configuration of the interface mode through software, so that when the interface mode is the eMMC interface, the configuration of the card detection pin is invalid, and when the interface mode is the SDIO interface, the configuration of the card detection pin is valid, thereby solving the technical problem that the SDIO and eMMC interface pins cannot be multiplexed due to the difference in the card detection pins.
[0045] In some embodiments, Figure 2 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application is shown, as shown in FIG. Figure 2 As shown, in the method for multiplexing the SDIO interface and the eMMC interface, step S200: the step of configuring the card detection pin of the interface to be in a valid state includes:
[0046] Step S210: configuring the card detection bit of the control register of the interface to a first bit value to disable the card detection pin, wherein the control register is at least configured to enable the card detection pin of the interface through the card detection bit.
[0047] It can be understood that when the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is applied to a chip, the above step S210 is actually written into the chip in the form of a program, so that when the chip is started, the corresponding program can be read to execute the method for multiplexing the SDIO interface and the eMMC interface.
[0048] The embodiment of the present application enables the card detection pin by controlling the register to control the card detection pin to be in a valid state or an invalid state, thereby solving the technical problem that the SDIO and eMMC cannot reuse the interface pins due to the card detection pin on the chip hardware.
[0049] It is understandable that in the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application, the card detection bit of the control register of the interface includes at least one bit, so that the two states of the card detection pin are represented by the value of one bit. For example, when the card detection bit includes one bit, the first bit value is 0 or 1. Optionally, the card detection bit of the control register can also be set to two bits or even more bits, so as to achieve more controllable states for the card detection pin. For example, when the card detection bit includes two bits, the first bit value can be set to any one of 00, 01, 10, and 11, and the embodiment of the present application does not limit this.
[0050] In some embodiments, Figure 3Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided by an embodiment of the present application is shown, step S210: the step of inverting the card detection bit of the control register of the interface to disable the card detection pin comprises:
[0051] Step S211: reading the value of the card detection bit and storing the value of the card detection bit in a random access memory, that is, temporarily storing the value of the card detection bit in the RAM of the chip.
[0052] Step S212: modify the card detection bit value stored in the random access memory to a first bit value.
[0053] Step S213: writing the value of the card detection bit stored in the random access memory into the card detection bit.
[0054] It can be understood that when the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is applied to a chip, the above-mentioned steps S211 to S123 are actually written into the chip in the form of a program, so that when the chip is started, the corresponding program can be read to execute the method for multiplexing the SDIO interface and the eMMC interface.
[0055] It can be understood that the above-mentioned S211-step S123 is only an implementation method of step S210: configuring the card detection bit of the control register of the interface to the first bit value to disable the card detection pin. In fact, the method of modifying the register value is not limited to the above-mentioned S211-step S123. For example, the embodiment of the present application can also modify the value of the register by sending a command to the register, and the embodiment of the present application does not limit this.
[0056] In some embodiments, Figure 4 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is shown, as shown in FIG. Figure 4 As shown, the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application, after step S210: writing the value of the card detection bit stored in the random access memory into the card detection bit, further includes:
[0057] Step S214: Detect the card detection bit of the control register. If the value of the card detection bit is different from the first bit value and cannot invalidate the card detection pin of the control register, the value of the card detection bit is recorded as error information, so that the user can know that the writing of the card detection bit of the control register fails according to the recording result.
[0058] It is understandable that when the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is applied to a chip, the above step S214 is actually written into the chip in the form of a program, so that when the chip is started, the corresponding program can be read to execute the method for multiplexing the SDIO interface and the eMMC interface. For example, for the program, step S214 is to print the log of the method for multiplexing the SDIO interface and the eMMC interface executed this time.
[0059] In some embodiments, Figure 5 Another flow chart of the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is shown, as shown in FIG. Figure 5 As shown, in the method for multiplexing the SDIO interface and the eMMC interface in the embodiment of the present application, the step of configuring the card detection pin of the interface to be in a failed state includes:
[0060] Terminate execution of step S210: configure the card detection bit of the control register of the interface to the first bit value to disable the card detection pin. Optionally, the method for multiplexing the SDIO interface and the eMMC interface provided in an embodiment of the present application ends the method for multiplexing the SDIO interface and the eMMC interface when it is detected that the interface mode is configured as the SDIO interface by setting the default state of the card detection bit of the control register to enable the card detection pin. For example, when the card detection bit includes one bit, if the first bit value is 1, the default value of the card detection bit of the control register is 0.
[0061] It is understandable that when the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application is applied to a chip, the above-mentioned step of configuring the card detection pin of the interface to be in a failed state is actually written into the chip in the form of a program, so that the corresponding program can be read when the chip is started to execute the method for multiplexing the SDIO interface and the eMMC interface. For example, the embodiment of the present application can implement the steps through a judgment statement: if the current mode of the interface is the eMMC interface, then execute step S210; if the current mode of the interface is the SDIO interface, then terminate the execution of step S210.
[0062] In some embodiments, the method for multiplexing the SDIO interface and the eMMC interface provided in the embodiments of the present application can also be set to: set the default state of the card detection bit of the control register to invalidate the card detection pin, thereby ending the method of multiplexing the SDIO interface and the eMMC interface when it is detected that the interface mode is configured as the eMMC interface.
[0063] The method for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application realizes the dynamic configuration of the interface mode through software through the above technical scheme, so that when the interface mode is the eMMC interface, the configuration of the card detection pin is invalid, and when the interface mode is the SDIO interface, the configuration of the card detection pin is valid, thereby solving the technical problem that the SDIO and eMMC interface pins cannot be multiplexed due to the difference in the card detection pins.
[0064] Based on the above method for multiplexing the SDIO interface and the eMMC interface, the embodiment of the present application further provides a device for multiplexing the SDIO interface and the eMMC interface. Figure 6 A schematic diagram of a device for multiplexing an SDIO interface and an eMMC interface provided in an embodiment of the present application is shown, Figure 6 As shown, the device for multiplexing the SDIO interface and the eMMC interface includes:
[0065] The interface mode setting module is used to configure the interface mode to be SDIO interface or eMMC interface.
[0066] The card detection pin setting module is used to obtain the current mode of the interface. If the current mode of the interface is the eMMC interface, the card detection pin of the interface is configured to be in an invalid state; if the current mode of the interface is the SDIO interface, the card detection pin of the interface is configured to be in a valid state.
[0067] The device for multiplexing the SDIO interface and the eMMC interface provided in the embodiment of the present application realizes dynamic configuration of the interface mode through software, so that when the interface mode is the eMMC interface, the configuration of the card detection pin is invalid, and when the interface mode is the SDIO interface, the configuration of the card detection pin is valid, thereby solving the technical problem that the SDIO and eMMC interface pins cannot be multiplexed due to the difference in the card detection pins.
[0068] For other details about the implementation of the above technical solution by each module in the above-mentioned device for multiplexing the SDIO interface and the eMMC interface, please refer to the description of the method for multiplexing the SDIO interface and the eMMC interface provided in the above-mentioned invention embodiment, which will not be repeated here.
[0069] Based on the above method of multiplexing the SDIO interface and the eMMC interface, an embodiment of the present application further provides an electronic device, Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present application is shown. Figure 7 As shown, the electronic device provided in the embodiment of the present application includes a processor 71 and a memory 72 coupled to the processor 71. The memory 72 stores a computer program, and when the computer program is executed by the processor 71, the processor 71 executes the steps of the method for multiplexing the SDIO interface and the eMMC interface in the above embodiment.
[0070] The electronic device provided in the embodiment of the present application realizes dynamic configuration of the interface mode through software, so that when the interface mode is the eMMC interface, the configuration card detection pin is invalid, and when the interface mode is the SDIO interface, the configuration card detection pin is valid, thereby solving the technical problem that the interface pins of SDIO and eMMC cannot be reused due to the difference in card detection pins.
[0071] For other details about how the processor 71 in the electronic device implements the above technical solution, please refer to the description of the method for multiplexing the SDIO interface and the eMMC interface provided in the above invention embodiment, which will not be repeated here.
[0072] Among them, the processor 71 can also be called a CPU (Central Processing Unit), and the processor 71 may be an integrated circuit chip with signal processing capabilities; the processor 71 can also be a general-purpose processor, DSP (Digital Signal Process), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, among which the general-purpose processor can be a microprocessor or the processor 71 can also be any conventional processor, etc.
[0073] Based on the above method of multiplexing the SDIO interface and the eMMC interface, the embodiment of the present application further provides a computer-readable storage medium, Figure 8 A schematic diagram of a computer storage medium provided in an embodiment of the present application is shown, Figure 8 As shown, a readable computer program 81 is stored on the storage medium; wherein the computer program 81 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.
[0074] The above contents are further detailed descriptions of the present application in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present application is limited to these descriptions. For ordinary technicians in the technical field to which the present application belongs, several simple deductions or substitutions can be made without departing from the concept of the present application, which should be regarded as the protection scope of the present application.
Claims
1. A method for multiplexing an SDIO interface and an eMMC interface, characterized in that: include: Configure the interface mode to SDIO interface or eMMC interface; Get the current mode of the interface. If the current mode of the interface is the eMMC interface, configure the card detection pin of the interface to be in an invalid state; if the current mode of the interface is the SDIO interface, configure the card detection pin of the interface to be in a valid state.
2. The method for multiplexing the SDIO interface and the eMMC interface as claimed in claim 1, characterized in that: The step of configuring the card detection pin of the interface to be in a valid state comprises: The card detection bit of the control register of the interface is configured to a first bit value to disable the card detection pin, and the control register is at least configured to enable the card detection pin of the interface through the card detection bit.
3. The method for multiplexing the SDIO interface and the eMMC interface as claimed in claim 2, characterized in that: The step of configuring the card detection bit of the control register of the interface to a first bit value to disable the card detection pin comprises: Reading the value of the card detection bit, and storing the value of the card detection bit in a random access memory; Modify the card detection bit value stored in the random access memory to a first bit value; The value of the card detection bit stored in the random access memory is written into the card detection bit.
4. The method for multiplexing the SDIO interface and the eMMC interface as claimed in claim 3, characterized in that: After the step of writing the value of the card detection bit stored in the random access memory into the card detection bit, the method further comprises: The card detection bit of the control register is detected, and if the value of the card detection bit is different from the first bit value, the value of the card detection bit is recorded as error information.
5. The method for multiplexing the SDIO interface and the eMMC interface as claimed in claim 2, characterized in that: The step of configuring the card detection pin of the interface to be in a failed state comprises: Terminating the execution step: configuring the card detection bit of the control register of the interface to a first bit value to disable the card detection pin.
6. A device for multiplexing SDIO interface and eMMC interface, characterized in that: include The interface mode setting module is used to configure the interface mode to be SDIO interface or eMMC interface; The card detection pin setting module is used to obtain the current mode of the interface. If the current mode of the interface is the eMMC interface, the card detection pin of the interface is configured to be in an invalid state; if the current mode of the interface is the SDIO interface, the card detection pin of the interface is configured to be in a valid state.
7. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to read the computer program in the memory and execute the steps of the method for multiplexing the SDIO interface and the eMMC interface according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: A readable computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method for multiplexing the SDIO interface and the eMMC interface as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Error correction method and system for realizing eMMC interface data by using parity check
CN119883716A
