About Timer TCNT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

About Timer TCNT

619件の閲覧回数
jx1207
Contributor I

Hi,

  调试程序的时候发现,使能定时器后定时器开始计数,但是禁止定时器TIM0TSCR1_TEN=0;定时器的TCNT和TCTL并没有清零,而是在定时器开启后继续向上计数。我想要在定时器关断时,定时器TCNT和TCTL都清零,有什么办法吗?

0 件の賞賛
3 返答(返信)

543件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi jx1207@126.com,

Which MCU are you using?

Thank you,

BR, Daniel

0 件の賞賛

543件の閲覧回数
jx1207
Contributor I

S12ZVL

0 件の賞賛

543件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi jx1207@126.com,
The TCTL registers can be cleared by a write anytime.
But unfortunately, the TCNT counter cannot be reset in Normal mode, the register is writable in Special mode only.
And there is no mechanism that would clear the counter automatically.

Regards,

Daniel

0 件の賞賛