Bus slave device and interrupt request judgment method thereof

By designing the setting module and the interrupt request module in the system management bus device, combining alarm detection and counter technology, the interrupt request processing of multiple slave devices is optimized, and the problem of inefficiency in the existing technology is solved, and the implementation of the implementation of More efficient judgment and processing of interrupt requests.

CN119316249APending Publication Date: 2025-01-14NUVOTON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311222291.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-13
Filing Date
2023-09-21
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In the system management bus device, when multiple slave devices simultaneously make interrupt requests, the prior art is difficult to effectively improve processing efficiency, resulting in a low system operation efficiency and the operation mode of interrupt requests cannot be adjusted according to the number of devices.

Method used

A bus slave device and interrupt request judgment method are designed, including setting module, alarm pin, alarm detection module, selection module, interrupt request module and control module, and setting interrupt request combination and number , select the interrupt mode (horizontal mode or pulse mode) to optimize the processing of interrupt requests, including detecting level changes through the alarm detection module and determining the pulse width by the counter to prioritize the interrupt request.

Benefits of technology

The processing efficiency of multiple slave devices when interrupting requests is improved, unnecessary signal transmission is reduced, operation convenience and diversity are enhanced, and the overall operation efficiency of the system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316249A_ABST
    Figure CN119316249A_ABST
Patent Text Reader

Abstract

The invention discloses a bus slave device and an interrupt request judgment method thereof. The bus slave device sets interrupt request combinations and interrupt request numbers to which a plurality of slave devices belong by a setting module. The master device receives an interruption request through the alarm pin, the slave devices send the interruption request through the alarm pin, and the alarm detection module detects whether the alarm pin is at a low level or not. The selection module selects an interrupt mode, the interrupt mode comprises a horizontal mode and a pulse wave mode, and the interrupt request module sends or terminates an interrupt request. The master device configures interrupt request combinations and interrupt request numbers corresponding to a plurality of slave devices through the control module to generate a master device receiving signal, and the master device receiving signal is transmitted to the master device through the data pin and the clock pin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a bus slave device and an interrupt request determination method thereof, and more particularly to a bus slave device and an interrupt request determination method thereof which make the interrupt request determination more efficient through a new slave device setting method. Background Art

[0002] In existing system management bus (SMBus) devices, when a connected slave device makes an interrupt request, the master device will send a request to obtain the alert response address (ARA) after receiving the alarm signal at the alarm pin, and use the obtained address to confirm which slave device issued the interrupt request. However, each alert response address can only obtain the address of a single slave device. When multiple slave devices are connected to the system management bus device, if multiple slave devices have interrupt request requirements, the operation of the system management bus device must go through multiple requests and responses to obtain all slave device information, which is difficult to improve processing efficiency, resulting in low system operation performance.

[0003] The slave devices connected to the system management bus device are not fixed. When different slave devices are connected, the existing system architecture cannot adjust the operation mode of the interrupt request according to the number of devices. The more slave devices are connected, the more difficult it is to improve the operation performance of the system. It is impossible to select the appropriate interrupt mode according to the number of devices, which is quite restrictive in actual operation.

[0004] In summary, the inventor of the present invention has considered and designed a bus slave device and an interrupt request determination method thereof, in order to improve the problems of the prior art and further enhance the implementation and utilization in the industry. Summary of the invention

[0005] In view of the problems described in the prior art, an object of the present invention is to provide a bus slave device and an interrupt request determination method thereof, so as to solve the problem that the device operation performance is difficult to improve when multiple slave devices make interrupt requests.

[0006] Based on the above purpose, the present invention provides a bus slave device, which includes a setting module, an alarm pin, an alarm detection module, a selection module, an interrupt request module, a control module, a data pin and a clock pin. The setting module sets the interrupt request combination and the interrupt request number in the interrupt request combination to which the bus slave device belongs. The alarm pin is connected to the master device and sends the interrupt request of the bus slave device. The alarm detection module is connected to the alarm pin, and the alarm detection module detects whether the alarm pin sends an interrupt request and pulls it down to a low level. The selection module is connected to the alarm pin, and the selection module selects an interrupt mode, and the interrupt mode includes a level mode and a pulse mode. The interrupt request module is connected to the selection module, and sends or terminates the interrupt request by the interrupt mode selected by the selection module. The control module is connected to the setting module and the interrupt request module, and the master device configures the interrupt request combination and the interrupt request number corresponding to the bus slave device through the control module to generate a master device receiving signal. The data pin and the clock pin are connected to the control module, and the master device receiving signal is transmitted to the master device.

[0007] Preferably, when the interrupt mode is the horizontal mode, the master device receives a signal including a combination address and a number, and multiple slave devices that make interrupt requests declare the corresponding interrupt request combination in the combination address and the corresponding interrupt request number in the number.

[0008] Preferably, when the interrupt mode is the pulse mode, the alarm detection module may further include a counter, which detects the pulse width of the alarm pin at a low level. The control module determines the detection combination for proposing an interrupt request based on the pulse width, and generates a main device receiving signal of the detection combination based on the pulse group mode. The main device receiving signal includes the detection combination and a number, and the interrupt request number in the detection combination is announced in the number.

[0009] Preferably, when multiple slave devices synchronously make interrupt requests, the detection combination corresponding to the maximum value of the detected pulse widths gives priority to generating an interrupt request, and multiple slave devices that have not been announced to receive signals from the master device re-propose interrupt requests.

[0010] Preferably, the setting module can set the pulse widths corresponding to the multiple slave devices, the control module determines the detection device that issues the interrupt request according to the pulse width, and generates a master device receiving signal for the detection device according to a pulse single mode.

[0011] Based on the above purpose, the present invention provides an interrupt request judgment method for a bus slave device, which is used to judge the interrupt requests of multiple slave devices in a system management bus device. The judgment method includes: setting the interrupt request combination and the interrupt request number in the interrupt request combination to which multiple slave devices belong; detecting whether the alarm pin sends an interrupt request and pulling it down to a low level through an alarm detection module; selecting an interrupt mode through a selection module, and the interrupt mode includes a level mode and a pulse mode; selecting an interrupt mode through a selection module, and the interrupt mode includes a level mode and a pulse mode; substituting the interrupt request combination and the interrupt request number corresponding to the multiple slave devices through a control module to generate a master device receiving signal; transmitting the master device receiving signal to the master device through a data pin and a pulse pin.

[0012] Preferably, when the interrupt mode is the horizontal mode, the master device receives a signal including a combination address and a number, and multiple slave devices that make interrupt requests through the alarm pin declare the corresponding interrupt request combination in the combination address and the corresponding interrupt request number in the number.

[0013] Preferably, when the interrupt mode is the pulse mode, the alarm detection module can detect the pulse width of the alarm pin at a low level through a counter. The setting module sets the pulse widths corresponding to multiple slave devices. When the setting is the pulse group mode, multiple slave devices generate the pulse width of the interrupt request through the alarm pin, and the master device determines the individual interrupt request of the multiple slave devices according to the pulse width.

[0014] Preferably, when multiple slave devices synchronously make interrupt requests, the slave device corresponding to the maximum value of the detected pulse width will first generate an interrupt request to the master device, and the multiple slave devices that have not been confirmed will re-make interrupt requests through the alarm pin.

[0015] Based on the above purpose, the present invention provides an interrupt request judgment method for a bus slave device, which is used to judge the interrupt requests of multiple slave devices in a system management bus device. The judgment method includes: setting the interrupt mode of multiple slave devices through a selection module, and the interrupt mode includes a horizontal mode, a pulse group mode or an individual pulse mode; setting the multiple slave devices, when the multiple slave devices are in the horizontal mode or the pulse group mode, setting the interrupt request combination and the interrupt request number of the multiple slave devices through the setting module, and when the multiple slave devices are in the pulse group mode or the individual pulse mode, setting the pulse width of the multiple slave devices through a counter; connecting the multiple slave devices to the alarm pin, the data pin and the clock pin of the master device, and each of the multiple slave devices detects the level of the alarm pin through the alarm detection module; the master device judges whether an interrupt request is sent according to whether the alarm pin is a low level, and judges whether the interrupt mode is the individual pulse mode according to the setting. If not, the master device generates a master device receiving signal, gives a corresponding interrupt combination address and waits for the multiple slave devices to respond. If yes, the master device judges which of the multiple slave devices has made the interrupt request according to the result of detecting the pulse width.

[0016] As described above, the bus slave device and the interrupt request determination method according to the present invention may have one or more of the following advantages:

[0017] (1) The bus slave device and interrupt request determination method thereof can correspond to the addresses of different slave devices by setting the interrupt request combination and the interrupt request number therein. When multiple slave devices make interrupt requests, multiple slave device address information can be transmitted in a master device receiving signal, thereby improving the device operation efficiency.

[0018] (2) The bus slave device and its interrupt request determination method can detect the pulse width of the alarm pin pulled down to a low level, and by corresponding the pulse width to the set interrupt request combination, allow the master device to receive the interrupt request information, thereby reducing unnecessary signal transmission and reducing the waste of processing efficiency.

[0019] (3) The bus slave device and its interrupt request determination method can select the interrupt mode through the selection module, and adjust it according to the status of the system management bus device connected to the slave device, thereby increasing the diversity and convenience of actual operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to make the technical features, contents and advantages of the present invention and the effects that can be achieved more obvious, the present invention is described with reference to the following drawings:

[0021] Figure 1 FIG. 4 is a schematic diagram of a bus slave device according to an embodiment of the present invention.

[0022] Figure 2 FIG. 4 is a waveform diagram of a horizontal mode according to an embodiment of the present invention.

[0023] Figure 3A and Figure 3B FIG. 4 is a waveform diagram of a pulse group mode according to an embodiment of the present invention.

[0024] Figure 4A and Figure 4B FIG. 4 is a waveform diagram of individual pulse wave modes according to an embodiment of the present invention.

[0025] Figure 5 The present invention is a flowchart of an interrupt request determination method for a system management bus device according to an embodiment of the present invention.

[0026] Description of Figure Numbers:

[0027] 11: Setting module

[0028] 12: Alarm pin

[0029] 13: Alarm detection module

[0030] 14: Select module

[0031] 15: Interrupt request module

[0032] 16: Control module

[0033] 17: Data pin

[0034] 18: Clock pin

[0035] 19: Select group or individual

[0036] 21, 23, 25: The first master receives the signal

[0037] 22, 24, 26: The second master receives the signal

[0038] 100: bus slave device

[0039] 111: Interrupt request combination

[0040] 112: interrupt request number

[0041] 141:Horizontal mode

[0042] 142: Pulse mode

[0043] 131: Counter

[0044] S1~S52: steps. DETAILED DESCRIPTION

[0045] In order to facilitate understanding of the technical features, contents and advantages of the present invention and the effects that can be achieved, the present invention is hereby described in detail as follows in conjunction with the accompanying drawings and in the form of embodiments. The drawings used therein are only for illustration and auxiliary description purposes and may not be the actual proportions and precise configurations after the implementation of the present invention. Therefore, the proportions and configuration relationships of the attached drawings should not be interpreted or limited to the scope of rights of the present invention in actual implementation. This should be stated in advance.

[0046] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of a bus slave device according to an embodiment of the present invention. Figure 1 As shown, the bus slave device 100 includes a setting module 11, an alarm pin 12, an alarm detection module 13, a selection module 14, an interrupt request module 15, a control module 16, a data pin 17 and a clock pin 18. The bus slave device 100 can process the interrupt request of the slave devices. These slave devices are coupled to the alarm pin 12. When the slave device issues an interrupt request, the level of the alarm pin 12 will be pulled down to a low level to notify the master device. The master device originally obtains the address of the slave device through the alert response address. Since there may be more than one slave device used or connected in the device, when multiple slave devices have interrupt request requirements, each alert response address can only obtain the address of a single slave device, and the master device cannot efficiently obtain the information of the slave device in operation. Therefore, the present disclosure uses a new device setting architecture to allow multiple bus slave devices 100 to process the interrupt requests of multiple slave devices.

[0047] First, the setting module 11 is used to set each slave device, so that each slave device has its own interrupt request combination 111, and the interrupt request number 112 of each slave device in the interrupt request combination 111 is set. The interrupt request combination 111 and the interrupt request number 112 correspond to the address of the slave device. Each byte contains eight bits, and eight interrupt request numbers 112 can be set in each interrupt request combination 111, and the numbers from 0 to 7 correspond to eight slave devices respectively. By setting the interrupt request combination 111 and the interrupt request number 112, when the slave device in the same interrupt request combination 111 issues an interrupt request, one to eight slave devices can be simultaneously proposed in the same master device receiving signal, so that the master device can more efficiently obtain the slave device corresponding to the interrupt request.

[0048] The bus slave device 100 sets the interrupt mode to be used through the selection module 14. The interrupt mode includes the horizontal mode 141 and the pulse mode 142. In actual circuit operation, the multiplexer can be used to control the switching between the horizontal mode 141 and the pulse mode 142. The interrupt request module 15 is connected to the selection module 14, and sends an interrupt request through the interrupt mode selected by the selection module 14. The alarm detection module 13 detects the state of the alarm pin 12, and then determines whether it is necessary to stop or pull down the level of the alarm pin 12 to a low level again and transmits the information to the control module 16. The control module 16 can respond to the interrupt request of the slave device by transmitting the master device receiving signal to the master device through the data pin 17 and the pulse pin 18 according to the content set by the setting module 11. The following embodiments will explain the corresponding setting architecture according to different processing modes.

[0049] See also Figure 2 , Figure 2 Schematic diagram of the waveform of the horizontal mode of the embodiment of the present invention. Figure 1 , Figure 2 The operation waveforms of the alarm pin 12, the data pin 17 and the clock pin 18 are shown in the horizontal mode 141. In this embodiment, the first slave device (Group0, IRQ1) is set as the slave device numbered 1 (IRQ1) in the first interrupt request combination (Group0), the second slave device (Group0, IRQ3) is set as the slave device numbered 3 (IRQ3) in the first interrupt request combination (Group0), and the third slave device (Group1, IRQ2) is set as the slave device numbered 2 (IRQ2) in the second interrupt request combination (Group1). The number of interrupt request combinations is determined according to the number of connected devices, and one combination contains 8 numbers, each corresponding to an individual slave device.

[0050] like Figure 2As shown, when the first slave device, the second slave device and the third slave device declare an interrupt request in sequence, the alarm pin 12 connected to the master device and the multiple slave devices will be pulled down to a low level. The alarm pin 12 is maintained at a low level after the first slave device sends an interrupt request. During this period, the interrupt request module 15 transmits the interrupt request to the control module 16, triggering the control module 16 to generate a master device receiving signal. The master device receiving signal will communicate with the master device through the data pin 17 and the clock pin 18 to confirm the slave device that has made the interrupt request. The master device transmission signal includes a start bit, an interrupt request combination address, a read bit and an end bit. The master device receiving signal includes a determination bit and an interrupt request number bit, and the master device provides a clock signal through the clock pin 18. The multiple slave devices sequentially output the above data bits through the data pin 17 under the clock signal. First, after the start bit, the master device will send out an interrupt request combination address, which is the multiple slave devices of each interrupt request combination set. In the horizontal mode 141, the control module 16 will announce the master device receiving signal according to the interrupt request combination and interrupt request number of each slave device, for example, the first master device receives signal 21, the second master device receives signal 22, and so on.

[0051] Then, after reading the bit, a bit is set to determine whether there is a slave device that has declared. If there is, the interrupt request number is continued to be the number of the slave device that originally declared the interrupt request. If it is maintained at a high level, it means that there is no corresponding slave device in this combination, and the signal transmission is directly stopped to avoid unnecessary time waste caused by the transmission of the pulse cycle without declared data. In the first master device receiving signal 21, since the first slave device and the second slave device that have made the interrupt request are both in the first interrupt request combination (Group0), numbered 1 (IRQ1) and numbered 3 (IRQ3), respectively, when the interrupt request number is numbered 1 and 3, the two slave devices are declared by a low-level signal waveform, and finally the master device receives the signal with an end bit. Since the alarm pin 12 is still at a low level, the second master device continues to receive the signal 22. After the master device receives the first master device receiving signal 21, it can simultaneously determine that the slave devices that have made the interrupt request are the first slave device and the second slave device. In this embodiment, each master device receives a signal and can transmit information back to eight slave devices. Compared with the original design in which each slave device can only respond to a single slave device address when sending an alarm response address, the above-mentioned design of the master device receiving the signal can indeed improve the processing efficiency of the device.

[0052] In the second master device receiving signal 22, the interrupt request sent by the third slave device of the second interrupt request group (Group1) number 2 (IRQ2) is announced, so that the master device can obtain the information of the third slave device. When completed, the alarm pin 12 returns to a high level, that is, all slave devices have no interrupt request. In this embodiment, two master device receiving signals are included, but the disclosure is not limited to this. The number of master device receiving signals will be adjusted according to the number of interrupt request groups.

[0053] Please refer again Figure 1 When the selection module 14 selects the pulse mode 142, the alarm detection module 13 not only detects whether the alarm pin 12 is at a low level, but also further includes a counter 131. The counter detects the pulse width of the alarm pin 12 at a low level, that is, the length of time at a low level, and assists in judgment through the pulse width. In the pulse mode 142, the alarm detection module 13 can be divided into two judgment modes, namely, the pulse group mode and the pulse individual mode, by selecting the group or individual 19 operation. The differences between the two will be described below.

[0054] See also Figure 3A and Figure 3B , which is a waveform diagram of the pulse wave group mode of an embodiment of the present invention, wherein, Figure 3A A schematic diagram of multiple slave devices sending interrupt requests asynchronously. Figure 3B Schematic diagram of synchronously issuing interrupt requests for multiple slave devices. Figure 3A In the example, the first slave device (Group0, IRQ1) is set as the slave device numbered 1 (IRQ1) in the first interrupt request combination (Group0), the second slave device (Group0, IRQ3) is set as the slave device numbered 3 (IRQ3) in the first interrupt request combination (Group0), and the third slave device (Group1, IRQ2) is set as the slave device numbered 3 (IRQ2) in the second interrupt request combination (Group1). The interrupt request module 15 sets the pulse width corresponding to the interrupt request combination through the counter 131, so that the slave devices belonging to different interrupt request combinations will pull down the alarm pin 12 for different set times when making an interrupt request. Different interrupt request combinations can be corresponding to different pulse widths detected, and the master device proposes a corresponding master device receiving signal based on the result of the detection combination.

[0055] like Figure 3AAs shown, the first slave device, the second slave device and the third slave device have interrupt requests in sequence, that is, the interrupt requests are made in an asynchronous situation. When the first slave device determines that the alarm pin 12 is at a high level through the alarm detection module 13, the alarm pin 12 is pulled down to a low level, and the required low-level pulse width is maintained through the counter 131. During this period, the second slave device belonging to the first interrupt request group (Group0) also has an interrupt request. The alarm detection module 13 of the second slave device detects that the alarm pin 12 is at a low level, so there is no need to pull the alarm pin 12 down to a low level, and the counter 131 of the second slave device counts this pulse width as the interrupt request group to which it belongs, so the second slave device can be regarded as having sent an interrupt request. In the first master device receiving signal 23, the first slave device declares number 1 (IRQ1) and the second slave device declares number 3 (IRQ3), and the data pin 17 and the clock pin 18 transmit the information required by the first master device receiving signal 23 to the master device.

[0056] During the period when the alarm pin 12 is pulled down to a low level, the alarm detection module 13 of the third slave device detects that the alarm pin 12 is at a low level, so there is no need to pull the alarm pin 12 down to a low level. Although the third slave device also wants to make an interrupt request, when the alarm pin 12 returns to a high level, the pulse width detected by the counter 131 of the third slave device is not the pulse width corresponding to the second interrupt request combination (Group1) to which the third slave device belongs. Therefore, the third slave device does not complete the interrupt request. After the alarm pin 12 returns to a high level, the third slave device re-makes an interrupt request and pulls down the level of the alarm pin 12. When the pulse width detected by the master device is the second pulse width, it is determined that the interrupt request is made corresponding to the second interrupt request combination (Group1). In the second master device receiving signal 24, the third slave device declares number 2 (IRQ2), and the data pin 17 and the clock pin 18 transmit the information required by the second master device receiving signal 24 to the master device. The mode of judging by pulse width allows the host device to directly judge which interrupt request combination it is, without wasting extra signal transmission time. In the case of more interrupt request combinations, the pulse group mode can save more processing time.

[0057] In another embodiment, if multiple slave devices simultaneously make interrupt requests, the interrupt request is completed with the maximum pulse width first. Figure 3BWhen the first slave device, the second slave device and the third slave device simultaneously make an interrupt request, the alarm pin 12 will be pulled down to a low level. Since there are two different interrupt request combinations (Group0 and Group1), the set pull-down time is different. When the second pulse width with a shorter time ends, the first pulse width with a longer time still maintains the alarm pin 12 at a low level until the time of the first pulse width is completed and then returns to a high level. Therefore, when the counter 131 detects the pulse width, it will first detect the time with the largest pulse width, such as the first pulse width in this embodiment. The master device then determines that the detection combination is the first interrupt request combination (Group0), and generates a first master device receiving signal 25. The interrupt combination numbers of the first slave device and the second slave device are transmitted to the master device in the first master device receiving signal 25.

[0058] Although the third slave device synchronously makes an interrupt request, the pulse width detected by its counter 131 is not the pulse width corresponding to the second interrupt request combination (Group1) to which the third slave device belongs. Therefore, the third slave device does not complete the interrupt request. After the first pulse width is transmitted, the third slave device re-makes an interrupt request, pulls down the level of the alarm pin 12 and maintains the second pulse width. The master device determines that it corresponds to the second interrupt request combination (Group1) and generates a second master device receiving signal 26. At this time, the interrupt combination number of the third slave device is announced in the second master device receiving signal 26, and the data pin 17 and the clock pin 18 transmit the information required by the second master device receiving signal 26 to the master device.

[0059] See also Figure 4A and Figure 4B , which is a waveform diagram of a pulse wave in a specific mode according to an embodiment of the present invention, Figure 4A A schematic diagram of multiple slave devices sending interrupt requests asynchronously. Figure 4B Schematic diagram of synchronously issuing interrupt requests for multiple slave devices. Figure 4A In the example, the first slave device (D0) and the eighth slave device (D7) are respectively set with the pulse width corresponding to the individual slave device counter 131, and the individual mode is selected in the selection group or individual 19. For example, the pulse width of the first slave device is the first pulse width (T0), and the pulse width of the eighth slave device is the eighth pulse width (T7). When an interrupt request is made, the alarm pin 12 will be pulled down for different set times. Different slave devices are directly corresponding to different pulse widths detected.

[0060] like Figure 4AAs shown, the first slave device and the eighth slave device sequentially make interrupt requests in an asynchronous manner. When the first slave device makes an interrupt request, the alarm pin 12 is pulled down to a low level, and the corresponding pulse width (T0) is sent through the counter 131. When the alarm pin 12 returns to a high level, the master device determines that the interrupt request corresponds to the first slave device. During this period, the eighth slave device also wants to make an interrupt request. Because the alarm pin 12 is at a low level, there is no need to pull down the alarm pin 12. However, when the alarm pin 12 returns to a high level, the pulse width detected by the alarm detection module 13 and the counter 131 of the eighth slave device is not the eighth pulse width (T7) corresponding to the eighth slave device. Therefore, the eighth slave device has not completed the interrupt request. Therefore, the eighth slave device re-makes an interrupt request, pulls down the level of the alarm pin 12, and sends the corresponding eighth pulse width (T7) through the counter 131. The master device determines that the interrupt request is made by the eighth slave device.

[0061] In another embodiment, if the slave devices synchronously make interrupt requests, the slave device corresponding to the maximum pulse width will be prioritized to complete the interrupt request. Figure 4B When the first slave device and the eighth slave device simultaneously make an interrupt request, the alarm pin 12 will be pulled down to a low level. Since the two slave devices have different pull-down times, when the eighth pulse width with a shorter time ends, the first pulse width with a longer time will still maintain the alarm pin 12 at a low level until the first pulse width (T0) is completed before returning to a high level. Therefore, when the counter 131 of all devices detects the pulse width, it will first detect the time with the largest pulse width, such as the first pulse width (T0) in this embodiment, and then determine that the interrupt request is from the first slave device. The master device can confirm that the interrupt request is from the first slave device.

[0062] Although the eighth slave device synchronously makes an interrupt request, the pulse width detected by its counter 131 is not the eighth pulse width (T7). Therefore, it cannot be determined that it is the eighth slave device, that is, the eighth slave device has not completed the interrupt request. After the first slave device confirms, the eighth slave device re-makes an interrupt request and lowers the level of the alarm pin 12. When the pulse width sent by the counter 131 is the eighth pulse width (T7), the master device determines that the eighth slave device is the one that makes the interrupt request.

[0063] See also Figure 5 , Figure 5 Flow chart of the interrupt request determination method of the system management bus device according to the embodiment of the present invention. Figure 5 As shown, the interrupt request determination method is used to determine the interrupt requests of multiple slave devices in a system management bus device. Please refer to the above embodiment for the system management bus device, and the interrupt request determination method includes the following steps (S1-S5).

[0064] Step S1: Set the interrupt mode of the slave device through the selection module. The interrupt mode can be selected as horizontal mode, pulse group mode or pulse individual mode. All slave devices of the system bus device must be configured with the same interrupt mode to avoid the master device from making a wrong judgment, and the master device must know what interrupt mode the system bus selects at this time.

[0065] Step S2: Setting the slave device. When the slave device is in horizontal mode or pulse group mode, step S21: Setting the interrupt request combination and number of the slave device through the setting module; when the slave device is in pulse group mode or pulse individual mode, step S22: Setting the pulse width of the slave device through the counter. At the same time, the master device must know the interrupt request combination and number of the individual slave device, and must also know the pulse width of the individual slave device. In one embodiment, the master device can be responsible for configuring the relevant settings of all multiple slave devices.

[0066] Step S3: Connect multiple slave devices to the alarm pin, data pin and clock pin of the master device, and each slave device detects the level of the alarm pin through the alarm detection module. If the alarm pin is high, the slave device with an interrupt request sends an interrupt request to the master device by pulling down the alarm pin.

[0067] Step S4: The master device determines whether any slave device sends an interrupt request based on whether the alarm pin is at a low level, and determines whether the interrupt mode is a pulse individual mode based on the setting. By determining whether the alarm pin is at a low level, it is determined whether there is an interrupt request, and then it is determined whether to generate a master device receiving signal based on the interrupt mode used in the above setting. If it is necessary to generate a master device receiving signal, the corresponding interrupt combination address is given through the above setting and waits for the slave device to respond.

[0068] When all slave devices are not operating in pulse individual mode, step S51: the master device generates a master device receiving signal, gives a corresponding interrupt combination address and waits for the slave device to respond. The interrupt request is determined by the low level of the alarm pin, and the master device receiving signal is generated through the data pin and the clock pin, and the slave device responds to obtain the corresponding individual slave device interrupt request combination number.

[0069] When using the horizontal mode, the master device receives a signal including a combination address and a number. After the start bit, the master device sends out an interrupt request combination address. Then, after reading the bit, a bit is set to determine whether there is a slave device that has declared. If so, the interrupt request number is continued to be the number of the slave device that originally declared the interrupt request. If not, the signal transmission is stopped directly to avoid unnecessary time waste caused by the transmission of pulse cycles without declared data. Multiple slave devices can declare the corresponding interrupt request number in the number in the corresponding interrupt request combination address, so that multiple slave devices can receive signals from the same master device and output them together. The master device receives a signal including a combination address and a number. Multiple slave devices will detect the corresponding interrupt request combination and declare it in the combination address, and declare the interrupt request number in the number.

[0070] When the pulse mode is used, the pulse width of the alarm pin at a low level is further detected by a counter, and the interrupt request of the slave device is determined by the pulse width. In the pulse group mode, the setting module sets the pulse width corresponding to the interrupt request combination, so that the slave devices belonging to different interrupt request combinations will pull down the alarm pin for different set times when making an interrupt request. According to the different pulse widths detected, different interrupt request combinations can be corresponded, and the corresponding master device receiving signal is proposed according to the pulse width. The master device receiving signal can include a combination address and a number, and each slave device in the same combination address can announce the number of the individual slave device. If slave devices with different interrupt request combinations simultaneously make interrupt requests, the slave device with a larger pulse width will obtain the interrupt request first, and the slave device with a smaller pulse width will re-propose the interrupt request.

[0071] When all slave devices are operating in the pulse individual mode, step S52: the master device determines which slave device has made an interrupt request based on the result of detecting the pulse width. When different slave devices make interrupt requests simultaneously, the slave device corresponding to the maximum detected pulse width will obtain the interrupt request first, and the slave device with a smaller pulse width will retransmit the interrupt request.

[0072] The above description is for illustrative purposes only and is not intended to be limiting. Any equivalent modifications or changes made thereto without departing from the spirit and scope of the present invention shall be included in the scope of the claims of this application.

Claims

1. A bus slave device, characterized in that: Include: A setting module is used to set the interrupt request group to which the bus slave device belongs and the interrupt request number in the interrupt request group; An alarm pin connected to the master device to send an interrupt request to the bus slave device; An alarm detection module is connected to the alarm pin, and the alarm detection module detects whether the alarm pin sends the interrupt request and is pulled down to a low level; A selection module connected to the alarm pin, wherein the selection module selects an interrupt mode, wherein the interrupt mode includes a horizontal mode and a pulse mode; An interrupt request module, connected to the selection module, for sending or terminating the interrupt request according to the interrupt mode selected by the selection module; A control module connected to the setting module and the interrupt request module, wherein the master device configures the interrupt request combination and the interrupt request number corresponding to the bus slave device through the control module to generate a master device receiving signal; as well as The data pin and the clock pin are connected to the control module to transmit the main device receiving signal to the main device.

2. The bus slave device according to claim 1, characterized in that: When the interrupt mode is the horizontal mode, the master device receives a signal including a combination address and a number, and the multiple slave devices that make the interrupt request declare the corresponding interrupt request combination in the combination address and declare the corresponding interrupt request number in the number.

3. The bus slave device according to claim 1, characterized in that: When the interrupt mode is the pulse mode, the alarm detection module further includes a counter, which detects the pulse width of the alarm pin at a low level. The control module determines the detection combination for proposing the interrupt request based on the pulse width, and generates the main device receiving signal of the detection combination based on the pulse group mode. The main device receiving signal includes the detection combination and a number, and the interrupt request number in the detection combination is announced in the number.

4. The bus slave device according to claim 3, characterized in that: When multiple slave devices synchronously make the interrupt request, the detection combination corresponding to the maximum value of the detected pulse widths gives priority to generating the interrupt request, and the multiple slave devices that have not been announced to receive signals from the master device re-make the interrupt request.

5. The bus slave device according to claim 1, characterized in that: The setting module sets the pulse widths corresponding to a plurality of slave devices, the control module determines the detection device that issues the interrupt request according to the pulse width, and generates the master device receiving signal of the detection device according to the pulse individual mode.

6. A method for determining an interrupt request of a bus slave device, characterized in that: For determining interrupt requests of multiple slave devices in a system management bus device, the determination method comprises: Setting an interrupt request group to which each of the plurality of slave devices belongs and an interrupt request number in the interrupt request group; Detecting whether the alarm pin sends the interrupt request and is pulled down to a low level by the alarm detection module; Selecting an interruption mode through a selection module, wherein the interruption mode includes a horizontal mode and a pulse mode; Sending the interrupt request according to the interrupt mode selected by the selection module through the interrupt request module; Substituting the interrupt request combination and the interrupt request number corresponding to the plurality of slave devices into the control module to generate a master device receiving signal; The master device receiving signal is transmitted to the master device through the data pin and the clock pin.

7. The interrupt request determination method of a bus slave device according to claim 6, wherein: When the interrupt mode is the horizontal mode, the master device receives a signal including a combination address and a number, and the multiple slave devices that make the interrupt request through the alarm pin declare the corresponding interrupt request combination in the combination address and declare the corresponding interrupt request number in the number.

8. The interrupt request determination method of a bus slave device according to claim 6, wherein: When the interrupt mode is the pulse mode, the alarm detection module detects the pulse width of the alarm pin at a low level through a counter; The setting module sets the pulse width corresponding to the multiple slave devices. When set to the pulse group mode, the multiple slave devices generate the pulse width of the interrupt request through the alarm pin, and the master device determines the individual interrupt request of the multiple slave devices based on the pulse width.

9. The interrupt request determination method of a bus slave device according to claim 8, wherein: When the multiple slave devices synchronously make the interrupt request, the slave device corresponding to the maximum value of the detected pulse widths preferentially generates the interrupt request to the master device, and the multiple slave devices that are not confirmed re-make the interrupt request through the alarm pin.

10. A method for determining an interrupt request of a bus slave device, characterized in that: For determining interrupt requests of multiple slave devices in a system management bus device, the determination method comprises: Setting the interruption modes of the plurality of slave devices by means of a selection module, wherein the interruption modes include a horizontal mode, a pulse group mode or a pulse individual mode; Setting the multiple slave devices, when the multiple slave devices are in the horizontal mode or the pulse group mode, setting the interrupt request combination and interrupt request number of the multiple slave devices through a setting module, and when the multiple slave devices are in the pulse group mode or the pulse individual mode, setting the pulse width of the multiple slave devices through a counter; Connecting the multiple slave devices to the alarm pin, the data pin and the clock pin of the master device, each of the multiple slave devices detects the level of the alarm pin through an alarm detection module; The master device determines whether an interrupt request is sent according to whether the alarm pin is at a low level, and determines whether the interrupt mode is the pulse individual mode according to the setting. If not, the master device generates a master device receiving signal, gives a corresponding interrupt combination address and waits for the multiple slave devices to respond. If so, the master device determines which of the multiple slave devices has issued the interrupt request according to the result of detecting the pulse width.