技术领域technical field
本申请涉及SD卡领域,特别是涉及一种SD卡物理开关检测电路、方法及SD卡开关检测装置。The present application relates to the field of SD cards, in particular to an SD card physical switch detection circuit, method and SD card switch detection device.
背景技术Background technique
SD卡(Secure Digital Memory Card,中文简称:SD卡)是一种基于半导体快闪记忆器的新一代记忆设备.大小犹如一张邮票的SD记忆卡,重量只有2克,但却拥有高记忆容量、快速数据传输率、极大的移动灵活性以及很好的安全性。SD卡运行速度比MMC卡快很多,而且较为大众、便宜,普遍用于相机,笔记本,工控设备和服务器上。SD card (Secure Digital Memory Card, Chinese abbreviation: SD card) is a new generation of memory device based on semiconductor flash memory. The SD memory card is as big as a postage stamp, weighs only 2 grams, but has a high memory capacity , fast data transfer rate, great mobile flexibility and very good security. SD cards run much faster than MMC cards, and are more popular and cheaper. They are commonly used in cameras, notebooks, industrial control equipment and servers.
SD卡有两种状态,一种是可读写状态,一种是写保护状态。在使用SD卡的时候,会遇到到这样的问题,当系统将SD卡设置为unlock后,此时lock还是unlock受SD卡本身物理开关控制。在工厂产线测试人员测试SD卡时,BIOS无法侦测SD卡有没有lock,如果测试人员把SD卡lock住,用相关工具测试时不能写信息到此卡,测试会报错,引起测试人员不必要的麻烦。同时,当系统将SD卡设置为unlock而用户将SD卡lock后,用户无法写数据到SD卡,引起用户不必要的麻烦。The SD card has two states, one is readable and writable, and the other is write-protected. When using the SD card, you will encounter such a problem. When the system sets the SD card to unlock, the lock or unlock is controlled by the physical switch of the SD card itself. When the testers in the factory production line test the SD card, the BIOS cannot detect whether the SD card is locked. If the tester locks the SD card, they cannot write information to the card when testing with related tools, and the test will report an error, causing the tester to fail. necessary trouble. At the same time, when the system sets the SD card to unlock and the user locks the SD card, the user cannot write data to the SD card, causing unnecessary trouble for the user.
发明内容Contents of the invention
本申请的目的是提供一种SD卡物理开关检测电路和方法及SD卡开关检测装置,实现对SD卡物理开关状态的侦测,缩短产品的研发测试周期,减少对用户造成的不便。The purpose of this application is to provide an SD card physical switch detection circuit and method and an SD card switch detection device to realize the detection of the SD card physical switch state, shorten the product development and testing cycle, and reduce the inconvenience caused to users.
为解决上述技术问题,本申请提供了一种检测SD卡物理开关状态的电路,提供如下技术方案:In order to solve the above technical problems, the application provides a circuit for detecting the physical switch state of the SD card, and provides the following technical solutions:
SD卡物理开关检测电路包括:PCH芯片,SD卡连接器以及电源电路;SD card physical switch detection circuit includes: PCH chip, SD card connector and power supply circuit;
其中,所述PCH芯片的GPIO端口与所述SD卡连接器的WP_Switch引脚相连;Wherein, the GPIO port of the PCH chip is connected to the WP_Switch pin of the SD card connector;
所述电源电路与所述GPIO端口和所述WP_Switch引脚的连接线相连;The power supply circuit is connected to the connecting wire of the GPIO port and the WP_Switch pin;
所述PCH芯片的所述GPIO端口获取WP_Switch的引脚状态,并根据所述引脚状态确定SD卡物理开关状态。The GPIO port of the PCH chip acquires the pin state of WP_Switch, and determines the physical switch state of the SD card according to the pin state.
其中,所述检测电路包括:Wherein, the detection circuit includes:
所述SD卡连接器的WP_Switch引脚悬空时,SD卡的物理开关断开;When the WP_Switch pin of the SD card connector is suspended, the physical switch of the SD card is disconnected;
所述SD卡连接器的WP_Switch引脚接地时,SD卡的物理开关闭合。When the WP_Switch pin of the SD card connector is grounded, the physical switch of the SD card is closed.
其中,所述电源电路包括:Wherein, the power supply circuit includes:
3V电压和10KΩ的电阻。3V voltage and 10KΩ resistor.
本申请还提供一种SD卡开关检测装置,包括上述任意一项所述的检测电路。The present application also provides an SD card switch detection device, including the detection circuit described in any one of the above.
本申请还提供一种SD卡物理开关检测方法,所述方法包括:The present application also provides a method for detecting a physical switch of an SD card, the method comprising:
接收到检测SD卡物理开关的指令之后,确定PCH芯片上的GPIO端口状态;其中,所述第二GPIO端口与SD卡连接器上的WP_Switch引脚相连;After receiving the instruction to detect the SD card physical switch, determine the GPIO port state on the PCH chip; wherein, the second GPIO port is connected to the WP_Switch pin on the SD card connector;
当所述GPIO端口处于第一状态时,SD卡的物理开关断开;When the GPIO port is in the first state, the physical switch of the SD card is disconnected;
当所述GPIO端口处于第二状态时,SD卡的物理开关闭合。When the GPIO port is in the second state, the physical switch of the SD card is closed.
其中,所述第一状态为所述SD卡连接器的WP_Switch引脚接地的状态;所述第二状态为所述SD卡连接器的WP_Switch引脚悬空的状态。Wherein, the first state is a state where the WP_Switch pin of the SD card connector is grounded; the second state is a state where the WP_Switch pin of the SD card connector is floating.
其中,所述方法还包括:Wherein, the method also includes:
SD卡连接器的WP_Switch引脚接地时,使得SD卡控制芯片上的WP引脚处于低电平,所述SD卡控制芯片控制SD卡逻辑开关闭合。When the WP_Switch pin of the SD card connector is grounded, the WP pin on the SD card control chip is at a low level, and the SD card control chip controls the logic switch of the SD card to close.
其中,所述确定PCH芯片上的第二GPIO端口状态之后还包括:Wherein, after the second GPIO port state on the PCH chip is determined, it also includes:
提示装置根据所述第二GPIO端口状态提示SD卡物理开关状态。The prompting device prompts the physical switch state of the SD card according to the state of the second GPIO port.
本申请提供了一种检测SD卡物理开关的电路,通过对现有电路的改进,在PCH芯片上利用一个GPIO端口侦测物理开关对应的引脚状态,解决了现有技术中BIOS无法侦测SD卡物理开关状态导致的研发测试效率低和用户体验感觉差的问题,能够在测试开始时或系统开机时及时提示用户,缩短了产品研发测试周期。本申请还提供一种SD卡物理开关检测方法和SD卡开关检测装置,具有上述有益效果,此处不再赘述。This application provides a circuit for detecting the physical switch of the SD card. By improving the existing circuit, a GPIO port is used on the PCH chip to detect the pin state corresponding to the physical switch, which solves the problem that the BIOS cannot detect in the prior art. The problem of low R&D test efficiency and poor user experience caused by the physical switch state of the SD card can promptly prompt the user when the test starts or when the system is turned on, shortening the product R&D test cycle. The present application also provides a method for detecting a physical switch of an SD card and a device for detecting a switch of an SD card, which have the above-mentioned beneficial effects and will not be repeated here.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the prior art and the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present application. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为现有技术中检测SD卡时的电路图;Fig. 1 is the circuit diagram when detecting SD card in the prior art;
图2为本申请实施例实现检测SD卡物理开关功能对应的电路图;Fig. 2 realizes the corresponding circuit diagram of detecting SD card physical switch function for the embodiment of the present application;
图3为本申请实施例提供的一种SD卡开关检测装置的电路图;Fig. 3 is the circuit diagram of a kind of SD card switch detecting device that the embodiment of the application provides;
图4为本申请实施例提供的一种SD卡物理开关检测方法的流程图。FIG. 4 is a flow chart of a method for detecting a physical switch of an SD card provided by an embodiment of the present application.
具体实施方式detailed description
本申请提供一种能够检测SD卡物理开关状态的电路、方法及SD卡开关检测装置,实现对SD卡物理开关状态的侦测,缩短产品的研发测试周期,减少对用户造成的不便。The application provides a circuit, method and SD card switch detection device capable of detecting the physical switch state of the SD card, so as to realize the detection of the physical switch state of the SD card, shorten the product development and test cycle, and reduce the inconvenience caused to users.
如图1,图1为现有技术中检测SD卡时的电路图。当系统设置SD卡为lock或SD卡的物理开关被拨到闭合状态时,SD处于写保护状态,这时能够进行的操作只有读。对应的电路中PCH芯片的GPIO0端口为低电平,MOS管不导通,SD控制芯片的WP引脚受到SD卡连接器的WP开关控制:若此时物理开关被断开,则WP开关的引脚悬空,SD卡控制芯片的WP引脚处于高电平,SD卡因此处于写保护状态,只能读;若此时物理开关被闭合,WP开关的引脚接地,SD卡控制芯片的WP引脚处于低电平,SD卡既能读也能写。As shown in Fig. 1, Fig. 1 is a circuit diagram when detecting an SD card in the prior art. When the system sets the SD card to lock or the physical switch of the SD card is turned to the closed state, the SD is in a write-protected state, and the only operations that can be performed at this time are read. In the corresponding circuit, the GPIO0 port of the PCH chip is at low level, the MOS tube is not conducting, and the WP pin of the SD control chip is controlled by the WP switch of the SD card connector: if the physical switch is disconnected at this time, the WP switch’s If the pin is suspended, the WP pin of the SD card control chip is at a high level, so the SD card is in a write-protected state and can only be read; if the physical switch is closed at this time, the pin of the WP switch is grounded, and the WP pin of the SD card control chip When the pin is low, the SD card can both read and write.
对于SD卡来说,开关闭合对应unlock,开关断开对应lock。对于SD卡状态来说,SDlock表明SD卡处于写保护状态,只能读;SD unlock表明SD卡处于可读写状态。For the SD card, the switch close corresponds to unlock, and the switch open corresponds to lock. For the status of the SD card, SDlock indicates that the SD card is in a write-protected state and can only be read; SD unlock indicates that the SD card is in a readable and writable state.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, 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 It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
实施例一Embodiment one
请参照图2,图2为本实施例实现检测SD卡物理开关功能对应的电路图。Please refer to FIG. 2 . FIG. 2 is a circuit diagram corresponding to the function of detecting the physical switch of the SD card in this embodiment.
该部分电路包括PCH芯片100、SD卡连接器300和电源电路200,其中,所述PCH芯片100的GPIO端口与所述SD卡连接器300的WP_Switch引脚相连;所述电源电路200与所述GPIO端口和所述WP_Switch引脚的连接线相连;This part of the circuit includes a PCH chip 100, an SD card connector 300 and a power supply circuit 200, wherein the GPIO port of the PCH chip 100 is connected to the WP_Switch pin of the SD card connector 300; the power supply circuit 200 is connected to the The GPIO port is connected to the connecting wire of the WP_Switch pin;
当所述SD卡连接器300的WP_Switch引脚接地,PCH芯片100上的GPIO端口侦测到低电平,对应的SD卡物理开关处于闭合状态;当WP_Switch引脚悬空,GPIO端口侦测到高电平,对应的SD卡物理开关处于断开状态时。When the WP_Switch pin of the SD card connector 300 is grounded, the GPIO port on the PCH chip 100 detects a low level, and the corresponding SD card physical switch is in a closed state; when the WP_Switch pin is suspended, the GPIO port detects a high level level, when the corresponding physical switch of the SD card is in the disconnected state.
也可以设置一个pull up或pull down对GPIO端口的电平做出改变,使得在WP_Switch引脚接地时GPIO端口为高电平,WP_Switch引脚悬空时GPIO端口为低电平。或者有其他类似的改变,只要能够清楚地表现GPIO端口和WP_Switch的对应关系,都应当在本申请的保护范围之内。即本实施例并不限定GPIO端口与对应的SD卡物理开关的对应状态,即只要可以根据GPIO端口的信号确定对应的SD卡物理开关状态即可。You can also set a pull up or pull down to change the level of the GPIO port, so that the GPIO port is high when the WP_Switch pin is grounded, and the GPIO port is low when the WP_Switch pin is floating. Or there are other similar changes, as long as the corresponding relationship between the GPIO port and the WP_Switch can be clearly shown, all should be within the protection scope of the present application. That is, this embodiment does not limit the corresponding state of the GPIO port and the corresponding physical switch of the SD card, that is, as long as the corresponding physical switch state of the SD card can be determined according to the signal of the GPIO port.
本实施例并不限定电源电路的具体形式,只要可以提供适应性电能即可。可选的,所述电源电路可以包括一个电压和一个电阻,因为PCH芯片100的GPIO端口通常用的是+3V电,因此电源电路通常也是+3V电,保持和GPIO端口的额定电压一致即可。电阻主要起保护电路的作用,比如10KΩ的电阻,电源电路主要起到供电的作用,只要能给GPIO1端口供电即可,不限定其接入电路的位置。所述电源点路中的电阻第一端与电压相连,第二端接入到所述GPIO端口和所述WP_Switch引脚的连接线中。This embodiment does not limit the specific form of the power supply circuit, as long as it can provide adaptive electric energy. Optionally, the power supply circuit may include a voltage and a resistor, because the GPIO port of the PCH chip 100 usually uses +3V electricity, so the power supply circuit is usually also +3V electricity, and it can be kept consistent with the rated voltage of the GPIO port . The resistor mainly plays the role of protecting the circuit, such as a 10KΩ resistor, and the power supply circuit mainly plays the role of power supply, as long as it can supply power to the GPIO1 port, there is no limit to the position where it is connected to the circuit. The first end of the resistor in the power point circuit is connected to the voltage, and the second end is connected to the connection line between the GPIO port and the WP_Switch pin.
实施例二Embodiment two
如图3所示SD卡开关检测装置包括PCH芯片、SD卡连接器、SD卡控制芯片、MOS管以及电源电路;其中,所述PCH芯片的GPIO1端口与所述SD卡连接器的WP_Switch引脚相连;SD card switch detection device as shown in Figure 3 comprises PCH chip, SD card connector, SD card control chip, MOS tube and power supply circuit; Wherein, the GPIO1 port of described PCH chip and the WP_Switch pin of described SD card connector connected;
所述电源电路与所述GPIO1端口和所述WP_Switch引脚的连接线相连;The power supply circuit is connected to the connecting line between the GPIO1 port and the WP_Switch pin;
所述PCH芯片的所述GPIO1端口获取WP_Switch的引脚状态,并根据所述引脚状态确定SD卡物理开关状态。The GPIO1 port of the PCH chip acquires the pin state of WP_Switch, and determines the physical switch state of the SD card according to the pin state.
MOS管的栅极与PCH芯片的GPIO0端口相连,源极与SD卡连接器的WP_Switch相连,漏极与SD卡控制芯片的WP引脚相连。The gate of the MOS transistor is connected to the GPIO0 port of the PCH chip, the source is connected to the WP_Switch of the SD card connector, and the drain is connected to the WP pin of the SD card control chip.
所述电源电路包括一个+3V电压和一个10KΩ的电阻,因为PCH芯片的GPIO端口用的是+3V电,电源电路用的也是+3V电,保持和GPIO端口的电压一致即可。电源电路主要起到供电的作用,只要能给GPIO1端口的额定电压即可,不限定其接入电路的位置。The power supply circuit includes a +3V voltage and a 10KΩ resistor, because the GPIO port of the PCH chip uses +3V power, and the power supply circuit also uses +3V power, just keep the same voltage as the GPIO port. The power supply circuit mainly plays the role of power supply, as long as it can provide the rated voltage of the GPIO1 port, there is no limit to the position where it is connected to the circuit.
当系统需要对SD卡lock时,BIOS把PCH芯片的GPIO0端口拉低电平,SD卡控制芯片的WP引脚被拉高电平,高电平时SD卡写保护,只能读。当系统需要对SD卡unlock时,BIOS把PCH芯片GPIO0端口拉高,SD卡控制芯片的WP引脚脚受WP开关控制,也就是受到SD卡的物理开关控制。When the system needs to lock the SD card, the BIOS pulls the GPIO0 port of the PCH chip to a low level, and the WP pin of the SD card control chip is pulled to a high level. When the high level is high, the SD card is write-protected and can only be read. When the system needs to unlock the SD card, the BIOS pulls the GPIO0 port of the PCH chip high, and the WP pin of the SD card control chip is controlled by the WP switch, that is, controlled by the physical switch of the SD card.
但是当系统需要对SD卡unlock时,此时PCH芯片的GPIO0端口为高电平,当闭合SD卡的物理开关时,SD卡连接器的WP_Switch引脚接地,对应的WP引脚就变成低电平,SD卡控制芯片控制SD卡逻辑开关闭合,此时PCH芯片的GPIO1端口侦测到低电平,BIOS中设置SD卡unlock;当打开SD卡的物理开关时,SD卡连接器的WP_Switch引脚悬空,对应WP引脚高电平,SD卡控制芯片控制SD卡逻辑开关断开,PCH芯片的GPIO1端口侦测到高电平,BIOS中设置为SD卡lock;所以BIOS可以通过PCH芯片的GPIO1这个端口的高低电平来判断SD卡的状态是可读写还是写保护。But when the system needs to unlock the SD card, the GPIO0 port of the PCH chip is at high level at this time. When the physical switch of the SD card is closed, the WP_Switch pin of the SD card connector is grounded, and the corresponding WP pin becomes low. Level, the SD card control chip controls the logic switch of the SD card to close. At this time, the GPIO1 port of the PCH chip detects a low level, and the SD card is set to unlock in the BIOS; when the physical switch of the SD card is turned on, the WP_Switch of the SD card connector The pin is suspended, corresponding to the high level of the WP pin, the SD card control chip controls the logic switch of the SD card to be disconnected, the GPIO1 port of the PCH chip detects a high level, and the BIOS is set to SD card lock; so the BIOS can pass the PCH chip The high and low levels of the GPIO1 port can be used to judge whether the status of the SD card is read-write or write-protected.
也可以对GPIO1端口的接入电路做改变,增添其他电路使得GPIO1端口能够表现其他种不同的状态。甚至引入一个电路使得GPIO1端口在侦测到低电平时物理开关断开,高电平时物理开关闭合等等方式也应当在本申请的保护范围之内。It is also possible to change the access circuit of the GPIO1 port and add other circuits so that the GPIO1 port can display other different states. Even introducing a circuit so that the physical switch of the GPIO1 port is turned off when a low level is detected, and the physical switch is closed when a high level is detected, etc. should also be within the scope of protection of this application.
相应的,BIOS根据GPIO1端口的状态在相应的测试程式下提示测试人员SD卡的状态,如果SD卡处于lock状态时需要手工设置SD的开关设置成unlock。若是SD卡物理开关处于闭合状态,则测试过程正常进行。Correspondingly, the BIOS prompts the tester the status of the SD card under the corresponding test program according to the status of the GPIO1 port. If the SD card is in the locked status, it is necessary to manually set the SD switch to unlock. If the physical switch of the SD card is closed, the test process is carried out normally.
实施例三Embodiment three
请参照图4,图4为本实施例对应的流程图Please refer to Figure 4, Figure 4 is a flowchart corresponding to this embodiment
S101:收到检测SD卡物理开关的指令;S101: Receive an instruction to detect the physical switch of the SD card;
收到检测SD卡物理开关的指令包括人工发送请求检测SD卡物理开关的指令,也可以是在测试人员打开测试机器准备测试SD卡时机器会自动发出该指令请求查询SD卡的物理开关状态,或者是用户在系统开机时系统发出该指令等。Receiving the instruction to detect the physical switch of the SD card includes manually sending the instruction to request the detection of the physical switch of the SD card, or the machine will automatically send the instruction to query the physical switch status of the SD card when the tester turns on the test machine to prepare for testing the SD card. Or the system issues the command when the user starts the system.
S102:确定PCH芯片上的第二GPIO端口状态;其中,所述第二GPIO端口与SD卡连接器上的WP_Switch引脚相连;S102: Determine the state of the second GPIO port on the PCH chip; wherein, the second GPIO port is connected to the WP_Switch pin on the SD card connector;
PCH芯片上的第二GPIO端口与SD卡连接器上的WP_Switch引脚直接相连,能够直接侦测WP_Switch引脚的状态。当然,还需要一个供电用的电源电路,电源电路包括一个电压和电阻:电路的电压满足GPIO端口的额定电压要求,具有一个保护电路用的保护电阻。The second GPIO port on the PCH chip is directly connected to the WP_Switch pin on the SD card connector, which can directly detect the state of the WP_Switch pin. Of course, a power supply circuit for power supply is also required, and the power supply circuit includes a voltage and a resistor: the voltage of the circuit meets the rated voltage requirement of the GPIO port, and there is a protective resistor for protecting the circuit.
S103:当所述第二GPIO端口处于第一状态时,SD卡的物理开关断开;S103: When the second GPIO port is in the first state, the physical switch of the SD card is turned off;
当所述第二GPIO端口处于第二状态时,SD卡的物理开关闭合。When the second GPIO port is in the second state, the physical switch of the SD card is closed.
当SD卡的物理开关断开时,也就是WP_Switch的引脚悬空,此时第二GPIO端口侦测到高电平,处于高电平状态。When the physical switch of the SD card is disconnected, that is, the pin of WP_Switch is suspended, at this time, the second GPIO port detects a high level and is in a high level state.
当SD卡的物理开关闭合后,也即WP_Switch的引脚接地,此时第二GPIO端口侦测到低电平,处于低电平状态。When the physical switch of the SD card is closed, that is, the pin of WP_Switch is grounded, at this time, the second GPIO port detects a low level and is in a low level state.
也可以对第二GPIO端口的接入电路做改变,增添其他电路使得第二GPIO端口能够表现其他种不同的状态。甚至改变端口设置比如利用pull up或pull down使得第二GPIO端口在侦测到低电平时物理开关断开,高电平时物理开关闭合等等方式也应当在本申请的保护范围之内。It is also possible to change the access circuit of the second GPIO port, adding other circuits so that the second GPIO port can display other different states. Even changing the port settings such as using pull up or pull down to make the physical switch of the second GPIO port open when a low level is detected, and the physical switch is closed when a high level is detected, etc. should also be within the protection scope of the present application.
此外,当SD卡连接器的WP_Switch引脚接地时,SD卡控制芯片上的WP引脚为低电平,此时控制芯片就会控制SD卡逻辑开关闭合;相应的,WP_Switch引脚悬空时,SD卡控制芯片上的WO引脚为高电平,此时控制芯片就会控制SD卡逻辑开关断开。In addition, when the WP_Switch pin of the SD card connector is grounded, the WP pin on the SD card control chip is low, and the control chip will control the logic switch of the SD card to close; correspondingly, when the WP_Switch pin is floating, When the WO pin on the SD card control chip is at high level, the control chip will control the logic switch of the SD card to be disconnected.
优选的,在侦测到SD卡物理开关状态后,还可以增加一个提示装置。BIOS在侦测到第二GPIO端口的状态后,可以调用相关程序提醒测试人员或其他用户。Preferably, after detecting the physical switch state of the SD card, a prompting device can also be added. After the BIOS detects the state of the second GPIO port, it can call a relevant program to remind testers or other users.
提示的方法有很多,如果是测试人员,可以利用一个LED灯作为指示灯,指示灯亮时表示SD卡物理开关断开,需要手动闭合。还可以利用提示音等形式。对于其他用户来说,可以在系统开机检测到SD卡物理开关断开后以提示框的形式提示用户SD卡物理开关断开。There are many ways to prompt. If you are a tester, you can use an LED light as an indicator light. When the indicator light is on, it means that the physical switch of the SD card is disconnected and needs to be closed manually. It is also possible to use forms such as a prompt sound. For other users, after the system starts up and detects that the physical switch of the SD card is disconnected, the user can be prompted to disconnect the physical switch of the SD card in the form of a prompt box.
实施例四Embodiment four
本申请可以应用于以下场景:This application can be applied to the following scenarios:
测试人员在机器上测试SD卡时,打开测试机器,这时启动SD卡物理开关检测流程:When testing the SD card on the machine, the tester turns on the test machine and starts the SD card physical switch detection process:
判断PCH芯片上与SD卡连接器上WP_Switch引脚相连的GPIO端口的状态。Determine the status of the GPIO port connected to the WP_Switch pin on the SD card connector on the PCH chip.
当SD卡物理开关闭合时,与GPIO端口相连的WP_Switch引脚接地,WP引脚处于低电平,SD卡控制芯片控制SD卡逻辑开关unlock,因此GPIO端口侦测到低电平,BIOS检测到GPIO端口的低电平即得知SD卡物理开关是闭合状态,提示装置的指示灯亮绿灯,测试流程正常进行。When the SD card physical switch is closed, the WP_Switch pin connected to the GPIO port is grounded, the WP pin is at low level, and the SD card control chip controls the SD card logic switch to unlock, so the GPIO port detects a low level, and the BIOS detects The low level of the GPIO port means that the physical switch of the SD card is closed, and the indicator light of the prompt device is green, and the test process is carried out normally.
当SD卡物理开关断开时,与GPIO端口相连的WP_Switch引脚悬空,WP引脚处于高电平,SD卡控制芯片控制SD卡逻辑开关lock,因此GPIO端口侦测到高电平,BIOS检测到GPIO端口的高电平即得知SD卡物理开关是断开状态,影响测试。此时BIOS向提示装置发送报警消息,提示装置的指示灯亮红灯,提示测试人员SD卡物理开关没有闭合。When the physical switch of the SD card is disconnected, the WP_Switch pin connected to the GPIO port is suspended, the WP pin is at a high level, and the SD card control chip controls the logic switch of the SD card to lock, so the GPIO port detects a high level, and the BIOS detects The high level of the GPIO port means that the physical switch of the SD card is off, which affects the test. At this time, the BIOS sends an alarm message to the prompting device, and the indicator light of the prompting device is red, prompting the tester that the physical switch of the SD card is not closed.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其他实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710457277.0ACN107256187A (en) | 2017-06-16 | 2017-06-16 | SD card physical switch detection circuit, method and SD card closing detecting apparatus |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710457277.0ACN107256187A (en) | 2017-06-16 | 2017-06-16 | SD card physical switch detection circuit, method and SD card closing detecting apparatus |
| Publication Number | Publication Date |
|---|---|
| CN107256187Atrue CN107256187A (en) | 2017-10-17 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710457277.0APendingCN107256187A (en) | 2017-06-16 | 2017-06-16 | SD card physical switch detection circuit, method and SD card closing detecting apparatus |
| Country | Link |
|---|---|
| CN (1) | CN107256187A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7836236B2 (en)* | 2004-02-12 | 2010-11-16 | Super Talent Electronics, Inc. | Extended secure-digital (SD) devices and hosts |
| CN106776183A (en)* | 2016-12-22 | 2017-05-31 | 歌尔科技有限公司 | A kind of debug circuit, debugging apparatus, modulating system and a kind of electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7836236B2 (en)* | 2004-02-12 | 2010-11-16 | Super Talent Electronics, Inc. | Extended secure-digital (SD) devices and hosts |
| CN106776183A (en)* | 2016-12-22 | 2017-05-31 | 歌尔科技有限公司 | A kind of debug circuit, debugging apparatus, modulating system and a kind of electronic equipment |
| Publication | Publication Date | Title |
|---|---|---|
| TWI493870B (en) | Method and system for distinguishing between charging ports | |
| CN102055223B (en) | USB special charger recognition circuit | |
| CN105182154B (en) | A kind of USB detection circuit and method | |
| CN103149526B (en) | PCBA board test macro and method | |
| CN107480086A (en) | Support circuit, terminal and its control method of OTG functions | |
| CN106531654B (en) | A kind of chip input pin test method and device | |
| EP2584471A1 (en) | Method and terminal for selecting internal circuit according to USB interface status | |
| KR20130043662A (en) | Detection of cable connections for electronic devices | |
| CN101989749B (en) | Charging device and charging method | |
| WO2016045001A1 (en) | Usb data pin impedance detection | |
| KR20130035971A (en) | Charger detection with proprietary charger support | |
| CN101320071A (en) | System and method for testing at least one device with a connection interface | |
| CN103198033A (en) | Apparatus and method for detecting universal serial bus and mobile high-resolution linking devices | |
| BR112016010983B1 (en) | REMOVABLE MEMORY CARD DISCRIMINATION SYSTEMS AND METHODS | |
| CN110489259B (en) | Memory fault detection method and equipment | |
| CN107590040A (en) | A kind of hard disk backboard and computer installation, hard disk fault detection method and memory | |
| US7380042B2 (en) | Method of detecting and monitoring master device communication on system bus | |
| CN109298266B (en) | Test system, test method, test device and storage medium | |
| CN107203448A (en) | A kind of method and system of test PCIe switch chip violence warm connection functions | |
| WO2015113472A1 (en) | Method and device for detecting interface access mode of smart key device | |
| CN107688521A (en) | A kind of server power supply detects circuit and detection method in place | |
| CN107229579A (en) | The USB mode of USB interface and the compatibility method and device of MHL patterns | |
| CN105071484B (en) | A kind of charging method and device of the terminal with data exchanging function | |
| CN107005051A (en) | Apparatus and method for the electric power conflict parsing in power transmission system | |
| CN104991184A (en) | On-chip tri-state signal detecting apparatus and detecting method thereof |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20171017 | |
| RJ01 | Rejection of invention patent application after publication |