Skip to main content
armindavatgaran
Associate III
May 29, 2015 12:49 PM UTC
Question

interrupt routine service latency in stm32f407

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.

   
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    May 29, 2015 1:22 PM UTC
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Danish1
    Lead III
    May 29, 2015 1:29 PM UTC
    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.

    waclawek.jan
    Super User
    May 29, 2015 1:47 PM UTC
    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