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

Discussion

A newly written driver reads plausible values but the last byte of every transfer is wrong. The likely cause is

  • A.the buffer having been declared without the volatile qualifier
  • B.the completion being signalled before the transfer finished
  • C.the register block having been mapped at the wrong address
  • D.the interrupt having been registered with the wrong number

Answer: B

Reading the buffer on the wrong edge of the completion flag, or before a DMA controller's final write has drained, leaves the last element stale. A barrier or the correct completion condition is the fix, and a wholly wrong address or interrupt would fail far more visibly.

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

Post your comment

Please log in or register to post a comment.