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

Device Drivers Questions and Answers

51.

The number of bytes a 1 Mbit/s SPI link transfers in 1 ms is about

Answer: C

Correct answer: 125

\[ 1{,}000{,}000\ \mathrm{bits/s} \times 0.001\ \mathrm{s} = 1000\ \mathrm{bits} = 125\ \mathrm{bytes}. \] SPI has no framing overhead, so the division is simply by eight - unlike the UART calculation above, where the start and stop bits make it ten. Forgetting to convert bits to bytes gives the 1000 offered here.

Please log in or register to report this question.

Answer: D

A missing acknowledgement means the device is absent, held in reset or has the wrong address, and the driver's job is to say so and leave the bus usable. Retrying for ever hangs the caller and resetting loses everything else the system was doing.

Please log in or register to report this question.

Answer: A

A slave left mid-transfer can hold the line, and issuing clock pulses lets it finish the byte it believes it is sending, after which a stop condition frees the bus. A robust driver performs this recovery at initialisation.

Please log in or register to report this question.

Answer: B

Where a device genuinely cannot be shared, tracking an open count and returning a busy error to the second caller is the honest arrangement. Silently letting two callers share it produces faults that appear only when both are active.

Please log in or register to report this question.

Answer: C

Passing a pointer and a length lets the application place the buffer where it chooses and saves the driver copying into and out of its own. The cost is that ownership and lifetime become the caller's responsibility, which has to be documented.

Please log in or register to report this question.

Loading…
Tags: Device Drivers Questions and Answers || Device Drivers MCQ Questions and Answers || Device Drivers GK Questions and Answers || Device Drivers GK MCQ Questions || Device Drivers Multiple Choice Questions and Answers || Device Drivers GK || GK on Device Drivers || Embedded Systems Questions and Answers || Embedded Systems MCQ Questions and Answers || Embedded Systems GK Questions and Answers || GK on Embedded Systems