2023-02-14 01:12 AM
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:I 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.
2023-02-14 02:44 AM
> I programmed timer 3 to have a period of 1μs
That's way too short, especially if you use Cube's "libraries".
JW
2023-02-14 03:14 AM
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
2023-02-14 04:23 AM
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
2023-02-14 04:24 AM
Okay, thank you.
2023-02-14 04:29 AM
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