8

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.

krzych
  • 287
  • 1
  • 4
  • 15
  • Do you want software to make diagrams or the theory and techniques on how to make them? –  Jun 05 '13 at 17:56
  • 1
    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. – krzych Jun 05 '13 at 17:58
  • Have a look at various [UML diagrams](http://www.holub.com/goodies/uml). – Nick Alexeev Jun 05 '13 at 17:59
  • @NickAlexeev unfortunately haven't found how to show interrupts and work done by dma in your reference. – krzych Jun 05 '13 at 18:04
  • 2
    @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. – Nick Alexeev Jun 05 '13 at 18:13

2 Answers2

4

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!

Chirry
  • 206
  • 1
  • 6
0

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.

x4mer
  • 986
  • 1
  • 9
  • 13