1. Field of the Invention
The present invention relates to an optical data link that provides an optical transmitting section and an optical receiving section.
2. Related Prior Art
Japanese Patent Application published as JP-2006-099410A has disclosed an optical data link that provides an IC for controlling a physical layer to communicate with the outside of the data link, which is often denoted as PHY, an electrical erasable programmable memory (EEPROM) that holds data and coupled with the PHY via the internal serial communication bus, and the transmitting and receiving section. In such a data link, initializing the optical transceiver triggered by the RESET provided outside of the data link, the internal serial bus becomes active and the data to be treated in the initializing process are read out from the memory. When the external apparatus coupled through the external serial communication line requests the internal bus by the software RESET during the initializing process of the data link, a bus collision may occur and accordingly the data link becomes instable.
The conventional data link disclosed in the Japanese Patent above, when the data link receives the external software RESET, is forced to output the serial clock for the internal serial bus from the PHY to prevent the internal bus from being inoperable.
However, an extreme case may occur in which further hardware RESET is asserted during the initializing process by the software RESET. The internal serial bus may be unstable for such double resetting procedure, and the conventional data link has provided no means to respond such double requests.
One of aspects of the present invention relates to a configuration of an optical data link. The data link includes a controller, an IC, a memory and an I2C bus system. The controller controls the operation of the data link and has a function to receive the reset from the outside of the data link. The IC controls the physical layer to communicate with the outside of the data link. The memory holds data to initialize the IC. The I2C system couples the controller, the IC and the memory.
The controller according to the present invention has a feature that, when the controller receives the reset signal from the outside of the data link, the controller temporarily behaves as a master device of the I2C bus system, while, the IC behaves as the slave device of the I2C bus. The controller further operates to output a series of clocks on the clock line of the I2C bus to sweep data left on the data line of the I2C bus system. The count of clocks output from the controller is at least one count more than the counts contained in a packet data normally transmitted on the data line of the I2C bus system.
The present data link may operate in stable even the duplicate reset status occurs, that is, even an additional reset signal is received during the procedure in the reset status, because the left data on the data line of the I2C bus system are swept by temporarily clocks output from the controller.
Another aspect of the present invention relates to a method to control a duplicate reset status of the optical data link. The method includes; (a) changing the controller to a master device and the IC to a slave device of the I2C bus system when the controller receives an additional reset signal during the reset procedure, (b) the controller outputting a series of dummy clocks on the data line of the I2C bus to sweep the left data on the I2C bus; and (c) changing the controller to the slave device and the IC to the master device of the I2C bus system. The count of the dummy clock output from the controller during the step (b) may be at least one count more than the counts contained in the packet data normally transmitted on the data line of the I2C bus system.
Because the data left on the data line at the acceptance of the duplicate reset signal may be swept by the dummy clock output from the controller; no data is left on the data line after the step (b) above. Thus, the data link may securely recover from the reset procedure.
Next, preferred embodiments of the present invention will be described as referring to accompanying drawings.
The data link 1 shown in
The CPU 13, receiving the monitor signals from the transmitter section 3 and the receiver section 5, controls sections, 3 and 5, by sending control signals. Moreover, the CPU 13 may communicate with the host system through the PHY 7 by sending the status of the data link 1 thereto and by receiving instructions therefrom.
Next, the hardware RESET of the data link 1 will be described. Receiving the hardware RESET signal S4 from the host system, only the CPU 13 may receives this RESET signal S4. Then, the CPU 13 generates the PHY RESET signal S5 and sends this signal S5 to the PHY 7.
As illustrated in
The count of clocks of the dummy clock may be at least one bit more than bit counts for the data packet put on the I2C bus 15. The added one bit corresponds to a command to inform the completion of the sending clock. For instance, when one data packet constitutes of 8 bits, the count of the dummy clock may be more than 9 clocks. According to this procedure, even the I2C bus is interrupted during the memory sends the data A5, the memory may securely complete the sending of the rest data by the dummy clock provided from the CPU 13 and the I2C bus 15 may be safely opened.
Next, the CPU 13 completes the transmission on the I2C bus 15 by outputting the stop condition A7, moves its mode to the slave device on the I2C bus system 15, negates the PHY RESET S5 at A8 to release the RESET status of the PHY 7. At that time, the PHY 7 moves the master device in the I2C bus 15. The CPU 13 starts the monitoring of the transmitter section 3 and the receiver section 5 to prepare the calling from the PHY 7 to red those monitored information.
On the other hand, the PHY 7 that moves to the master device by resetting its RESET status, begins the initializing procedure, in which the PHY 7 sends the start condition A9 to read data A10 necessary to set the operation mode of the PHY 7 from the memory 9 via the I2C bus 15. In this instant, the data line of the I2C bus 15 is set in the high level because the CPU 15 releases the data line as described above, the PHY 7 securely generates the start condition A9 and the communication on the I2C bus may be securely started at A10. After the hardware RESET, the PHY 7 behaves as the master device, while, the CPU 13 and the memory 9 operate as the slave device on the I2C bus 15, which is a normal operation on the I2C bus 15.
The data link 1, in addition to the hardware RESET mentioned above, occasionally carries out the software RESET by receiving the software RESET command from the host system. Although the initializing process of the PHY 7 after the software RESET, the procedure above may be performed because, even such software RESET of the PHY 7, the I2C bus 15 puts the data from the memory 9.
Next, the operation of the data link according to the present invention will be compared to a conventional data link 101 shown in
The comparable data link 101 has a distinguishable configuration from those of the present data link shown in
The data link 1 according to the invention or the conventional data link 101 occasionally receives the hardware RESET during the initialization procedure of the PHY 7, which is triggered by the software RESET. In another case, the data link may receive further hardware RESET during the initialization of the PHY 7 trigged by the hardware RESET. In those cases, the conventional data link 101 may bring problems described below.
As shown in
On the other hand, referring
Accordingly, even the I2C bus is stopped as the memory 9 puts the data A5 on the data line of the I2C bus 15, the memory 9 may complete the sending of the rest data A6 on the I2C line 15 by the dummy clock, and the I2C bus may be securely opened. Thus, because the initialization of the PHY 7 may be started as the I2C bus line is regularly opened, the preset A9 of the PHY 7 may be firmly generated, the reading A10 from the memory may be securely started, and the data link 1 may be protected from the hanging-up. Thus, the data link 1 may prevent the I2C bus system 15 from being inoperable even when the data link 1 receives the further hardware RESET S4 during the initialization of the PHY 7 trigged by the software RESET or the hardware RESET.
The foregoing is illustrative of the present invention, and is not to be construed as limiting thereof. The invention is defined by the following claims, with equivalents of the claims to be included therein.
Number | Date | Country | Kind |
---|---|---|---|
2006-294681 | Oct 2006 | JP | national |