我正在使用 STM32F446ZE Nucleo 板。我希望在板上连接不同的传感器以及 5 个编码器。然而,使用带中断的编码器会出现问题,因为它会影响其他部件的操作和传感器读数。该应用程序是高度基于时间的。编码器将被读取,但它们不是优先事项。我希望与编码器模式一起实现输入捕获模式,并且想知道什么是输入捕获间接模式,该模式在数据表和应用笔记中没有指定。
最佳答案
输入捕获模式 [1]是一种处理嵌入式系统中的输入信号的方法,它允许您读取引脚上的数字信号并测量高电平和低电平转换之间的时间。这对于“事件”发生时间很重要的应用程序非常有用。 在您的特定 STM32 板中,您可以将计时器配置为在输入捕获模式下运行 (from man pages):
The timer can be used in input capture mode to measure an external signal. Depending on timer clock, prescaler and timer resolution, the maximum measured period is deduced. The input capture module is used to capture the value of the counter after a transition is detected by the corresponding input channel. To get the external signal period, two consecutive captures are needed. The period is calculated by subtracting these two values
我不确定 STM 对于间接模式意味着什么,并且无法在您的主板定时器手册中立即找到任何说明。我相信你最好在STM forum中询问。 .
关于arm - STM32 输入捕捉间接模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53778656/