RX113 Easy way to measure period

Hi guys, I am working on RX113.

I need to count the number of pulses (3) for measuring the period of a signal.

Given the period of the signal i can do other counts.

The signal is provided by a frequency generator signal.

Which is the best pin to use?

Do I have to use a timer associated to a pin and trigger the rise and fall?

Please let mw know.



  • I have found that i SHOULD USE MTIC5U, MTIC5V, MTIC5W.. iS IT RIGHT ? How can I set them by using smart configurator?
  • In reply to Simogaspa84:

    You can use the signal as external count source for 8-bit timer or MTU timer. Easiest will be 8-bit timer.
    Use another timer to generate a defined time interval using internal clock.
    Start interval timer and external clock timer at the same time.
    When interval timer generates an interrupt stop the external clock timer and read the value.
  • In reply to FrankL:

    Hi FrankL, thanks for your reply. Do you think is it also possible to use MTU5? It is called dead time timer. Do you have experience in that? Thanks
  • In reply to Simogaspa84:

    Why not if you like to do this?
    I think all MTU timer can use external clock.
    "Dead Time Timer" is only the function of MTU5 when it is being used with 1-phase or 3-phase motor control signal generation. In your case you use it as compare match timer.
    I don't have experience in this. Usually people measure pulse width using input capture timer.
  • In reply to FrankL:

    MTU5 it is also an input capture MTU. I would like to have a basic code how to use it.
  • In reply to FrankL:

    FrankL I have the signal which I want to find the period is entering in P56 port. (available functionality is IRQ5)
    Can you please provide a way to mesure the period. I tried to generate an interrupt for both edges and start a counter (MTU2 for example) when I have the rise edge and stop the counter when I have the falling edge. I am reading the value inside the TCNT register but it doesn't work. can you please help me
  • In reply to Simogaspa84:


    How is your project?
    Have you been able to measure the period of your signal?

    Mike Clements
    RenesasRulz Moderator