Google News
logo
Embedded C - Interview Questions
How can you measure the interrupt latency in Embedded C?
In Embedded C, we can measure the interrupt latency with the help of the oscilloscope. Follow the steps given below:
 
* Take two GPIOs first. Configure one GPIO to generate the interrupt and the second for the toggling (you can attach an LED also).
* Use the oscilloscope or analyzer to monitor the PIN, which is already configured to generate the interrupt.
* Now, monitor the second pin, which is toggled at the beginning of the interrupt service routine by using the oscilloscope or analyzer.
* When you generate the interrupt, the signal of both GPIOs will change.
* Now, you can easily read the instrument's interval between the two signals (interrupt latency).
Advertisement