Machine-translated by Google. Questions are authored in English.
Top

Discussion

An engineer reports an interrupt latency of 2 ns on a 16 MHz microcontroller. The proper response is that

  • A.the figure should be doubled to allow for the return as well
  • B.the figure depends on the compiler optimisation level chosen
  • C.the figure is impossible, one cycle alone being 62.5 ns
  • D.the figure is plausible for a core with hardware context saving

Answer: C

Correct answer: the figure is impossible, one cycle alone being 62.5 ns

At 16 MHz a single clock cycle is \[ \frac{1}{16\times10^{6}} = 62.5\ \mathrm{ns}, \] and taking an interrupt costs at least a handful of cycles for recognition, vector fetch and context save. A latency of 2 ns is a small fraction of one cycle and therefore impossible on this part - the figure has probably been quoted in cycles and mislabelled as nanoseconds.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.