How to represent an interrupt in a UML sequence diagram

embeddedinterruptloopssequence-diagramuml

I want to design a simple embedded system. The special thing about this is that I want to design its architecture using UML. Among other diagrams I'm using, I have a Sequence Diagram as the one shown in the below image.

enter image description here

What I'm trying to depict here is that the sequence enclosed in the "LOOP" fragment is being executing again and again while there is no event.

The Interrupt Service Routine (ISR) block at the far right of the diagram is a block that executes asynchronously and generates the waited event.

The problem here is that, as the event may be generated at any time during the loop sequence, just once every while, for example, every 10ms, and sent to the "Module 2", I don't know how to represent this.

If I just put a message arrowhead pointing from the "ISR" block to "Module 2" I understand that this means that the message containing the event is going to be sent from "ISR" to "Module 2" as part of the loop, every time the loop executes, but that is not what I need. I need to depict the fact that the message from "ISR" to "Module 2" is only sent every X milliseconds, or randomly in time (in case of a hardware interrupt).

Any suggestions?

Best Answer

Sequence diagram is dedicated to describe a particular execution. To describe all possible execution, you should use a state machine diagram.