8
\$\begingroup\$

I have embedded application which uses interrupts and dma. The main loop only sends data to PC.

How to design flow diagram of program? How to show interrupts and dma working on flow diagram?

I've found several topics in google about embedded uml diagrams, and some questions there: Designing embedded software , but haven't found examples of such a diagrams.

\$\endgroup\$
5
  • \$\begingroup\$ Do you want software to make diagrams or the theory and techniques on how to make them? \$\endgroup\$
    – user17592
    Jun 5 '13 at 17:56
  • 1
    \$\begingroup\$ Theory, techniques and examples will be best. I'm using Visio or Visual Paradigm to design such diagrams, but if you have something to recommend it will be also good. \$\endgroup\$
    – krzych
    Jun 5 '13 at 17:58
  • \$\begingroup\$ Have a look at various UML diagrams. \$\endgroup\$ Jun 5 '13 at 17:59
  • \$\begingroup\$ @NickAlexeev unfortunately haven't found how to show interrupts and work done by dma in your reference. \$\endgroup\$
    – krzych
    Jun 5 '13 at 18:04
  • 2
    \$\begingroup\$ @krzych Sequence diagrams can be used showing the interplay between interrupts and the main loop. It's not as detailed as flow charts, but it can show the interrupts dimension. \$\endgroup\$ Jun 5 '13 at 18:13
4
\$\begingroup\$

Show the workflow diagrams independently, one for the main loop, one for the DMA and the other for the interrupts.

As the interrups are triggered by external events (like ADC ready, timer, external interrupts) it cannot be in the main loop.

Just at the begining of the workflow, put the tittle in a circle, for example: "Main", "EXT_INT", "DMA", etc.

Good luck!

\$\endgroup\$
0
\$\begingroup\$

Sorry, but you can't show several separate workflows on one connected flow diagram. There rarely exists a general place from where control of mainloop is interrupted by external event (interrupt) -> thus the connection point between main and interrupt handler flow can't be described on flow diagram.

Only way is to draw several diagrams that show workflows of sequences which may run "in parallel" (RTOS processes) or blocking each other (Interrupts). Those sequences will have their start position marked by RESET, EXT_DATA_READY_EVENT or any other meaningful name describing the start of execution flow for this chart. Each sequence will have it's own end or even have no end marker.

These flow diagrams may share same flags/variables to show interdependency.

Sequence diagram may also be handy for you, but I suppose - it is not what you wanted primarily.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.