Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume a student configures his timer and ADC to sample at 4KHz. When a sample a

ID: 657328 • Letter: A

Question

Assume a student configures his timer and ADC to sample at 4KHz.

When a sample arrives, an interrupt handler will be invoked to process the sample.

When 1024 samples are collected, an FFT procedure is invoked to process them.

Assume the processor takes 200 cycles to switch from the a procedure to ISR, the ADC ISR takes 500 cycles to process each sample, and FFT takes 50,000 cycles to process 1024 sample points at once.

The processor speed is 40MHz and executes one instruction per cycle.

(a) How many application instructions can be executed between two consecutive interrupts?

(b) If timer interrupts is allowed to interrupt FFT, in one single FFT process, how many times will FFT be interrupted?

Explanation / Answer

a) If the interrupt handler executes 50,000 cycles to process each sample of the application then 800 instructions can be executed on a 40 MHz single-processor between two consecutive interrupts that executes 1 instruction per cycle.

b) Since the timer interrupts is allowed to interrupt FFT, in one single FFT process so the FFT will be interrupted 50,000 number of times.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote