CN110895502B - Control method and device for hard disk state indicating device, electronic equipment and storage medium - Google Patents
Control method and device for hard disk state indicating device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110895502B CN110895502B CN201811581125.2A CN201811581125A CN110895502B CN 110895502 B CN110895502 B CN 110895502B CN 201811581125 A CN201811581125 A CN 201811581125A CN 110895502 B CN110895502 B CN 110895502B
- Authority
- CN
- China
- Prior art keywords
- signal
- hard disk
- disk state
- state
- indication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000003860 storage Methods 0.000 title claims abstract description 17
- 230000000694 effects Effects 0.000 claims abstract description 20
- 238000012360 testing method Methods 0.000 claims description 51
- 238000001514 detection method Methods 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 23
- 238000004458 analytical method Methods 0.000 claims description 2
- 230000000630 rising effect Effects 0.000 claims description 2
- 230000004044 response Effects 0.000 claims 1
- 238000005070 sampling Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 5
- 239000000463 material Substances 0.000 description 4
- 230000008054 signal transmission Effects 0.000 description 4
- 238000003466 welding Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000004397 blinking Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3037—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to a control method, a control device, an electronic device and a storage medium of a hard disk state indicating device, wherein the control method, the control device, the electronic device and the storage medium are used for receiving an SGPIO signal, and the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal; when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal. The technical scheme can be completed by the ARM processor, and solves the problem that the ARM processor cannot analyze data and control the state of the hard disk at the same time, so that the ARM processor reduces cost and power consumption on the premise of realizing a good control effect.
Description
Technical Field
The present invention relates to the field of hard disk management technologies, and in particular, to a method and apparatus for controlling a hard disk status indication device, an electronic device, and a storage medium.
Background
With the high-speed development of computer level, the requirement of the server on storage performance is also continuously improved, and the number and capacity of the hard disks of the server are greatly increased at present, so that the discovery and replacement of damaged hard disks become complex and complicated, and therefore, the management of the hard disk state indicating device on the hard disks is particularly important.
The running state of each hard disk can be directly checked by naked eyes through the state of the hard disk state indicating device, at present, a hard disk backboard designed by adopting a CPLD (Complex Programmable Logic Device ) is already on the market, and SGPIO (Serial General Purpose Input/Output) signals are analyzed to control the hard disk state indicating device to indicate functions of reading and writing, selection, error indication and the like of the hard disk, so that the server is more intelligent and easy to maintain.
However, CPLD is relatively high in cost and power consumption, and its application is not so widespread.
Disclosure of Invention
Based on this, it is necessary to provide a hard disk state indicating device control method, device, electronic device and storage medium, aiming at the problem that CPLD costs and power consumption are relatively high.
A method for controlling a hard disk status indication device, the method comprising:
receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal;
when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected;
analyzing the SDataOut signal to obtain a hard disk state signal;
and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
In one embodiment, the hard disk state signal includes a location signal, an Activity signal, and an Error signal, and outputting, according to the hard disk state signal, a hard disk state indication signal to the hard disk state indication device to be controlled includes:
outputting a first hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Locate signal, wherein the first hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a selected state;
outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state;
and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
In one embodiment, the method further comprises:
receiving a hard disk detection signal and a hard disk read-write signal;
and responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to a hard disk state indication device to be controlled through GPIO (General Purpose Input Output, general input/output).
In one embodiment, the hard disk state indication signal output through the GPIO includes a first indication signal and a second indication signal, and responding to the hard disk detection signal and the hard disk read-write signal, the outputting the hard disk state indication signal through the GPIO to the hard disk state indication device to be controlled includes:
when the hard disk detection signal is detected to be at a low level, outputting a first indication signal to a to-be-controlled hard disk state indication device through the GPIO, wherein the first indication signal is used for controlling the to-be-controlled hard disk in-place indication unit to indicate that the corresponding hard disk is in place;
when the hard disk read-write signal is detected to be in a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
In one embodiment, the method further comprises:
when entering an automatic test mode, the GPIO outputs a hard disk state indicating signal combination to the hard disk state indicating device to be controlled, wherein the hard disk state signal combination is an analog signal combination and is used for controlling the hard disk state indicating device to feed back a test result.
In one embodiment, the combination of the hard disk State indication signals output through the GPIO includes an led_active signal, an led_error signal, an led_state signal, and an led_locate signal, and when entering the automatic test mode, outputting the combination of the hard disk State indication signals through the GPIO to the hard disk State indication device to be controlled includes:
When entering an automatic test mode, outputting a first hard disk state indication signal combination to a hard disk state indication device to be controlled through a GPIO, wherein the first hard disk state indication signal combination comprises a high-level LED_active signal and a low-level LED_error signal;
when entering an automatic test mode, outputting a second hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO, wherein the second hard disk state indication signal combination comprises a low-level LED_active signal and a high-level LED_error signal;
when entering an automatic test mode, outputting a third hard disk State indication signal combination to a hard disk State indication device to be controlled through a GPIO, wherein the third hard disk State indication signal combination comprises a high-level LED_State signal and a low-level LED_Locate signal;
when entering the automatic test mode, outputting a fourth hard disk State indication signal combination to the hard disk State indication device to be controlled through the GPIO, wherein the fourth hard disk State indication signal combination comprises a low-level LED_State signal and a high-level LED_Locate signal.
A hard disk state indicating device control device, comprising:
the receiving module is used for receiving SGPIO signals, wherein the SGPIO signals comprise SClock signals, SLoad signals and SDataOut signals;
The data acquisition module is used for acquiring SDataOut signals when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level;
the analysis module is used for analyzing the SDataOut signal and acquiring a hard disk state signal;
the control module is used for outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
In one embodiment, the apparatus further comprises:
and the automatic test module is used for outputting a hard disk state indicating signal combination to the hard disk state indicating device to be controlled through the GPIO when entering an automatic test mode, wherein the hard disk state signal combination is an analog signal combination and is used for controlling the hard disk state indicating device to feed back a test result.
An electronic device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal;
when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected;
analyzing the SDataOut signal to obtain a hard disk state signal;
and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal;
when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected;
analyzing the SDataOut signal to obtain a hard disk state signal;
and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
The control method, the device, the electronic equipment and the storage medium of the hard disk state indicating device receive the SGPIO signals, wherein the SGPIO signals comprise SClock signals, SLoad signals and SDataOut signals; when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal. The technical scheme can be completed by the ARM processor, and solves the problem that the ARM processor cannot analyze data and control the state of the hard disk at the same time, so that the ARM processor reduces cost and power consumption on the premise of realizing a good control effect.
Drawings
FIG. 1 is an application environment diagram of a method for controlling a hard disk status indication device;
FIG. 2 is a flow chart of a method for controlling a hard disk status indicator in one embodiment;
FIG. 3 is a schematic diagram of an SGPIO bus;
FIG. 4 is a detailed flow chart of a method for controlling a hard disk status indicator in one embodiment;
fig. 5 is a schematic structural diagram of a control device of the hard disk status indication device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for controlling the hard disk state indicating device provided by the application can be applied to an application environment as shown in fig. 1, and comprises a RAID controller 102, a microcontroller 104 and a hard disk state indicating device 106, wherein the RAID (Redundant Arrays of Independent Drives, disk array) controller 102 is a hardware device or a software program for managing a hard disk drive or a solid state hard disk in a computer or a storage array, and the microcontroller 104 is a single-chip microcomputer integrating a main part of the microcomputer on a chip. The RAID controller 102 serves as a master device, and sends SGPIO signals carrying hard disk information to the microcontroller 104 through SGPIO protocol, where the SGPIO signals include a SClock signal, a SLoad signal, and a sdata out signal; when the microcontroller 104 detects that the falling edge of the SClock signal triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; according to the hard disk status signal, a hard disk status indication signal is output to the hard disk status indication device 106 to be controlled. The microcontroller 104 may include an ARM (Advanced RISC Machine, advanced reduced instruction set machine) microcontroller, a CPLD microcontroller, an FPGA (Field-Programmable Gate Array, field programmable gate array) microcontroller, etc., and the hard disk status indicator 106 may be a device that reflects an operation status of the hard disk, and may include an LED (Light Emitting Diode ) lamp, an LED display screen, a voice player, etc. For the sake of more clear explanation of the present application, the RAID controller 102 will be exemplified by a RAID card chip, the microcontroller 104 is exemplified by an ARM microcontroller, and the hard disk status indicating device 106 is exemplified by an LED lamp.
In one embodiment, as shown in fig. 2, a method for controlling a hard disk status indication device is provided, and the method is applied to an ARM microcontroller for illustration, and includes the following steps:
in step S200, an SGPIO signal is received, where the SGPIO signal includes a SClock signal, a SLoad signal, and a SDataOut signal.
The RAID controller is configured to indicate the state of the hard disk in three manners, i.e., GPIO, SGPIO and I2C, where SGPIO is the most commonly used manner among the three manners, and the SGPIO signal is a signal output by the RAID card chip through the SGPIO bus, as shown in fig. 3, the SGPIO bus is divided into four pieces, i.e., SClock, SLoad, SDataOut and sdaatain, and its corresponding output signals are four signals, i.e., a SClock signal, a SLoad signal, a sdaataout signal and a sdaatain signal, where the SClock signal is a clock signal output by the RAID card chip; the SLoad signal is the last clock mark signal of the bit stream string, and the clock immediately following the last clock mark signal is the beginning of a new bit stream string signal; the SDataOut signal is a serial data output bit stream signal; the sdaatain signal is a serial data input bitstream signal. In this embodiment, the ARM microcontroller is explained by using M051 series of microcontrollers M054, numicro TM M051 series is as follows-M0 is a 32-bit microcontroller of the kernel, applied in the field of industrial control and requiring rich communication interfaces. NuMicro TM M051 series including M052xBN/xDN/xDE, M054xBN/xDN/xDE, M058xBN/xDN/xDE and M0516xBN/xDN/xDE SGPIO (serial Universal input output) are one method of serializing a general IO signal. SGPIO defines the communication of an initiating device (e.g., host bus adapter) and a target device (e.g., backplane of a pluggable hard drive). The target device converts the output signal to a number of parallel hard disk state signals and provides an input signal to the universal input signal line. The initiating and target devices may be comprised of one or more chips. If multiple chips are used, the signals driving the bus should be sorted to meet this criterion. Specifically, the microcontroller M054 passively receives the SGPIO signal sent by the RAID card chip through the SGPIO protocol.
In step S400, when the falling edge of the SClock signal triggers an interrupt and the SLoad signal is at a low level, the SDataOut signal is collected.
In the present embodiment, in the digital clock circuit, the instant at which the digital level changes from the high level (digital "1") to the low level (digital "0") is called a falling edge. The interruption refers to that when some unexpected situations occur and the host intervention is needed, the machine can automatically stop the running program and transfer to the program for processing the new situation, and the program which is suspended originally is returned to continue running after the processing is finished. The falling edge interruption is generated when the target signal changes from high level to low level. In this embodiment, after receiving the SGPIO signal, the microcontroller M054 initializes four signals of the SClock signal, the SLoad signal, the SDataout signal, and the SDatain signal in the SGPIO signal, initializes the SClock signal and the SLoad to be a falling edge interrupt, initializes the time period of the timer to be 64ms, configures the flicker frequency of the hard disk state indicating device, and when the SClock signal is a falling edge trigger interrupt, responds to the interrupt, and collects the SDataout signal. Specifically, the start of SGPIO signal transmission is not the start of each frame signal, but the SGPIO signal starts transmission. When the SGPIO signal does not work, the SClock, the SLoad and the SDataout are all at high level, when the SGPIO signal starts to work, the level of the SClock signal is pulled down (the falling edge is interrupted), which indicates that the SGPIO signal starts to transmit, the SLoad signal is synchronously pulled down, and the level of the SDataout signal changes when the rising edge is caused, so that at the moment, the SDataout is at high level, and the SDataout level signal sampled by the falling edge (interruption) of the next SClock signal is the first frame data. End of SGPIO signal transmission, which is not the end of each frame signal, but the SGPIO signal ends transmission. In the process of SGPIO signal transmission, when the SClock signal is detected to have no level change (continuously high level) in 64ms, the SGPIO signal transmission is considered to be ended, and all hard disk state indicating devices are closed. The end and start of each frame of the SGPIO signal, after the SGPIO signal starts to transmit, will send data in a frame-by-frame manner, and according to the SGPIO protocol, there are at least 5 low levels on the SLoad line in succession, and then there are high levels, indicating the end of this frame of data and the start of the next frame of data (the SDataOut signal detected by the next SClock falling edge is another frame of data). It will be appreciated that in this embodiment, the time period may be set to different values according to the specific circumstances.
Step S600, analyzing the SDataOut signal to obtain the hard disk state signal.
The SDataOut signal line carries hard disk running state information, and the microcontroller M054 parses the information according to the falling edge interrupt. Each frame of the SDataOut signal carries a plurality of drivers, each driver has three bits, bit0 is an Activity signal disc and has data interaction), bit1 is a State signal (hard disk insertion), and bit2 is Error signal disc Error. One driver manages one hard disk and a group of SGPIOs manages 4 hard disks, so the first 4 drivers (driver 0-driver 3) on the SDataOut signal are used. The correspondence is as follows:
activity signal | State signal | Error signal | |
Hard disk 0 | Driver0.bit0 | Driver0.bit1 | Driver0.bit2 |
Hard disk 1 | Driver1.bit0 | Driver1.bit1 | Driver1.bit2 |
Hard disk 2 | Driver2.bit0 | Driver2.bit1 | Driver2.bit2 |
Hard disk 3 | Driver3.bit0 | Driver3.bit1 | Driver3.bit2 |
After the microcontroller M054 collects the SDataOut signal, the SDataOut signal is analyzed according to the falling edge interruption, bit information carried by the SDataOut signal is read, and a hard disk state signal is obtained.
Step S800, according to the hard disk state signal, outputting a hard disk state indication signal to the hard disk state indication device to be controlled.
The hard disk state signal is a signal representing the operation state of the hard disk, and the operation state of the hard disk can include a read-write state, a hard disk in-place state, a hard disk error reporting state and the like, and the hard disk state indicating signal is used for controlling the to-be-controlled hard disk state indicating device to display the state of the hard disk.
In the method for controlling the hard disk state indicating device, an SGPIO signal is received, where the SGPIO signal includes an SClock signal, a SLoad signal, and an SDataOut signal; when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal. The technical scheme can be completed by the ARM processor, and solves the problem that the ARM processor cannot analyze data and control the state of the hard disk at the same time, so that the ARM processor reduces cost and power consumption on the premise of realizing a good control effect.
As shown in fig. 4, in one embodiment, the hard disk status signal includes a Locate signal, an Activity signal, and an Error signal, and outputting a hard disk status indication signal to the hard disk status indication device to be controlled according to the hard disk status signal includes: s820, outputting a first hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Locate signal, wherein the first hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a selected state; s840, outputting a second hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state; s860, according to the Error signal, outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled, where the third hard disk state indicating signal is used to control the hard disk state indicating device to indicate that the corresponding hard disk fails.
Specifically, when the microcontroller M054 analyzes the hard disk status signals sent by the RAID card chip, different hard disk status indication signals are output to the hard disk indicator light to be controlled according to the different hard disk status signals. The hard disk status indication signal may include a hard disk in-place indication signal, a hard disk read-write indication signal, and a hard disk failure indication signal. The number of the hard disk indicator lamps can be one or more, and in this embodiment, a plurality of hard disk indicator lamps are adopted, including hard disk in-place indicator lamps, hard disk read-write indicator lamps and hard disk fault indicator lamps. When the hard disk state signal is a Locate signal, outputting a hard disk on-site indication signal to a hard disk on-site indication lamp to be controlled, and executing red flashing when the hard disk on-site indication lamp receives the hard disk on-site indication signal, wherein people can judge that the hard disk is in a selected state according to the flashing state of the red lamp; when the hard disk state signal is an Activity signal, outputting a hard disk read-write indicating signal to a hard disk read-write indicating lamp to be controlled, and executing green flashing when the hard disk read-write indicating lamp receives the hard disk read-write indicating signal, wherein people can judge that the hard disk has data interaction in a read-write state according to the state that the hard disk read-write indicating lamp is green flashing; when the hard disk state signal is an Error signal, a hard disk fault indication signal is output to a hard disk fault indication lamp to be controlled, and when the hard disk fault indication lamp receives the hard disk fault indication signal, red flashing is executed, and people can judge that the hard disk breaks down according to the red flashing state of the hard disk fault indication lamp. Therefore, the detection of the running state of the hard disk is not needed, the state of the hard disk indicator lamp is controlled through the hard disk state information fed back by the RAID card chip, so that a person can judge the current running state of the corresponding hard disk through the state of the hard disk indicator lamp, and the time and labor cost are saved.
In one embodiment, the method further comprises the steps of receiving a hard disk detection signal and a hard disk read-write signal; and responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to the hard disk state indication device to be controlled through the GPIO.
The method is also compatible with providing the functions of an in-place indicator light and a read-write indicator light for the SAS/SATA hard disk only when the RAID controller is not available. In this embodiment, the hard disk state indicating device is an LED lamp, and the device connected with the ARM microcontroller may be SAS or SATA interface device, and may be directly connected with 8-12 hard disks at most; the device and the ARM microcontroller are directly connected through the SAS1_STATE-, the LED_SAS1_ACT1 and the ARM microcontroller, the STATE information of the device can be directly fed back to the ARM microcontroller, the ARM microcontroller and the LED lamp are connected with the ARM microcontroller through the GPIO, 8 groups are formed, and each group comprises LED_State and LED_active signals. The ARM controller can control the LED through the GPIO according to the information fed back by the Device, and feeds back corresponding information to a user. Specifically, SAS 1_state-is a hard disk detection signal, led_sas1_act1 is a hard disk read/write signal, when a hard disk is inserted, the ARM microcontroller hard disk detection signal is in a low level STATE, and when the hard disk has read/write activity, the ARM microcontroller detects that the hard disk read/write signal is in a low level STATE. After the ARM controller receives the signals and carries out logic judgment, the ARM controller outputs a hard disk state indication signal to the LED lamp to be controlled through the GPIO to realize the function of indicating the state of the hard disk. In this embodiment, when there is no RAID controller, the functions of the bit indicator light and the read/write indicator light are provided for only SAS/SATA hard disk, so as to realize functional diversification of ARM microcontrollers.
In one embodiment, the hard disk state indication signal output through the GPIO includes a first indication signal and a second indication signal, and responding to the hard disk detection signal and the hard disk read-write signal, the outputting the hard disk state indication signal through the GPIO to the hard disk state indication device to be controlled includes: when the hard disk detection signal is detected to be at a low level, outputting a first indication signal to a to-be-controlled hard disk state indication device through the GPIO, wherein the first indication signal is used for controlling the to-be-controlled hard disk in-place indication unit to indicate that the corresponding hard disk is in place; when the hard disk read-write signal is detected to be in a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
Specifically, the signals output by the GPIO are set to be high-level effective, the hard disk State indication signals comprise an LED_State signal and an LED_active signal, when the ARM microcontroller detects that the received hard disk detection signal is low-level, the signals are responded, a State_flag signal sent by equipment of an SAS or SATA interface is obtained, when the State_flag signal is high-level, the high-level LED_State signal is output through the GPIO, when the LED lamp receives the high-level LED_State signal, the hard disk in-place indication lamp is controlled to be in a normally-on State, and people can know that the hard disk is inserted by means of the normally-on State of the hard disk in-place indication lamp; when the state_flag signal is at a low level, the low-level LED_state signal is output through the GPIO, and when the LED lamp receives the low-level LED_state signal, the hard disk on-site indicator lamp is controlled to be in an off State, and people can know that no hard disk is inserted by virtue of the off State of the hard disk on-site indicator lamp. When the ARM microcontroller detects that the received hard disk read-write signal is at a low level, the ARM microcontroller responds to the received hard disk read-write signal to obtain an HDD (hard disk drive) -Active signal of equipment with an SAS or SATA interface, when the HDD-Active signal is at a high level, the high-level LED-Active signal is output through the GPIO, and when the LED lamp receives the high-level LED-Active signal, the hard disk read-write indicator lamp is controlled to be in a normally-on state, and people can know that the hard disk is in a read-write state by means of the normally-on state of the hard disk on-site indicator lamp; when the HDD_active signal is at a low level, the low-level LED_active signal is output through the GPIO, and when the LED lamp receives the low-level LED_active signal, the hard disk read-write indicator lamp is controlled to be in an off state, and people can know that the hard disk has no read-write activity by means of the off state of the hard disk read-write indicator lamp. In the implementation, the ARM microcontroller responds to the hard disk detection signal and the hard disk read-write signal, outputs the hard disk state indication signal through the GPIO after logic judgment, and drives the LED lamp to achieve the effect of indicating the hard disk state, so that the detection process is simplified.
In one embodiment, the method further comprises: when entering an automatic test mode, the GPIO outputs a hard disk state indicating signal combination to the hard disk state indicating device to be controlled, wherein the hard disk state signal combination is an analog signal combination and is used for controlling the hard disk state indicating device to feed back a test result.
The automatic test mode is to change the working mode of the system by a jumper wire and execute the automatic detection mode, and in the embodiment, when the backboard is detected by mass production of the hard disk, whether the materials and welding of the backboard are good or not is tested, and the hard disk is not required to be actually connected, so that the hard disk state signal set output by the GPIO is actually an analog signal set. And the hard disk state indicating device to be controlled is controlled to feed back the test result by combining the hard disk state indicating signals output by the GPIO to the hard disk state indicating device to be controlled. Therefore, the materials and welding of the backboard are not required to be measured manually, and the labor and time are saved.
In one embodiment, the combination of the hard disk State indication signals output through the GPIO includes an led_active signal, an led_error signal, an led_state signal, and an led_locate signal, and when entering the automatic test mode, outputting the combination of the hard disk State indication signals through the GPIO to the hard disk State indication device to be controlled includes: when entering an automatic test mode, outputting a first hard disk state indication signal combination to a hard disk state indication device to be controlled through a GPIO, wherein the first hard disk state indication signal combination comprises a high-level LED_active signal and a low-level LED_error signal; when entering an automatic test mode, outputting a second hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO, wherein the second hard disk state indication signal combination comprises a low-level LED_active signal and a high-level LED_error signal; when entering an automatic test mode, outputting a third hard disk State indication signal combination to a hard disk State indication device to be controlled through a GPIO, wherein the third hard disk State indication signal combination comprises a high-level LED_State signal and a low-level LED_Locate signal; when entering the automatic test mode, outputting a fourth hard disk State indication signal combination to the hard disk State indication device to be controlled through the GPIO, wherein the fourth hard disk State indication signal combination comprises a low-level LED_State signal and a high-level LED_Locate signal.
The ARM microcontroller enters the test mode through a jumper, the jumper is used for adjusting the on-off relation of different electric signals on the equipment, and the working state of the equipment is adjusted according to the on-off relation, in the embodiment, the jumper is connected in advance, and the ARM microcontroller can be informed to enter the automatic test mode through the jumper. The hard disk indicating device can be a double-color LED lamp, and the LED lamp can be 8-12 groups of double-color LEDs for directly feeding back the test result. Then, the blinking frequency of the individual LED lamps was controlled to 10Hz with a timer, i.e., the time for one blinking of the lamps was 0.1 seconds. When the ARM microcontroller enters a test mode, the LED can be directly driven by changing the high-low level state of the hard disk state indicating signal output by the GPIO, and the flash frequency of 10Hz is timed, and the hard disk state indicating signal is an analog signal. When the ARM microcontroller outputs a high-level LED_active signal and a high-level signal and a low-level LED_error signal through the GPIO, the LED lamp flashes as a red lamp; when the ARM microcontroller outputs a high-low level signal combination of a low level LED_active signal and a high level LED_error signal through the GPIO, the LED lamp flashes as a green light; when the ARM microcontroller outputs a high-level LED_State signal and a high-level combination of a low-level LED_Locate signal through the GPIO, the LED lamp flashes as a red lamp; when the ARM microcontroller outputs a high-low level combination of the low-level LED_State signal and the high-level LED_Locate signal through the GPIO, the LED lamp flashes as a green light; people can judge that the materials and welding of the hard disk backboard are unqualified by means of red light flickering of the LEDs, and judge that the materials and welding of the hard disk backboard are qualified by means of green light flickering of the LEDs. In the embodiment, an automatic test function is added, the analog hard disk state signal directly drives the LED lamp through the GPIO output signal, the test result of the hard disk backboard is directly fed back, and the test mode is simple, low in cost and more intelligent.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least some of the other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 5, there is provided a hard disk status indication device control device, including: a receiving module 510, a data acquisition module 520, a parsing module 530, and a control module 540, wherein:
the receiving module 510 is configured to receive an SGPIO signal, where the SGPIO signal includes an SClock signal, an SLoad signal, and an SDataout signal.
The data acquisition module 520 is configured to acquire the SDataOut signal when the SClock signal falls to trigger an interrupt and the SLoad signal is at a low level.
The parsing module 530 is configured to parse the SDataOut signal to obtain a hard disk status signal.
The control module 540 is configured to output a hard disk status indication signal to the hard disk status indication device to be controlled according to the hard disk status signal.
In one embodiment, the control module 540 is further configured to output a first hard disk state indication signal to the hard disk state indication device to be controlled according to the Locate signal, where the first hard disk state indication signal is used to control the hard disk state indication device to indicate that the corresponding hard disk is in the selected state; outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state; and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
In one embodiment, the control module 540 is further configured to receive a hard disk detection signal and a hard disk read/write signal; and responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to the hard disk state indication device to be controlled through the GPIO.
In one embodiment, the control module 540 is further configured to output, when the hard disk detection signal is detected to be at a low level, a first instruction signal to the to-be-controlled hard disk state indicating device through the GPIO, where the first instruction signal is used to control the to-be-controlled hard disk in-place indicating unit to indicate that the corresponding hard disk is in place; when the hard disk read-write signal is detected to be in a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
In one embodiment, the control device of the hard disk state indicating device further includes an automatic test module 550, configured to output a combination of hard disk state indicating signals to the hard disk state indicating device to be controlled through the GPIO when entering the automatic test mode, where the combination of hard disk state indicating signals is an analog combination of signals, and configured to control the hard disk state indicating device to feed back a test result.
In one embodiment, the automatic test module 550 is further configured to output, when entering the automatic test mode, a first hard disk state indication signal combination to the hard disk state indication device to be controlled through the GPIO, the first hard disk state indication signal combination including a high level led_active signal and a low level led_error signal; when entering an automatic test mode, outputting a second hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO, wherein the second hard disk state indication signal combination comprises a low-level LED_active signal and a high-level LED_error signal; when entering an automatic test mode, outputting a third hard disk State indication signal combination to a hard disk State indication device to be controlled through a GPIO, wherein the third hard disk State indication signal combination comprises a high-level LED_State signal and a low-level LED_Locate signal; when entering the automatic test mode, outputting a fourth hard disk State indication signal combination to the hard disk State indication device to be controlled through the GPIO, wherein the fourth hard disk State indication signal combination comprises a low-level LED_State signal and a high-level LED_Locate signal.
The specific limitation of the hard disk state indicating device control device may be referred to the limitation of the hard disk state indicating device control method hereinabove, and will not be described herein. The above-mentioned individual modules in the hard disk state indicating device control device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory in the electronic device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an electronic device is provided that includes a memory and a processor, which may be a single-chip microcomputer or a highly integrated chip, for controlling a hard disk status indication device. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media.
In one embodiment, an electronic device includes a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of: receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal; when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
In one embodiment, the processor when executing the computer program further performs the steps of: outputting a first hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Locate signal, wherein the first hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a selected state; outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state; and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving a hard disk detection signal and a hard disk read-write signal; and responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to the hard disk state indication device to be controlled through the GPIO.
In one embodiment, the processor when executing the computer program further performs the steps of: when the hard disk detection signal is detected to be at a low level, outputting a first indication signal to a to-be-controlled hard disk state indication device through the GPIO, wherein the first indication signal is used for controlling the to-be-controlled hard disk in-place indication unit to indicate that the corresponding hard disk is in place; when the hard disk read-write signal is detected to be in a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
In one embodiment, the processor when executing the computer program further performs the steps of: when entering an automatic test mode, the GPIO outputs a hard disk state indicating signal combination to the hard disk state indicating device to be controlled, wherein the hard disk state signal combination is an analog signal combination and is used for controlling the hard disk state indicating device to feed back a test result.
In one embodiment, the processor when executing the computer program further performs the steps of: when entering an automatic test mode, outputting a first hard disk state indication signal combination to a hard disk state indication device to be controlled through a GPIO, wherein the first hard disk state indication signal combination comprises a high-level LED_active signal and a low-level LED_error signal; when entering an automatic test mode, outputting a second hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO, wherein the second hard disk state indication signal combination comprises a low-level LED_active signal and a high-level LED_error signal; when entering an automatic test mode, outputting a third hard disk State indication signal combination to a hard disk State indication device to be controlled through a GPIO, wherein the third hard disk State indication signal combination comprises a high-level LED_State signal and a low-level LED_Locate signal; when entering the automatic test mode, outputting a fourth hard disk State indication signal combination to the hard disk State indication device to be controlled through the GPIO, wherein the fourth hard disk State indication signal combination comprises a low-level LED_State signal and a high-level LED_Locate signal.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal; when the SClock signal falling edge triggers an interrupt and the SLoad signal is at a low level, SDataOut signals are collected; analyzing the SDataOut signal to obtain a hard disk state signal; and outputting a hard disk state indicating signal to the hard disk state indicating device to be controlled according to the hard disk state signal.
In one embodiment, the computer program when executed by the processor further performs the steps of: outputting a first hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Locate signal, wherein the first hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a selected state; outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state; and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a hard disk detection signal and a hard disk read-write signal; and responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to the hard disk state indication device to be controlled through the GPIO.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the hard disk detection signal is detected to be at a low level, outputting a first indication signal to a to-be-controlled hard disk state indication device through the GPIO, wherein the first indication signal is used for controlling the to-be-controlled hard disk in-place indication unit to indicate that the corresponding hard disk is in place; when the hard disk read-write signal is detected to be in a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
In one embodiment, the computer program when executed by the processor further performs the steps of: when entering an automatic test mode, the GPIO outputs a hard disk state indicating signal combination to the hard disk state indicating device to be controlled, wherein the hard disk state signal combination is an analog signal combination and is used for controlling the hard disk state indicating device to feed back a test result.
In one embodiment, the computer program when executed by the processor further performs the steps of: when entering an automatic test mode, outputting a first hard disk state indication signal combination to a hard disk state indication device to be controlled through a GPIO, wherein the first hard disk state indication signal combination comprises a high-level LED_active signal and a low-level LED_error signal; when entering an automatic test mode, outputting a second hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO, wherein the second hard disk state indication signal combination comprises a low-level LED_active signal and a high-level LED_error signal; when entering an automatic test mode, outputting a third hard disk State indication signal combination to a hard disk State indication device to be controlled through a GPIO, wherein the third hard disk State indication signal combination comprises a high-level LED_State signal and a low-level LED_Locate signal; when entering the automatic test mode, outputting a fourth hard disk State indication signal combination to the hard disk State indication device to be controlled through the GPIO, wherein the fourth hard disk State indication signal combination comprises a low-level LED_State signal and a high-level LED_Locate signal.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. A method for controlling a hard disk status indication device, comprising:
receiving an SGPIO signal, wherein the SGPIO signal comprises an SClock signal, an SLoad signal and an SDataOut signal; when the SGPIO signal does not work, the SClock signal, the SLoad signal and the SDataOut signal are all in high level; the SClock signal is a clock signal, the SLoad signal is a last clock mark signal of the bit stream string, and the SDataOut signal is a serial data output bit stream signal;
When the SClock signal starts to work, an interrupt is generated when the SClock signal is changed from a high level to a low level, the SLoad signal is synchronously pulled down to the low level, the SDataOut signal is changed in level when the SDataOut signal is in a rising edge, and the SDataOut signal is sampled at the falling edge of the next SClock signal;
analyzing the SDataOut signal according to the falling edge interruption, reading bit information carried by the SDataOut signal, and obtaining a hard disk state signal, wherein the hard disk state signal comprises a location signal, an Activity signal and an Error signal in the first 4 drivers on the SDataOut signal;
outputting a hard disk state indicating signal to a hard disk state indicating device to be controlled according to the hard disk state signal, wherein the hard disk state indicating signal is used for controlling the hard disk state indicating device to be controlled to display that the hard disk state is in at least one of the following states: the hard disk is in a selected state, the hard disk is in a read-write state and the hard disk fails;
receiving a hard disk detection signal and a hard disk read-write signal; responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to a hard disk state indication device to be controlled through a GPIO; the hard disk state indication signals output by the GPIO at least comprise first indication signals, wherein the first indication signals are used for controlling the hard disk to be controlled to indicate that the corresponding hard disk is in place by the in-place indication unit;
When the ARM microcontroller enters a test mode in a jumper manner, and then changes the working mode of the ARM microcontroller in the jumper manner, and executes an automatic detection mode, the hard disk state indication signal combination is output to the hard disk state indication device to be controlled through the GPIO, the hard disk state indication signal combination is an analog signal combination and is used for controlling the hard disk state indication device to feed back a test result, and the hard disk state indication signal combination output through the GPIO at least comprises: a signal combination of a high-level led_active signal and a low-level led_error signal, a signal combination of a low-level led_active signal and a high-level led_error signal, a signal combination of a high-level led_state signal and a low-level led_locate signal, and a signal combination with a low-level led_state signal and a high-level led_locate signal; the jumper is used for adjusting the on-off relation of different electrical signals on the equipment and adjusting the working state of the equipment according to the on-off relation.
2. The method according to claim 1, wherein outputting a hard disk state indication signal to a hard disk state indication device to be controlled according to the hard disk state signal comprises:
Outputting a first hard disk state indicating signal to a hard disk state indicating device to be controlled according to the location signal, wherein the first hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a selected state;
outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state;
and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
3. The method according to claim 1, wherein outputting the hard disk state indication signal to the hard disk state indication device to be controlled via the GPIO in response to the hard disk detection signal and the hard disk read/write signal comprises:
when the hard disk detection signal is detected to be at a low level, outputting a first indication signal to a hard disk state indicating device to be controlled through the GPIO, wherein the first indication signal is used for controlling a hard disk in-place indicating unit to be controlled to indicate that a corresponding hard disk is in place;
When the hard disk read-write signal is detected to be at a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
4. The method for controlling a hard disk state indicating device according to claim 3, wherein the hard disk in-place indicating lamp is controlled to be in a normally-on state when the hard disk is in place;
and when the corresponding hard disk is in a read-write state, controlling the hard disk read-write indicating lamp to be in a normally-on state.
5. The method according to claim 1, wherein when the hard disk status indication signal is combined into the signal combination of the high level led_active signal and the low level led_error signal, the LED lamp blinks as a red lamp;
when the hard disk state indication signal is combined into the signal combination of the low-level LED_active signal and the high-level LED_error signal, the LED lamp flashes as a green light;
when the hard disk State indication signal is combined into the signal combination of the high-level LED_State signal and the low-level LED_location signal, the LED lamp flashes as a red lamp;
When the hard disk State indication signal is combined into the signal combination of the low-level LED_State signal and the high-level LED_location signal, the LED lamp flashes in a green light.
6. A hard disk state indicating device control device, characterized in that the device comprises:
the receiving module is used for receiving SGPIO signals, wherein the SGPIO signals comprise SClock signals, SLoad signals and SDataOut signals; when the SGPIO signal does not work, the SClock signal, the SLoad signal and the SDataOut signal are all in high level; the SClock signal is a clock signal, the SLoad signal is a last clock mark signal of the bit stream string, and the SDataOut signal is a serial data output bit stream signal;
the data acquisition module is used for generating an interrupt when the SClock signal starts to work and changes from a high level to a low level, and synchronously pulling down the SLoad signal to the low level, changing the level of the SDataOut signal when the SDataOut signal rises, and sampling the SDataOut signal at the falling edge of the next SClock signal when the SDataOut signal is at the high level;
the analysis module is used for analyzing the SDataOut signal according to the falling edge interruption, reading bit information carried by the SDataOut signal, and obtaining a hard disk state signal, wherein the hard disk state signal comprises a location signal, an Activity signal and an Error signal in the first 4 drivers on the SDataOut signal;
The control module is used for outputting a hard disk state indication signal to a hard disk state indication device to be controlled according to the hard disk state signal; receiving a hard disk detection signal and a hard disk read-write signal; responding to the hard disk detection signal and the hard disk read-write signal, and outputting a hard disk state indication signal to a hard disk state indication device to be controlled through a GPIO; the hard disk state indication signals output by the GPIO at least comprise first indication signals, wherein the first indication signals are used for controlling the hard disk to be controlled to indicate that the corresponding hard disk is in place by the in-place indication unit;
the automatic test module is used for entering a test mode through a jumper wire, changing the working mode of the ARM microcontroller through the jumper wire, outputting a hard disk state indication signal combination to a hard disk state indication device to be controlled through the GPIO when the automatic detection mode is executed, wherein the hard disk state indication signal combination is an analog signal combination and is used for controlling the hard disk state indication device to feed back a test result, and the hard disk state indication signal combination output through the GPIO at least comprises: a signal combination of a high-level led_active signal and a low-level led_error signal, a signal combination of a low-level led_active signal and a high-level led_error signal, a signal combination of a high-level led_state signal and a low-level led_locate signal, and a signal combination with a low-level led_state signal and a high-level led_locate signal; the jumper is used for adjusting the on-off relation of different electrical signals on the equipment and adjusting the working state of the equipment according to the on-off relation.
7. The device according to claim 6, wherein the control module is further configured to output a first hard disk state indication signal to the to-be-controlled hard disk state indication device according to the Locate signal, where the first hard disk state indication signal is configured to control the hard disk state indication device to indicate that the corresponding hard disk is in a selected state; outputting a second hard disk state indicating signal to a hard disk state indicating device to be controlled according to the Activity signal, wherein the second hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk is in a read-write state; and outputting a third hard disk state indicating signal to the hard disk state indicating device to be controlled according to the Error signal, wherein the third hard disk state indicating signal is used for controlling the hard disk state indicating device to indicate that the corresponding hard disk fails.
8. The control device of claim 6, wherein the control module is further configured to output a first indication signal to the to-be-controlled hard disk status indication device through the GPIO when the hard disk detection signal is detected to be at a low level, the first indication signal being configured to control the to-be-controlled hard disk in-place indication unit to indicate that the corresponding hard disk is in place; when the hard disk read-write signal is detected to be at a low level, outputting a second indicating signal to the hard disk state indicating device to be controlled through the GPIO, wherein the second indicating signal is used for controlling the hard disk state indicating device to be controlled to indicate that the corresponding hard disk is in a read-write state.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811581125.2A CN110895502B (en) | 2018-12-24 | 2018-12-24 | Control method and device for hard disk state indicating device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811581125.2A CN110895502B (en) | 2018-12-24 | 2018-12-24 | Control method and device for hard disk state indicating device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110895502A CN110895502A (en) | 2020-03-20 |
CN110895502B true CN110895502B (en) | 2024-02-20 |
Family
ID=69785549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811581125.2A Active CN110895502B (en) | 2018-12-24 | 2018-12-24 | Control method and device for hard disk state indicating device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110895502B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113868085A (en) * | 2021-09-27 | 2021-12-31 | 中国长城科技集团股份有限公司 | Hard disk monitoring method, device and system |
CN113900708B (en) * | 2021-09-30 | 2024-02-23 | 苏州浪潮智能科技有限公司 | Signal management device and method for server and server |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101359309A (en) * | 2007-08-03 | 2009-02-04 | 中兴通讯股份有限公司 | Status indication apparatus for hard disc of serial connection small computer system interface and method |
CN102831086A (en) * | 2012-07-25 | 2012-12-19 | 浪潮(北京)电子信息产业有限公司 | Method and device for managing hard disk system |
CN102841838A (en) * | 2011-06-21 | 2012-12-26 | 英业达股份有限公司 | Device, system and method for automatically detecting inter-integrated circuit (I2C) and SGPIO (serious general-purpose input/output) |
CN104516802A (en) * | 2015-01-08 | 2015-04-15 | 浪潮(北京)电子信息产业有限公司 | Method and system for indicating statuses of different types of hard disks |
CN104572358A (en) * | 2015-01-29 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Method for realizing online simulation of hard disk dropping |
CN106649048A (en) * | 2015-11-03 | 2017-05-10 | 广达电脑股份有限公司 | Indicator light control system and light-emitting diode control method |
CN106776196A (en) * | 2017-02-27 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of server hard disc method for monitoring state and system |
CN107229553A (en) * | 2017-06-23 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of hard disk based on programmable module in place with Operations Control System and method |
-
2018
- 2018-12-24 CN CN201811581125.2A patent/CN110895502B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101359309A (en) * | 2007-08-03 | 2009-02-04 | 中兴通讯股份有限公司 | Status indication apparatus for hard disc of serial connection small computer system interface and method |
CN102841838A (en) * | 2011-06-21 | 2012-12-26 | 英业达股份有限公司 | Device, system and method for automatically detecting inter-integrated circuit (I2C) and SGPIO (serious general-purpose input/output) |
CN102831086A (en) * | 2012-07-25 | 2012-12-19 | 浪潮(北京)电子信息产业有限公司 | Method and device for managing hard disk system |
CN104516802A (en) * | 2015-01-08 | 2015-04-15 | 浪潮(北京)电子信息产业有限公司 | Method and system for indicating statuses of different types of hard disks |
CN104572358A (en) * | 2015-01-29 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Method for realizing online simulation of hard disk dropping |
CN106649048A (en) * | 2015-11-03 | 2017-05-10 | 广达电脑股份有限公司 | Indicator light control system and light-emitting diode control method |
CN106776196A (en) * | 2017-02-27 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of server hard disc method for monitoring state and system |
CN107229553A (en) * | 2017-06-23 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of hard disk based on programmable module in place with Operations Control System and method |
Also Published As
Publication number | Publication date |
---|---|
CN110895502A (en) | 2020-03-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103578568B (en) | The performance test methods of solid state hard disc and device | |
US8443238B2 (en) | System and method for testing hard disk ports | |
CN106776196A (en) | A kind of server hard disc method for monitoring state and system | |
CN110895502B (en) | Control method and device for hard disk state indicating device, electronic equipment and storage medium | |
CN111508551B (en) | Multifunctional automatic test system and method for solid state disk | |
CN105223889A (en) | Method for automatically monitoring PMC RAID card log suitable for production line | |
CN105517676A (en) | Whole-machine testing method and device of smart bracelets, and mobile terminal | |
CN101770404B (en) | Watchdog circuit capable of keeping status and method for keeping restart status thereof | |
CN112530513B (en) | High-precision flash erasing and writing time acquisition device based on FPGA | |
CN114116527A (en) | NVMe SSD storage method and system based on programmable fusion chip | |
CN110162446A (en) | A kind of backboard hard disk ignition method based on BMC | |
CN111400121A (en) | Server hard disk slot positioning and maintaining method | |
US20140164678A1 (en) | Intelligent detection device of solid state hard disk combining a plurality of nand flash memory cards and detecting method for the same | |
CN104572386A (en) | Method for automatically testing HBA card bandwidth under Linux | |
CN110619914A (en) | Mass production method for solid state disk with PCIe interface mass production device | |
CN101615156A (en) | But the system of displaying erasing and writing life of removable storage device in real time | |
CN110764960B (en) | Solid state disk firmware testing method | |
CN202075860U (en) | Automated testing system of remote control terminal | |
CN113204456A (en) | Test method, tool, device and equipment for VPP interface of server | |
CN102222517B (en) | Cluster harddisk automation test method and system | |
CN107765993A (en) | Hard disk interface device | |
CN102543215A (en) | Nand FLASH intelligent detection method based on ARM controller | |
CN108549042B (en) | NVME LED detection system and detection method | |
CN105740116A (en) | Hard disk backboard and detection method of serial general input/output signal of hard disk backboard | |
CN201278146Y (en) | ATA interface signal capturing apparatus implemented based on FPGA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230731 Address after: 522, 5th Floor, Block A, Haina Baichuan Headquarters Building, No.6 Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen City, Guangdong Province, 518101 Applicant after: Shenzhen yiyike data equipment Technology Co.,Ltd. Address before: 518107 5th floor, No.1, Yanxiang Zhigu chuangxiangdi, No.11, Gaoxin Road, Guangming New District, Shenzhen City, Guangdong Province Applicant before: EVOC INTELLIGENT TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |