cancel
Showing results for 
Search instead for 
Did you mean: 

interrupt routine service latency in stm32f407

armindavatgaran
Associate III
Posted on May 29, 2015 at 14:49

Hello

What is the delay between interrupt occurance(e.g. external interrupt on a pin) and interrupt service routine entry?by some initial measurements, it's about 30 cpu clocks.

Is it interrupt type(external pin, specific peripheral) dependent?

Thanks.

   
3 REPLIES 3
Posted on May 29, 2015 at 15:22

Depends on filtering in the peripheral, bus clocks.

The processor has to stack it's internal state, takes 12 cycles on entry, 12 on exit, as I recall.

If the processor is in a higher priority interrupt.

How many cycles it takes you to load registers, write a GPIO, and for it to propagate through the write buffers and buses.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Danish1
Lead II
Posted on May 29, 2015 at 15:29

Also, when the interrupt vectors and interrupt-service-routine are in FLASH, and the processor clock is sufficiently fast (say over 30 MHz) to require wait-states for random FLASH accesses, then you have a couple of sets of wait-states to add.

Posted on May 29, 2015 at 15:47

Also, if FPU is enabled and lazy stacking is disabled, the FPU context is saved together with the ''main'' registers on entry.

Also, what you percept as execution of first instruction of your C code might be delayed by function prologue added by the compiler.

JW