Timer interrupt latency on the ATmega328

preview_player
Показать описание
How long does it take before an interrupt service routine is started on an ATmega328 after the actual trigger event?

The answer is: about 19-20 CPU clock cycles as you can see in the video.
Рекомендации по теме
Комментарии
Автор

But, this is written in C. Doesn't the compiler output a few PUSH instructions at entry intro an interrupt? It would be very interesting to know what the actual latency is, for a naked interrupt. Also, it might be worth noting where the jitter comes from. I'm fairly certain that depending on whether the CPU is executing a 1, 2 or 3 cycle instruction at the time the interrupt occurs, the interrupt may be delayed - leading to exactly what we see here :) Very nice video, I like your channel!

SenseiTG
Автор

Uwe, Thanks very much for the video like that or the previous one. When Arduino era came nobody really cares about that. Only the library os some kind and fast forward 😀 to not optimal success. I started to get to know about the problems you show using 8051 family and assembler of course.

tomaszrybicki