了解测量功能中的 TC 中断

问题描述

我试图了解这个特定伪代码中 LDRBS 中断的使用。 我们的任务是使用温度传感器测量温度。

这是伪代码步骤:

初始化

1) Don’t forget the PMC
2) Select Timer_Clock1 as TCCLK
3) Enable counter and make a sw_reset in TC0_CCR0
4) Load counter to A when TIOA falling in (TC0_CMR0)
5) Load counter to B when TIOA rising in (TC0_CMR0)
6) Enable the pin
7) Create init puls
8) Enable the interrupt (NVIC) with the inline declared function

开始测量

1) Create a startpuls with a Delay(25); and make a sw_reset in TC0_CCR0
2) Clear old interrupt by read statusreg
3) Enable interrupt for LDRBS

中断处理程序

1) Disable interrupt LDRBS
2) Set a global flag.

我不太明白的步骤是初始化中的nr 8和测量函数中的nr 3。 我知道我应该使用第 3 步

*AT91C_TC0_IER = (0x1 << 6); // or (AT91C_TC_LDRBS) instead of (0x1 << 6)

但是我不明白为什么需要这一步,我想知道LDRBS的中断在TC0中有什么功能

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...