1. Technical Field
The present disclosure relates to electronic devices and, more particularly, to an electronic device with a general purpose input output expander and a signal detection method.
2. Description of Related Art
An electronic device, such as a server, includes a baseboard management controller (BMC), a number of central processing units (CPU), and a number of memory units. All the CPUs and the memory units should be connected to general purpose input output (GPIO) interfaces of the BMC in order to allow the BMC to be capable of recording events happening on each CPU or memory unit when receiving a high-speed signal from the CPU or memory unit, wherein the high-speed signal includes information indicating what happened to the CPU or memory unit. For example, the BMC records an event that a CPU has overheated when receiving a thermal trip signal from the CPU which indicates the temperature of the CPU is high. However, the number of the GPIO interfaces of the BMC is limited for allowing more CPUs and memory units to be connected to the GPIO interfaces of the BMC.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclose. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The disclosure is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
The BMC 10 includes a processing unit 101 and a storage unit 102. The processing unit 101 includes a detection module 1011, a scanning module 1012, and an event recording module 1013. The detection module 1011 is controlled by the processing unit 101 to periodically detect whether there is a signal input in the public interface Pa of the BMC 10. In this embodiment, signal input from a CPU 20 or a memory unit 30 to the interface Pa is in a logic high level, which includes information indicating what happened to the CPU 20 or the memory unit 30. Thus, if no signal input from the CPUs 20 and the memory units 30, the interface Pa is in a logic low level, and any signal input from the CPUs 20 or the memory units 30 will cause the interface Pa to be in a logic high level.
The scanning module 1012 scans the interfaces P1-Pn through the interface Pb and P(n+1) when there is a high level from the public interface Pa, to determine a GPIO interface with the logic high level, the element 50 (such as a CPU 20 or a memory unit 30) which is connected to the GPIO interface with the logic high level, and the signal from the element 50. The signal may be received by the BMC 10 through the interface Pa or the interface P(n+1) and Pb. The event recording module 1013 records an event including the interface, the element connected to the interface, and the signal, and stores the event in the storage unit 102.
From the above description, when one of the elements 50 needs to be shut down to avoid being damaged because of some occurrence such as a high temperature, an event including an element 50 which transmits a signal to the BMC 10, the interface of the GPIO expander 20 connected to the element 50, and the signal is stored in the storage unit 102. Thereby, the recorded event provides an easy method for a user to find out what caused the element 50 to shut down. In this embodiment, the element 50 is controlled to delay a certain time, such as 2 seconds to shut down to allow the event recording module 1013 to have enough time to record the corresponding event.
Because the CPUs 20 and the memory units 30 are respectively connected to different interfaces P1-Pn of the GPIO expander 40, interfaces of the BMC 10 are saved for other use.
In step S301, the detection module 1011 is controlled by the processing unit 101 to periodically detect whether there is a signal input from the public interface Pa of the BMC 10. If there is a signal input from the public interface Pa, the procedure goes to step S302, otherwise, the procedure repeats the step S301.
In step S302, the scanning module 1012 scans the interfaces P1-Pn, to determine an GPIO interface with the logic high level, the element 50 which is connected to the GPIO interface with the logic high level, and the signal from the element 50.
In step S303, the event recording module 1013 records an event including the interface, the element 50 connected to the interface, and the signal, and stores the event in the storage unit 102.
Although the present disclosure has been specifically described on the basis of the exemplary embodiment thereof, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiment without departing from the scope and spirit of the disclosure.
| Number | Date | Country | Kind |
|---|---|---|---|
| 201110409092.5 | Dec 2011 | CN | national |