1. Technical Field
The present disclosure relates to electronic devices and, particularly to an electronic device with UART and an input control method for the UART.
2. Description of Related Art
An electronic device, such as a server, includes a baseboard management controller (BMC), an universal asynchronous receiver/transmitter (UART), and a basic input output system (BIOS). The BMC initializes the registers of the UART. When the electronic device runs in an operation system, such as the DOS system, the registers of the UART may be used to store input from an external input device connected to the UART, such as a keyboard, through the RS232 interface of the UART. However, if the BMC is controlled to be restarted, the BMC may initialize the registers of the UART while the registers stores input from the external input device, thus may result in the registers of the UART being disordered and may further result in the electronic device being unstable.
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 UART 10 includes a number of registers 101, and is connected to at least one external input device 50, such as a keyboard or a mouse. The input received from the external input device 50 is stored in the number of registers 101.
The BMC 20 is connected to the UART 10 for initializing the registers 101. The BMC 20 is further connected to the south bridge 40 by a general purpose input output (GPIO) interface 201, for transmitting a restarting signal to the south bridge 40 when the BMC 20 is restarted. In this embodiment, when the BMC 20 is powered on, the BMC 20 provides a logic high level to the south bridge 40, and when the BMC 20 is restarted, the BMC 20 provides a logic low level to the south bridge 40, wherein the logic low level is taken as a restarting signal.
The BIOS 30 is connected to the UART 10 for storing the input from the external input device 50 to the registers 101, and further connected to the south bridge 40 for detecting whether the BMC 20 generates a restarting signal. When the BMC 20 does not generate the restarting signal, the BIOS 30 enables the registers 101 to store the input from the external input device 50, and when the BMC 20 generates the restarting signal, the BIOS 30 disables the registers 101 not to store the input from the external input device 50. In this embodiment, when detecting the logic low level provided by the BMC 20 to the south bridge 40, the BIOS 30 disables the registers 101, and when detecting the logic high level, the BIOS 30 enables the registers 101.
In step S201, the BMC 20 is controlled to transmit the restarting signal to the south bridge 40 when the BMC 20 is restarted.
In step S202, the BIOS 30 detects whether the BMC 20 generates the restarting signal. If the BMC 20 generates the restarting signal, the procedure goes to S203, otherwise, the procedure goes to step S204.
In step S203, the BIOS 30 disables the registers 101 not to store the input from the external input device 50.
In step S204, the BIOS 30 enables the registers 101 to store the input from the external input device 50.
In this embodiment, in step S201, when the BMC 20 is powered on, the BMC 20 provides the logic high level to the south bridge 40, and when the BMC 20 is restarted, the BMC 20 provides the logic low level to the south bridge 40. In step S202, when detecting the logic low level provided by the BMC 20 to the south bridge 40, the procedure goes to step S203, otherwise, the procedure goes to step S204.
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 |
|---|---|---|---|
| 201110412423.0 | Dec 2011 | CN | national |