Signal line pull-up voltage control device, system and method
By using a combination of switching modules and voltage conversion modules in electronic devices, pull-up voltage switching based on the SD card working mode is achieved, solving the problem of large land and high cost of power management chips in the prior art, and improving the system stability and flexibility.
Patent Information
- Application Number
- CN202411359956.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, when electronic devices are connected to a secure digital card (SD card), they need to switch the pull-up voltage according to the working mode of the SD card, resulting in relying on the power management chip, which has a large footprint and high cost, making it difficult to achieve effective voltage. Switch.
The signal line pull-up voltage control device including a switching module, a voltage conversion module and a pull-up resistor module is adopted. The power supply voltage is controlled through the switching module, and the power supply voltage is converted into different voltage levels by using the voltage conversion module to meet SD2.0 and pull-up voltage requirements of SD3.0 protocol.
It realizes flexibility and efficiency of voltage switching, reduces circuit footprint and implementation costs, improves system stability, and saves port resources and software development time.
Smart Images

Figure CN119210427A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic circuits, and in particular to a signal line pull-up voltage control device, system and method. Background Art
[0002] At present, many electronic devices support access to Secure Digital Cards (SD cards). In actual application scenarios, if the main controller of the electronic device and the connected SDK support the SD3.0 protocol version, the pull-up power supply on the signal line of the electronic device needs to be switched to power supply voltages of different voltage levels according to the different working modes of the SD card to meet the pull-up voltage requirements of the specific working mode. For example, in the SD3.0 protocol, the default speed mode and high speed mode in the SD3.0 protocol are backward compatible. These two bus working modes require the pull-up voltage to be 3.3V. Other bus modes in the SD3.0 protocol require the pull-up voltage to be 1.8V. It can be seen that when the SD card only supports the SD2.0 protocol, the pull-up voltage is generally required to be 3.3V when working, and when the SD card supports the 3.0 protocol, the pull-up voltage is generally required to be 1.8V when working. Therefore, how to achieve adaptive switching of the pull-up voltage according to the working mode of the SD card is one of the important issues to improve the functional performance of the SD card of the electronic device.
[0003] In the related art, as shown in FIG1, a power management chip is commonly used to implement the switching control of the pull-up voltage. The main controller of the electronic device, such as the central processing unit (CPU), directly communicates with the SD card to read the SD card information, including the capacity of the SD card and the highest protocol version supported by the SD card. Based on the read SD card information, the CPU chip and the power management chip establish communication through the integrated circuit bus (Inter-Integrated Circuit, I2C), and send the highest protocol version information supported by the SD card to the power management chip; when the SD card supports the SD2.0 protocol, the power management chip outputs 3.3V; when the SD card supports the SD3.0 protocol, the power management chip outputs 1.8V. However, this solution relies on the implementation of the power management chip, which not only occupies a large board area, but is also expensive and difficult to implement.
[0004] Therefore, technicians in this field are in urgent need of a signal line pull-up voltage control device to solve the problems existing in the traditional solution that relies on the power management chip. Summary of the invention
[0005] The object of the present invention is to provide a signal line pull-up voltage control device, system and method to solve the problems existing in the traditional solution that relies on a power management chip.
[0006] In order to solve the above technical problems, the present invention provides a signal line pull-up voltage control device, comprising: a switch module, a voltage conversion module and a pull-up resistor module;
[0007] The first end of the switch module is connected to the positive electrode of the power supply, the second end of the switch module is connected to the input end of the pull-up power supply network, and the controlled end of the switch module is connected to the pull-up voltage control end GPIOV0 of the main controller in the electronic device, wherein the pull-up voltage control end GPIOV0 is one of the general input and output ends of the main controller;
[0008] The input end of the voltage conversion module is connected to the positive electrode of the power supply, the output end of the voltage conversion module is connected to the input end of the pull-up power supply network, and the enable end of the voltage conversion module is connected to the pull-up voltage control end GPIOV0; the voltage conversion module is used to convert the voltage signal output by the positive electrode of the power supply into another voltage signal with a different voltage value and output it;
[0009] Each of the pull-up resistor modules is arranged between the output end of the pull-up power supply network and different signal lines;
[0010] Among them, when the pull-up voltage control terminal GPIOV0 outputs a first control signal, the switch module is turned on and the voltage conversion module is disabled; when the pull-up voltage control terminal GPIOV0 outputs a second control signal, the switch module is turned off and the voltage conversion module is enabled.
[0011] In a possible embodiment, it includes:
[0012] The switch module is an N-type insulated gate field effect transistor, the source and drain of the N-type insulated gate field effect transistor correspond to the first end and the second end of the switch module respectively, and the gate of the N-type insulated gate field effect transistor corresponds to the controlled end of the switch module;
[0013] The voltage conversion module is a power chip, and the enable end of the power chip is enabled when receiving a low level; the input end of the power chip corresponds to the input end of the voltage conversion module, the output end of the power chip corresponds to the output end of the voltage conversion module, the enable end of the power chip corresponds to the enable end of the voltage conversion module, and the ground end of the power chip is grounded;
[0014] The first control signal is a high level signal, and the second control signal is a low level signal.
[0015] In a possible embodiment, the pull-up resistor module includes: a plurality of pull-up resistors;
[0016] The first ends of the pull-up resistors are connected in common, and the common end of the pull-up resistors is connected to the output end of the pull-up power supply network;
[0017] The second end of each pull-up resistor is connected to the control signal line, the write protection signal line and the four data signal lines in a one-to-one correspondence.
[0018] In order to solve the above technical problems, the present invention also provides a signal line pull-up voltage control system, comprising: a main controller, a secure digital card holder, and also the signal line pull-up voltage control device as described above;
[0019] Each secure digital terminal of the main controller is connected to each secure digital terminal of the secure digital card holder via a signal line;
[0020] The signal line pull-up voltage control device is connected to the main controller and each of the signal lines.
[0021] In order to solve the above technical problems, the present invention further provides a signal line pull-up voltage control method, which is applied to the signal line pull-up voltage control system as described above, comprising:
[0022] Determine the highest supported Secure Digital protocol version of the Secure Digital card;
[0023] If the highest supported secure digital protocol version is version 2.0, the switch module is controlled to be turned on and the voltage conversion module is disabled;
[0024] If the highest supported secure digital protocol version is version 3.0, the switch module is controlled to be turned off and the voltage conversion module is enabled.
[0025] In a possible embodiment, determining the highest supported secure digital protocol version of the secure digital card includes:
[0026] Writing a preset test file into the secure digital card at a first preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports at most is version 2.0; wherein the first preset clock frequency is the lowest value of the maximum clock frequencies corresponding to all bus operating modes supported when the secure digital protocol version that the secure digital card supports at most is version 2.0;
[0027] A preset test file is written into the secure digital card at a second preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports at most is version 3.0; wherein the second preset clock frequency is the highest value of the maximum clock frequencies corresponding to all bus operating modes supported when the secure digital protocol version that the secure digital card supports at most is version 3.0.
[0028] In a possible embodiment, writing a preset test file into the secure digital card at a first preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports the highest is version 2.0 includes:
[0029] Writing a preset test file into the secure digital card according to the first preset clock frequency;
[0030] Sending a request to the secure digital card to read the test file;
[0031] If the reading fails, determining that the highest supported secure digital protocol version is version 2.0;
[0032] If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete;
[0033] If incomplete, determine that the highest supported secure digital protocol version is version 2.0;
[0034] Writing a preset test file into the secure digital card at a second preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports the highest is version 3.0 includes:
[0035] writing a preset test file into the secure digital card according to the second preset clock frequency;
[0036] Sending a request to the secure digital card to read the test file;
[0037] If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete;
[0038] If complete, it is determined that the highest supported secure digital protocol version is version 3.0.
[0039] In a possible embodiment, it further includes:
[0040] If it cannot be determined that the highest supported secure digital protocol version is version 2.0 or version 3.0, the switch module is controlled to be turned on and the voltage conversion module is disabled;
[0041] Execute the alarm action and return the prompt information.
[0042] In a possible embodiment, determining the highest supported secure digital protocol version of the secure digital card includes:
[0043] Performing handshake communication with the secure digital card to obtain secure digital information;
[0044] The secure digital information is parsed to determine the highest secure digital protocol version supported by the secure digital card.
[0045] In a possible embodiment, before determining the highest supported secure digital protocol version of the secure digital card, the method further includes:
[0046] When the electronic device is powered on, the switch module is controlled to be turned on and the voltage conversion module is disabled by default;
[0047] After the secure digital card completes initialization, the switch module is controlled to be turned off and the voltage conversion module is enabled.
[0048] The present invention provides a signal line pull-up voltage control device, which provides two outputs of different voltage levels through a switch module and a voltage conversion module. The switch module is used to control whether to output the power supply voltage to the pull-up power supply network. The power supply voltage can be 3.3V. When the power supply voltage is input into the pull-up power supply network, the pull-up voltage requirements of each bus working mode corresponding to the SD2.0 protocol can be met. The voltage conversion module can convert the power supply voltage into other voltage levels and output them. For example, when the power supply voltage is 3.3V, the voltage conversion module can convert 3.3V into 1.8V output. When the voltage conversion module is enabled, the 1.8V voltage is output to the pull-up power supply network, which can meet the pull-up voltage requirements of each bus working mode corresponding to the SD3.0 protocol that is different from the SD2.0 protocol. Compared with the pull-up voltage control implemented by the practical power management chip, the pull-up voltage control based on the voltage conversion module and the switch module has a smaller circuit footprint, a lower circuit implementation cost, and a simple circuit structure, thereby increasing the stability of the entire system, which is more in line with the needs of actual engineering implementation. Furthermore, the control of the pull-up voltage is implemented by a hardware circuit, which saves software development time and workload.
[0049] At the same time, the conduction state of the switch module in the device is always opposite to the enable state of the voltage conversion module, ensuring that only one of the switch module and the voltage conversion module can output the corresponding voltage signal to the pull-up power supply network at the same time, avoiding output conflicts or mutual influences between the two modules. In addition, based on this enabling relationship, the main controller in the electronic device only needs one GPIO terminal to realize the control of different pull-up voltages. In the related scheme, even if the I2C bus that requires the least number of signal terminals among various buses is used, at least two ports of the CPU chip need to be occupied, so the device can further save the port resources of the main controller of the electronic device and has stronger practicality.
[0050] The signal line pull-up voltage control system and method provided by the present invention correspond to the above-mentioned device and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] FIG1 is a circuit schematic diagram of a common signal line pull-up voltage control scheme;
[0053] FIG2 is a structural diagram of a signal line pull-up voltage control system provided by an embodiment of the present invention;
[0054] FIG3 is an equivalent circuit diagram of a signal line pull-up voltage control system provided by an embodiment of the present invention when the SD card supports up to 2.0 protocol version;
[0055] FIG4 is an equivalent circuit diagram of a signal line pull-up voltage control system provided by an embodiment of the present invention when the SD card supports up to 2.0 protocol version;
[0056] FIG. 5 is a flow chart of a method for controlling a pull-up voltage on a signal line provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The core of the present invention is to provide a signal line pull-up voltage control device, system and method.
[0059] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0060] At present, common electronic devices generally support access to Secure Digital Cards (SD cards). Electronic devices include an SD card holder for inserting SD cards. When the SD card holder is inserted into the SD card, the main controller in the electronic device can communicate data with the SD card. As shown in Figure 1, the main controller (central controller, CPU) and the SD card use seven SD interfaces, namely, the control signal terminal (SD_CMD), the write protection signal terminal (SD_WP), the data signal terminal (SD_DAT0~ SD_DAT3) and the clock signal terminal (SD_CLK), to achieve communication transmission. The SD interfaces are connected through signal lines. In actual applications, the signal line needs to pull up the power supply so that the signal level of the SD interface matches the different bus working modes of the SD card.
[0061] Specifically, the SD protocols currently used by common SD cards include SD2.0 and SD3.0. Tables 1 and 2 below are the relevant parameters of each bus mode in the SD2.0 and SD3.0 protocols, respectively.
[0062] Table 1 SD2.0 protocol parameter requirements
[0063] Bus operating mode Maximum clock frequency Signal line voltage High Speed 50MHZ 3.3V Default Speed 25MHZ 3.3V
[0064] Table 2 SD3.0 protocol parameter requirements
[0065] Bus operating mode Maximum clock frequency Signal line voltage SDR104 208MHZ 1.8V SDR50 100MHZ 1.8V DDR50 50MHZ 1.8V SDR25 50MHZ 1.8V SDR12 25MHZ 1.8V High Speed 50MHZ 3.3V Default Speed 25MHZ 3.3V
[0066] It is not difficult to see from Table 1 and Table 2 above that all bus working modes in the SD2.0 protocol require the signal line voltage to be 3.3V, that is, the voltage value of the pull-up power supply output is required to be 3.3V. For the SD3.0 protocol, there are two types of bus working modes; one includes the default speed mode and the high speed mode, which require the pull-up voltage value to be 3.3V; the other corresponds to other bus working modes in the SD3.0 protocol, which require the pull-up voltage value to be 1.8V. It can be seen that if the SD card supports the SD3.0 protocol, how to switch the output of the corresponding voltage value of the signal line pull-up power supply according to the bus working mode of the SD card is one of the main factors affecting the function of the SD card.
[0067] In the related art, the above problems are solved by using a power management chip with power conversion, distribution, detection and other power management responsibilities. As shown in Figure 1, the main controller can read the SD card information through communication with the SD card. The SD card information may include but is not limited to the SD card capacity and the highest supported protocol version. The main controller sends the highest protocol version supported by the SD card read above to the power management chip through the integrated circuit bus (Inter-Integrated Circuit, I2C) and other buses. The power management makes the following control logic: if the SD card supports the SD2.0 protocol, 3.3V is output as the pull-up voltage; if the SD card supports the SD3.0 protocol, 1.8V is output as the pull-up voltage.
[0068] It can be seen that the above scheme relies on the implementation of the power management chip. However, as a device with a large footprint and high device cost, the application of the power management chip in the above scheme cannot maximize the performance of the power management chip, resulting in a certain degree of resource waste, which is not conducive to the actual application.
[0069] In order to solve the above problems, the present invention provides a signal line pull-up voltage control device, as shown in FIG. 2 , comprising: a switch module 11 , a voltage conversion module 12 and a pull-up resistor module 13 .
[0070] The first end of the switch module 11 is connected to the positive power supply VCC_3V3, the second end of the switch module 11 is connected to the input end of the pull-up power supply network VCC_SD1VDD, and the controlled end of the switch module 11 is connected to the pull-up voltage control end GPIOV0 of the main controller 20 in the electronic device. The pull-up voltage control end GPIOV0 is one of the general input and output ends of the main controller 20.
[0071] The input end of the voltage conversion module 12 is connected to the positive power supply VCC_3V3, the output end of the voltage conversion module 12 is connected to the input end of the pull-up power supply network VCC_SD1VDD, and the enable end of the voltage conversion module 12 is connected to the pull-up voltage control end GPIOV0. The voltage conversion module 12 is used to convert the voltage signal output by the positive power supply VCC_3V3 into another voltage signal with a different voltage value and output it.
[0072] Each pull-up resistor module 13 is disposed between the output end of the pull-up power network VCC_SD1VDD and different signal lines.
[0073] When the pull-up voltage control terminal GPIOV0 outputs a first control signal, the switch module 11 is turned on and the voltage conversion module 12 is disabled. When the pull-up voltage control terminal GPIOV0 outputs a second control signal, the switch module 11 is turned off and the voltage conversion module 12 is enabled.
[0074] It should be noted that the present embodiment does not limit the specific implementation scheme of the switch module 11, the voltage conversion module 12 and the pull-up resistor module 13. Based on the above description, it can be known that the switch module 11 in the present device is used to realize the on-off control between the positive power supply VCC_3V3 and the input terminal of the pull-up power supply network VCC_SD1VDD. The switch module 11 can be turned on when the pull-up voltage control terminal GPIOV0 of the main controller outputs the first control signal and turned off when the second control signal is output. This belongs to the basic function of various types of common switch modules 11. Considering that the first control signal and the second control signal are output by the general input and output (GPIO) terminal of the main controller 20 and are electronic signals, the switch module 11 can select any type of electronic switch to meet the above requirements. Therefore, when designing the switch module 11, it is possible to select a suitable switch module 11 from the perspectives of reducing the floor space and saving the implementation cost.
[0075] Similarly, this embodiment also does not impose strict restrictions on the above-mentioned voltage conversion module 12. Based on the above description, the voltage conversion module 12 in the present device is used to convert the power supply voltage output by the positive power supply electrode VCC_3V3 into another voltage output with a different voltage value, so as to provide the signal line voltage (3.3V and 1.8V) required for different bus working modes of the SD card. Therefore, the voltage conversion module 12 can be implemented based on a simple voltage conversion circuit or device. Based on whether the power supply voltage output by the positive power supply electrode VCC_3V3 corresponds to a lower voltage value or a higher voltage value between 3.3V and 1.8V, the voltage conversion module 12 can be a boost module or a buck module. When the voltage conversion module 12 is used for voltage reduction, a possible implementation scheme is that the voltage conversion module 12 is specifically a voltage divider circuit, and a simple voltage divider circuit can be implemented by two resistors connected in series. If the voltage value output by the positive power supply electrode VCC_3V3 is uncertain, the requirements for the voltage conversion module 12 are higher. In practical applications, a suitable voltage conversion module 12 can be selected according to the voltage value output by the positive power supply electrode VCC_3V3 and other needs. In addition, the present device requires that the voltage conversion module 12 has an enable control function, which can be achieved by selecting a voltage conversion module 12 with an enable control function, or by implementing a simple enable control through a switch, etc., and this embodiment also does not impose any restrictions on this.
[0076] In addition, the pull-up resistor module 13 is a module that outputs the voltage obtained by the switch module 11 and the voltage conversion module 12 of the device to the designated signal line as a pull-up voltage. It is easy to know that when the output end of the pull-up power supply network VCC_SD1VDD is equivalent to the pull-up power supply, the pull-up resistor module 13 can be simply implemented by a pull-up resistor, and the specific circuit structure can be determined based on various common pull-up circuit implementation methods, and this embodiment does not limit this.
[0077] In a possible application scenario, this embodiment provides a specific implementation scheme of a switch module 11 and a voltage conversion module 12, as shown in FIG2 :
[0078] The switch module 11 is an N-type insulated gate field effect transistor (NMOS transistor, NM0), the source and drain of the NMOS transistor correspond to the first end and the second end of the switch module 11 respectively, and the gate of the NMOS transistor corresponds to the controlled end of the switch module 11.
[0079] The voltage conversion module 12 is a power chip, and the enable end of the power chip is enabled when it receives a low level; the input end of the power chip corresponds to the input end of the voltage conversion module 12, the output end of the power chip corresponds to the output end of the voltage conversion module 12, the enable end of the power chip corresponds to the enable end of the voltage conversion module 12, and the ground end of the power chip is grounded.
[0080] The first control signal is a high level signal, and the second control signal is a low level signal.
[0081] It is easy to know that the NMOS tube, as a switch tube, is a kind of electronic switch. In practical applications, the NMOS tube can be turned on and off by inputting a high level or a low level to the gate (controlled end), which can meet all the above requirements for the switch module 11. In addition, based on the structural characteristics of the NMOS tube, when the NMOS tube is turned on and off with a high level or a low level, the high level generally corresponds to controlling the NMOS tube to be turned on, and the low level corresponds to controlling the NMOS tube to be turned off.
[0082] In addition, the power chip is a device responsible for the conversion, distribution and detection of electric energy, has a voltage conversion function, and the power chip has its own enable control, which meets all the above requirements for the voltage conversion module 12. As for the enable control of the power chip, in practical applications, it is common for the power chip to use a low-level signal as the enable signal, that is, when the enable end of the power chip is connected to a low level, the power chip is enabled, and when the enable end is connected to a high level, the power chip is disabled. At this time, it is equivalent to the power chip being connected to the circuit and the NMOS tube not being connected to the circuit. At this time, the equivalent circuit diagram is shown in Figure 3.
[0083] Based on this, it can be obtained that when the pull-up voltage control terminal GPIOV0 of the main controller 20 outputs a high level, the NMOS tube is turned on and the power chip is disabled, which meets the above requirements for the first control signal, that is, this embodiment uses the high-level signal as the first control signal. Similarly, when the pull-up voltage control terminal GPIOV0 of the main controller 20 outputs a low level, the NMOS tube is turned off and the power chip is enabled, which meets the above requirements for the second control signal, that is, this embodiment uses the low-level signal as the second control signal. At this time, it is equivalent to the NMOS tube being connected to the circuit and the power chip not being connected to the circuit. At this time, the equivalent circuit diagram is shown in Figure 4.
[0084] In summary, this embodiment provides a specific implementation scheme of the switch module 11 and the voltage conversion module 12, which can meet the above-mentioned various requirements for the switch module 11 and the voltage conversion module 12. At the same time, the characteristics of the NMOS tube being turned on at a high level and turned off at a low level, and the power chip being disabled at a high level and enabled at a low level can meet the requirement that the switch module 11 and the voltage conversion module 12 do not output voltages at the same time, avoid confusion in the pull-up voltage control, and meet the requirements for reliability and accuracy of the control.
[0085] On the other hand, for the above-mentioned pull-up resistor module 13, this embodiment also provides a possible implementation scheme, as shown in Figure 2, the pull-up resistor module 13 includes: multiple pull-up resistors; the first ends of the pull-up resistors are connected in common, and the common end of each pull-up resistor is connected to the output end of the pull-up power supply network VCC_SD1VDD; the second end of each pull-up resistor is respectively connected to the control signal line, the write protection signal line and the four data signal lines one by one.
[0086] Specifically, there are 7 signal lines between the main controller 20 and the SD card holder 30 in the electronic device, corresponding to the 7 SD interfaces SD_CMD, SD_WP, SD_DAT0~ SD_DAT3 and SD_CLK. Among them, the signal line corresponding to the SD interface SD_CLK does not need to pull up the signal line level to match it with the interface signal level. Therefore, in this embodiment, 6 pull-up resistors can be used to provide pull-up circuits for the remaining 6 signal lines, and the pull-up power supply network VCC_SD1VDD can be connected to provide matching pull-up voltages.
[0087] In summary, the signal line pull-up voltage control device provided in this embodiment decomposes the task of outputting a pull-up voltage of a corresponding voltage level according to different needs of the SD card into outputting two different pull-up voltages, and controls one of the two different pull-up voltages to be connected to the pull-up power supply network VCC_SD1VDD according to different needs of the SD card. And wherein, the switch module 11 is only used to realize the control of whether a pull-up voltage of a voltage level is connected to the pull-up power supply network VCC_SD1VDD, and the voltage conversion module 12 is only used to realize the conversion of a pull-up voltage of a voltage level and the control of whether the pull-up voltage is connected to the pull-up power supply network VCC_SD1VDD. Both modules only need to respond to the control signal sent by the main controller 20, which greatly reduces the requirements for the switch module 11 and the voltage conversion module 12. Compared with the power management chip, it can bring a smaller footprint, less implementation cost, and stronger system stability.
[0088] In addition, the switch module 11 and the voltage conversion module 12 in the device always maintain a working state in which one has voltage output and the other has no voltage output, so as to avoid mutual influence between the different voltages output by the two modules. It also enables the main controller 20 to realize the voltage level switching control of the pull-up voltage only through one GPIO terminal. Compared with the solution through the power management chip, the power management chip needs to establish a communication connection with the main controller 20 through the bus to obtain the SD card information read by the main controller 20. Even if the I2C bus with the least number of communication ports required among various buses is used, at least two ports of the main controller 20 need to be occupied. Therefore, compared with this solution, the device occupies less port resources of the main controller 20, and better meets the needs of practical applications.
[0089] In the above embodiments, a signal line pull-up voltage control device is described in detail. The present invention also provides a corresponding embodiment of a signal line pull-up voltage control system. As shown in FIG2 , a signal line pull-up voltage control system comprises: a main controller 20, an SD card holder 30, and a signal line pull-up voltage control device as provided in any of the above embodiments.
[0090] The SD terminals of the main controller 20 are connected to the SD terminals of the SD card holder 30 via signal lines. The signal line pull-up voltage control device is connected to the main controller 20 and the signal lines.
[0091] As can be seen from the above, the main controller 20 and the SD card holder 30 are both original devices in an electronic device that supports the SD card function, and they are connected to each other through a signal line. The signal line pull-up voltage control device is used to control the pull-up voltage of the signal line access, which can be switched according to the needs of the SD card in different bus working modes. Therefore, a system provided by this embodiment can bring about the technical effect brought by the signal line pull-up voltage control device in the above embodiment. In addition, since the embodiments of the system part correspond to the embodiments of the device part, the embodiments of the system part refer to the description of the embodiments of the device part, which will not be repeated here.
[0092] Furthermore, in addition to the signal line pull-up voltage control device and system provided in the above embodiment, this embodiment provides a corresponding method embodiment, which is applied to the signal line pull-up voltage control system as described in the above embodiment. Specifically, the signal line pull-up voltage control system is used as the execution subject of the method. As shown in FIG5 , the method includes:
[0093] S10: Determine the highest secure digital protocol version supported by the secure digital card.
[0094] S20: If the highest supported secure digital protocol version is version 2.0, the control switch module is turned on and the voltage conversion module is disabled.
[0095] S30: If the highest supported secure digital protocol version is version 3.0, the switch module is controlled to be turned off and the voltage conversion module is enabled.
[0096] Among them, for step S10, it is to obtain whether the highest version of the SD card protocol supported by the SD card is the SD2.0 protocol or the SD3.0 protocol. If it is the SD2.0 protocol, it means that a 3.3V pull-up voltage needs to be provided. Corresponding to step S20, the main controller can control the switch module to turn on and the voltage conversion module to disable by outputting a first control signal, and output a 3.3V voltage to the pull-up power supply network to meet the demand. Similarly, if it is the SD3.0 protocol, it means that a 1.8V pull-up voltage needs to be provided. Corresponding to step S30, the main controller can control the switch module to turn off and the voltage conversion module to enable by outputting a second control signal, and output a 1.8V voltage to the pull-up power supply network to meet the demand.
[0097] As for how to determine whether the highest version of the SD card protocol supported by the SD card is the SD2.0 protocol or the SD3.0 protocol in step S10, this embodiment does not limit this. The main controller can read the SD information of the SD card by handshaking with the SD card. As can be seen from the above embodiment, the SD information may include but is not limited to the SD card capacity and the highest supported protocol version. The highest protocol version information is included, which can be used to determine whether the highest version of the SD card protocol supported by the SD card is the SD2.0 protocol or the SD3.0 protocol.
[0098] That is, this embodiment provides a possible implementation scheme of step S10, and step S10 specifically includes:
[0099] S11-A: Handshake communication with the secure digital card to obtain secure digital information.
[0100] S12-A: Parse the secure digital information to determine the highest secure digital protocol version supported by the secure digital card.
[0101] In this embodiment, in actual application scenarios, the main controller and the SD card need to perform a handshake before formal SD communication to confirm the establishment of communication. In the handshake stage, the main controller can read the SD information stored in the SD card, obtain the highest version of the SD card protocol supported by the SD card, and thus determine whether it is the SD2.0 protocol or the SD3.0 protocol, and output a matching pull-up voltage in a targeted manner.
[0102] In addition, this embodiment also provides another implementation scheme of step S10, and step S10 specifically includes:
[0103] S11-B: Writing a preset test file into the secure digital card at a first preset clock frequency to determine whether the highest secure digital protocol version supported by the secure digital card is version 2.0.
[0104] The first preset clock frequency is the lowest value of the maximum clock frequencies corresponding to all bus operating modes supported when the highest secure digital protocol version supported by the secure digital card is version 2.0.
[0105] S12-B: Writing a preset test file into the secure digital card at a second preset clock frequency to determine whether the highest secure digital protocol version supported by the secure digital card is version 3.0.
[0106] The second preset clock frequency is the highest value of the maximum clock frequencies corresponding to all bus operating modes supported when the highest secure digital protocol version supported by the secure digital card is version 3.0.
[0107] As can be seen from the parameters corresponding to different bus working modes supported by different SD protocols mentioned in Tables 1 and 2 above, different bus working modes have different transmission rates, and the corresponding maximum clock frequencies are also different. Therefore, this embodiment determines whether the main controller can communicate normally with the SD card at the specific clock frequency by writing and reading back the test file to the SD card at the specific clock frequency, that is, determining whether the SD card supports the bus working mode that can meet the specific clock frequency, and indirectly determining the highest SD protocol version supported by the SD card.
[0108] Specifically, taking the parameters shown in Table 1 and Table 2 as an example, the first preset clock frequency in this embodiment corresponds to the maximum clock frequency of the Default speed mode in Table 1, that is, 25MHZ. Step S11-B determines whether the SD card supports the SD2.0 protocol by writing a preset test file to the SD card at a clock frequency of 25MHZ and reading it back. If the SD card supports the SD2.0 protocol, the test file can be smoothly written to the SD card and read back by the main controller under the premise that there are no other abnormal conditions. On the contrary, if the SD card does not support the SD2.0 protocol, the test file cannot be written and read back normally.
[0109] Further, for step S12-B, i.e., judging whether the SD card supports the SD3.0 protocol, the highest value among the maximum clock frequencies corresponding to all bus working modes in the SD3.0 protocol is used as the second preset clock frequency value. Based on the parameters shown in Table 2, the second preset clock frequency is 208MHZ. Then, by the same principle as above, judging whether the SD card supports the SD3.0 protocol according to whether the test file can normally complete the data transmission tasks of writing and reading back at this clock frequency.
[0110] It should be noted that the reason why the highest value of the maximum clock frequency corresponding to each bus working mode is used as the second preset clock frequency when judging whether the SD card supports the SD3.0 protocol in this embodiment is that the SD3.0 protocol also supports all bus working modes of the SD2.0 protocol. Therefore, in order to distinguish the SD2.0 protocol from the SD3.0 protocol, the clock frequency not supported by the SD2.0 protocol should be used as the second preset clock frequency. Based on the parameters shown in Tables 1 and 2, there are two clock frequency values of 100MHZ and 208MHZ that can be used as alternatives for the second preset clock frequency. In this embodiment, 208MHZ is selected as the final second preset clock frequency, so as to use the maximum clock frequency supported by the SD3.0 protocol as the specific clock frequency during the test, thereby further improving the accuracy of judging whether the SD card supports the SD3.0 protocol.
[0111] It should also be noted that the test file is only used to determine whether the main controller can complete normal data transmission with the SD card at a specific clock frequency, so as to determine the highest SD protocol version supported by the SD card. Therefore, the specific content of the test file does not affect the judgment result, and the data content in the test file can be arbitrarily designed according to actual needs, and this embodiment does not limit this.
[0112] As can be seen from the above, this embodiment provides a solution that is different from obtaining the highest version of the SD protocol supported by the SD card through handshake. When the handshake fails or other reasons make it impossible to determine whether the highest version of the SD protocol supported by the SD card is 2.0 or 3.0 through handshake, the highest version of the SD protocol supported by the SD card can still be determined to ensure the accuracy of the pull-up voltage switching control.
[0113] Furthermore, with respect to the specific implementation of step S11-B and step S12-B provided in the above embodiment, this embodiment also provides a possible implementation scheme:
[0114] Step S11-B specifically includes:
[0115] S111-B: Writing a preset test file into the secure digital card according to the first preset clock frequency.
[0116] S112-B: Send a request to the secure digital card to read the test file.
[0117] S113-B: If the reading fails, determine that the highest supported Secure Digital protocol version is version 2.0.
[0118] S114-B: If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete.
[0119] S115-B: If incomplete, determine that the highest supported Secure Digital Protocol version is version 2.0.
[0120] Step S12-B specifically includes:
[0121] S121-B: Writing a preset test file into the secure digital card according to the second preset clock frequency.
[0122] S122-B: Send a request to the secure digital card to read the test file.
[0123] S123-B: If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete.
[0124] S124-B: If complete, determine that the highest supported secure digital protocol version is version 3.0.
[0125] Among them, for steps S111-B~S115-B, that is, to judge the possible various results when the test file is written at 25MHZ and read back, if the test file is incomplete or cannot be read back directly after two transmissions of writing and reading back, it means that the SD card, the highest bus working mode can only support High speed mode, is an SD card that supports SD2.0 protocol at most.
[0126] Similarly, for steps S121-B~S124-B, the various possible results when the test file is written at 208MHZ and read back are judged. If the test file is successfully read back and complete after two transmissions of writing and reading back, it means that the SD card's highest bus operating mode can support SDR104 mode, and it is an SD card that supports up to SD3.0 protocol.
[0127] That is, this embodiment provides a specific solution for determining the highest supported SD protocol version by the SD card, thereby improving the accuracy of determining the highest supported protocol version by the SD card, and facilitating the improvement of the accuracy and reliability of the pull-up voltage switching control.
[0128] Furthermore, this embodiment provides a corresponding implementation scheme for a possible scenario in which it is impossible to determine whether the highest supported protocol version of the SD card is 2.0 or 3.0 through the above scheme. The above method further includes:
[0129] S131: If it cannot be determined that the highest supported secure digital protocol version is version 2.0 or version 3.0, the switch module is controlled to be turned on and the voltage conversion module is disabled.
[0130] S132: Execute the alarm action and return prompt information.
[0131] It should be noted that this embodiment does not limit the specific form of the alarm action and prompt information. The alarm action should correspond to the alarm device set. For example, when the alarm device is a light emitting diode, the alarm action can be that the light emitting diode is always on, always off, flashing or changing color, etc. When the alarm device is a device that outputs sound signals such as a speaker or a buzzer, the alarm action can be to emit a buzzer, broadcast a specific voice message or audio, etc.
[0132] In addition, the prompt information can be in any form such as text, graphics, tables, etc. as an information carrier, and can be sent to a device that can be viewed by relevant personnel through any means such as SMS, push, email, etc. This embodiment also does not limit this, and the appropriate implementation plan can be freely selected according to actual needs.
[0133] Further, based on the two alternative values 100MHZ and 208MHZ proposed in the above embodiment when determining the second preset clock frequency, in the above embodiment, from the perspective of improving the accuracy of determining whether the SD card supports the SD3.0 protocol, 208MHZ is selected as the second preset clock frequency. However, if only the maximum SD protocol version supported by the SD card is distinguished as version 2.0 or version 3.0, this embodiment also provides another implementation scheme for the second preset clock frequency value: the second preset clock frequency is 100MHZ.
[0134] It should be noted that, only from the perspective of distinguishing whether the maximum SD protocol version supported by the SD card is version 2.0 or version 3.0, 100MHZ and 208MHZ can both be used as the above-mentioned second preset clock frequency. Compared with 208MHZ, the maximum clock frequency in all bus working modes supported by the SD3.0 protocol, 100MHZ is closer to the middle value of the clock frequency range supported by the SD3.0 protocol. Therefore, it is easier to avoid the situation where it is impossible to determine whether the SD card supports the highest SD2.0 protocol or the SD3.0 protocol and issue an alarm.
[0135] On the other hand, the two judgment schemes for the highest supported SD protocol version of the SD card provided in the above embodiments both require the main controller to communicate or transmit data with the SD card, that is, it needs to occur after the SD card is officially started and initialized. However, before this moment, it is also necessary to control the level in the signal line, that is, it is necessary to control the pull-up voltage. Moreover, after the SD card is officially started and initialized, the main controller cannot immediately complete the steps of determining the highest supported SD protocol version of the SD card corresponding to the above embodiments, and the pull-up voltage also needs to be controlled during the period from the completion of the initialization of the SD card to the determination of the highest supported SD protocol version of the SD card.
[0136] In view of this, this embodiment provides a corresponding implementation scheme, and the above method also includes:
[0137] S41: When the electronic device is powered on, the switch module is controlled to be turned on and the voltage conversion module is disabled by default.
[0138] S42: After the secure digital card is initialized, the switch module is controlled to be turned off and the voltage conversion module is enabled.
[0139] Specifically, this embodiment provides two pull-up voltage control schemes for the above two special time periods: after the electronic device is powered on and before the SD card is initialized, and after the SD card is initialized and before the main controller determines that the SD card supports the highest SD card protocol version, respectively, which correspond to step S41 and step S42 respectively. Among them, step S41 corresponds to the time period after the electronic device is powered on and before the SD card is initialized. In this time period, the pull-up voltage of the access signal line is required to be 3.3V, so the switch module can be controlled to be turned on and the voltage conversion module can be disabled by outputting the first control signal. Since this time period is at the beginning of the electronic chip powering on, that is, the beginning of the main controller powering on, this part of the control logic requires the default output of the main controller for the pull-up power supply voltage switching control to ensure the reliability and timeliness of the control. In addition, step S42 corresponds to the time period after the SD card is initialized and before the main controller determines that the SD card supports the highest SD card protocol version. In this time period, the pull-up voltage of the access signal line is required to be 1.8V, so the switch module can be controlled to be turned on and the voltage conversion module can be disabled by outputting the second control signal.
[0140] Based on an implementation scheme provided in this embodiment, the control period range of a signal line pull-up voltage control method provided by the present invention is further expanded. The signal line pull-up voltage can only be effectively controlled after the main controller determines the SD protocol version that is highest supported by the SD card. This is extended to all time periods after the electronic device is powered on, further improving the reliability, scope of application and control effect of the method.
[0141] The above is a detailed introduction to a signal line pull-up voltage control device, system and method provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0142] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants 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 statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A signal line pull-up voltage control device, characterized in that: include: Switch module, voltage conversion module and pull-up resistor module; The first end of the switch module is connected to the positive electrode of the power supply, the second end of the switch module is connected to the input end of the pull-up power supply network, and the controlled end of the switch module is connected to the pull-up voltage control end GPIOV0 of the main controller in the electronic device, wherein the pull-up voltage control end GPIOV0 is one of the general input and output ends of the main controller; The input end of the voltage conversion module is connected to the positive electrode of the power supply, the output end of the voltage conversion module is connected to the input end of the pull-up power supply network, and the enable end of the voltage conversion module is connected to the pull-up voltage control end GPIOV0; the voltage conversion module is used to convert the voltage signal output by the positive electrode of the power supply into another voltage signal with a different voltage value and output it; Each of the pull-up resistor modules is arranged between the output end of the pull-up power supply network and different signal lines; Among them, when the pull-up voltage control terminal GPIOV0 outputs a first control signal, the switch module is turned on and the voltage conversion module is disabled; when the pull-up voltage control terminal GPIOV0 outputs a second control signal, the switch module is turned off and the voltage conversion module is enabled.
2. The signal line pull-up voltage control device according to claim 1, characterized in that: include: The switch module is an N-type insulated gate field effect transistor, the source and drain of the N-type insulated gate field effect transistor correspond to the first end and the second end of the switch module respectively, and the gate of the N-type insulated gate field effect transistor corresponds to the controlled end of the switch module; The voltage conversion module is a power chip, and the enable end of the power chip is enabled when receiving a low level; the input end of the power chip corresponds to the input end of the voltage conversion module, the output end of the power chip corresponds to the output end of the voltage conversion module, the enable end of the power chip corresponds to the enable end of the voltage conversion module, and the ground end of the power chip is grounded; The first control signal is a high level signal, and the second control signal is a low level signal.
3. The signal line pull-up voltage control device according to claim 1 or 2, characterized in that: The pull-up resistor module includes: a plurality of pull-up resistors; The first ends of the pull-up resistors are connected in common, and the common end of the pull-up resistors is connected to the output end of the pull-up power supply network; The second end of each pull-up resistor is connected to the control signal line, the write protection signal line and the four data signal lines in a one-to-one correspondence.
4. A signal line pull-up voltage control system, comprising: A main controller, a secure digital card socket, characterized in that it also includes a signal line pull-up voltage control device as claimed in any one of claims 1 to 3; Each secure digital terminal of the main controller is connected to each secure digital terminal of the secure digital card holder via a signal line; The signal line pull-up voltage control device is connected to the main controller and each of the signal lines.
5. A signal line pull-up voltage control method, characterized in that: The signal line pull-up voltage control system as claimed in claim 4 comprises: Determine the highest supported Secure Digital protocol version of the Secure Digital card; If the highest supported secure digital protocol version is version 2.0, the switch module is controlled to be turned on and the voltage conversion module is disabled; If the highest supported secure digital protocol version is version 3.0, the switch module is controlled to be turned off and the voltage conversion module is enabled.
6. The signal line pull-up voltage control method according to claim 5, characterized in that: Determining the highest supported secure digital protocol version of the secure digital card includes: Writing a preset test file into the secure digital card at a first preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports at most is version 2.0; wherein the first preset clock frequency is the lowest value of the maximum clock frequencies corresponding to all bus operating modes supported when the secure digital protocol version that the secure digital card supports at most is version 2.0; A preset test file is written into the secure digital card at a second preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports at most is version 3.0; wherein the second preset clock frequency is the highest value of the maximum clock frequencies corresponding to all bus operating modes supported when the secure digital protocol version that the secure digital card supports at most is version 3.
0.
7. The signal line pull-up voltage control method according to claim 6, characterized in that: Writing a preset test file into the secure digital card at a first preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports the highest is version 2.0 includes: Writing a preset test file into the secure digital card according to the first preset clock frequency; Sending a request to the secure digital card to read the test file; If the reading fails, determining that the highest supported secure digital protocol version is version 2.0; If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete; If incomplete, determine that the highest supported secure digital protocol version is version 2.0; Writing a preset test file into the secure digital card at a second preset clock frequency to determine whether the secure digital protocol version that the secure digital card supports the highest is version 3.0 includes: writing a preset test file into the secure digital card according to the second preset clock frequency; Sending a request to the secure digital card to read the test file; If the reading is successful, the reading result returned by the secure digital card is received and compared with the preset test file to determine whether the test file is complete; If complete, it is determined that the highest supported secure digital protocol version is version 3.
0.
8. The signal line pull-up voltage control method according to claim 7, characterized in that: Also includes: If it cannot be determined that the highest supported secure digital protocol version is version 2.0 or version 3.0, the switch module is controlled to be turned on and the voltage conversion module is disabled; Execute the alarm action and return the prompt information.
9. The signal line pull-up voltage control method according to claim 5, characterized in that: Determining the highest supported secure digital protocol version of the secure digital card includes: Performing handshake communication with the secure digital card to obtain secure digital information; The secure digital information is parsed to determine the highest secure digital protocol version supported by the secure digital card.
10. The signal line pull-up voltage control method according to any one of claims 5 to 9, characterized in that: Before determining the highest supported secure digital protocol version of the secure digital card, the method further includes: When the electronic device is powered on, the switch module is controlled to be turned on and the voltage conversion module is disabled by default; After the secure digital card completes initialization, the switch module is controlled to be turned off and the voltage conversion module is enabled.
