메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

How to register setting method for the compare match timer (CMT)?

Latest Updated:06/20/2013

Question:

I'd like to confirm the register setting method for the compare match timer (CMT).

To generate an interrupt at a regular interval using the compare match timer, is the value that should be set to the compare match timer constant register (CMCOR) "the set interval (interrupt interval) divided by the resolution (selected clock), minus 1"?

Answer:

That is correct.

A compare match signal is generated at the last matched state (at the timing at which the CMCNT counter updates the matched count value).

See Timing of Compare Match Interrupt Generation in the user's manual: hardware.

If the value set in the compare match timer constant register (CMCOR) is N, the count value counts from 0 to N. Therefore, the actual count value is N + 1.

If you wish to count to N, set the compare match timer constant register (CMCOR) to N - 1.

 

Suitable Products
RX62N, RX621
RX62T
RX610
RX630
RX63N, RX631
RX210
RX220
RX110
RX111
  • 이 기사가 도움이 되셨나요?