cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding interrupt latency in the Cortex M0

AKENZ.1
Associate II

Hello,

Currently, I use STM32F030K6. I programmed timer 3 to have a period of 1μs, but I noticed at the oscilloscope that my signal has a delay of 16μs, so I searched the datasheet and I found this:0693W00000YAfzLQAT.pngI wonder if it is at each interrupt?, and how to deal with this delay?. I don't really understand what it is.

Thank you in advance,

Best regards.

5 REPLIES 5

> I programmed timer 3 to have a period of 1μs

That's way too short, especially if you use Cube's "libraries".

JW

KnarfB
Principal III

recommended reading: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/beginner-guide-on-interrupt-latency-and-interrupt-latency-of-the-arm-cortex-m-processors

If you have a logic analyzer, even a cheap USB one (recommended), you may monitor interrupt handling best with issuing a 1-cycle SEV machine instruction which can be observed at any pin configured for EVENTOUT.

hth

KnarfB

Thank you for your response. I tried to change to 100µs and it's worse, I have more delays and my signal is not in line with what is expected

Okay, thank you.

Try to go down to 1 or 10 ms for just to be sure. Precise signal/waveform generation is usually done with timers.

hth

KnarfB