cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt Latency Measurement

JTone.1
Associate

Hello,

I have three interrupts,

One from EXTI4, which has NVIC_IRQChannelPreemptionPriority = 0

One from EXTI9_5 which has NVIC_IRQChannelPreemptionPriority = 1

One from TIM4 which has NVIC_IRQChannelPreemptionPriority = 2

For testing purposes, EXTI4 and EXTI9_5 are connected to the same PWM signal.

EXTI4 and EXTI9_5 implement the exact same routine that takes 1,294 uS whereas TIM4 interrupt implements another routine which takes 2,57uS.

This data has been obtained with TrueStudio and an ITM Register.

I've been asked to measure the latency to execute de IRS associated to this interrupts from the moment the interrupt is generated and I don't have an oscilloscope.

I have tried to measure the latency from the ending of EXTI4 and the beginning of EXTI9_5 using the technique I described before which is 216,9 uS which doesn't seem right.

So my question is, how can I measure the latency to serve this three interruptions with TrueStudio?

Thank you.

2 REPLIES 2
TDK
Guru

> I've been asked to measure the latency to execute de IRS associated to this interrupts from the moment the interrupt is generated and I don't have an oscilloscope.

For the EXTI interrupts, assuming the edge of the signal that triggers the interrupt is at CNT=0, measure the timer's CNT value at the first step of the IRQ. Verify in the disassembly that nothing else is happening first. For the timer interrupt, same thing since update happens at CNT=0.

It should be in the region of tens of clock ticks. You don't mention clock rate (or chip), but seems like you should get well under 1us at high speeds.

If you feel a post has answered your question, please click "Accept as Solution".
JTone.1
Associate

Hello,

It's a STM32F429.

Could you please expand more on how to achieve this, using the Standard Peripheral Library?

Thanks