This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的 TI 专家:
现在 、我将使用 MSP430f1611设计一个 CanOpen 项目。
时钟频率=230400
定时器在增模式下工作、初始 TACCR0=23040、间隔为100ms、定时器计数到 TACCR0值时、TACCR0 CCIFG 中断标志置1。下次、我让 TACCR0=23040+0xFFFF、 我想知道定时器如何工作。如果定时器先计数到0xFFFF、然后再计数到 TRIG 中断? 然后、定时器计数返回0、然后计数器返回到23039、然后对中断进行三角计算?
祝你度过美好的一天!
用户指南(SLAU049F)中提供了递增模式计数序列图11-3。
由于 CCR0只有16位宽、 因此分配的结果是将 CCR0=23039设置为计数器计数到23039。 它永远不会达到0xFFFF。
未经请求:图11-3显示计数器同时计算0节拍和(CCR0)节拍、因此周期实际为(CCR0+1)。 将 CCR0分配到(周期-1)是一种常规习惯、在您的情况下为"CCR0=23040-1;"。