??? 08/14/10 07:00 Read: times |
#178002 - latency calculation Responding to: ???'s previous message |
Erik Malund said:
no, it is 'random' because unless the unlikely event of all happening simultaneously (precisely or during a (I definitely hope) brief disabling of interrupts you NEVER can know if 'A' and 'B' becones pending while 'C' executes. Ah yes, one particular interrupt event's latency is surely random. But, what is calculated (and called latency then) is the *maximum latency* or *worst case latency* of a certain interrupt. You sometimes want to know how fast your system reacts to a stimulus (in the worst case), or if it is capable of distinguishing individual interrupts of a certain kind (e.g. if it is capable of counting edges of an external signal, or capable of picking all the incoming data to a serial rx without dropping characters in the worst case). For that, in the marginal case I described above (same set priority, polling priority A>B>C), A's worst case latency is max(B,C), whereas B's is A+C and C's is A+B (plus sum of higher set priorities ISRs, plus the interrupt disable in main, plus the fixed latency; all this provided that the periods of all involved interrupts are long enough so they don't repeat within the calculated latency - otherwise the calculation gets even more complicated). Of course, if you have an interrupt source with unpredictible period (which is a foolish thing to have in all except extreme and rare cases where it's justified), there is then no way to predict latency of interrupts of the same set priority. JW |
Topic | Author | Date |
the "interrupt priority list" | 01/01/70 00:00 | |
latency calculation | 01/01/70 00:00 | |
but | 01/01/70 00:00 | |
Do I understand this correctly... | 01/01/70 00:00 | |
priority (IP) and 'polling sequence" (the chip) | 01/01/70 00:00 | |
how to interpret "interrupts occuring at the same time | 01/01/70 00:00 | |
sequence can't be influenced | 01/01/70 00:00 | |
no, it is 'random' because .. | 01/01/70 00:00 | |
latency calculation![]() | 01/01/70 00:00 |