嵌入式系统中断

Embedded system interrupts

我一直在阅读嵌入式系统中的中断,并且遇到了这个。

In Normal Mode, the timer triggers interrupt handlers. These can do practically any function you want, but they run on the CPU, which prevents anything else from running at the same time. In CTC mode, you can also trigger interrupts, but it is also possible to not use interrupts and still toggle an output pin. Using it this way, the functionality occurs parallel to the CPU and doesn't interrupt anything. So I have the following doubts:

构成微控制器内定时器外设的硬件电路能够执行比较并在 CTC 模式下切换输出。这个逻辑是在硬件中执行的,而不依赖于 CPU 来执行软件指令。因此,CTC 模式比较和切换与 CPU 恰好正在执行的任何内容并行发生。

我不明白你所说的计时器“计数更多”是什么意思。更频繁或更快的速度?更多的总计数?无论如何,我认为答案是否定的。定时器以驱动它的输入时钟的速率计数。在 CTC 模式下,定时器计数到您为它配置的比较值。