User`s manual

RX62N Group, RX621 Group 4. Library Reference
Remarks
Function R_CGC_Set must be called before any use of this function.
This function is an alternative to R_TMR_CreateChannel and R_TMR_CreateUnit.
This function stops the timer on completion, so no other TMR function calls are required.
User needs to ensure no higher priority modules using the same pins as required by this
function.
If a callback function is specified, this function will enable the relevant interrupt.
Please see the notes on callback function usage in §6.
If no callback function is specified, this function waits for the CMIB flag to indicate that the
one-shot time delay is complete. If the timer’s control registers are directly modified by the user,
this function may lock up.
A callback function is executed by the interrupt processing function. This means that no other
interrupt can be processed until the callback function has completed.
The timer period limits depend on the peripheral module clock, PCLK.
Equation
f
PCLK
(MHz)
50
48
12.5
12
8
T
MIN
PCLK
f
1
20ns 20.83ns 80ns 83.3ns 125ns
T
MAX_CHANNEL
PCLK
f
21
2
41.9ms 43.7ms 167.7ms 174.8ms 262ms
T
MAX_UNIT
PCLK
f
29
2
10.7s 11.2s 42.9s 44.7s 67.1s
Program example
#include "r_pdl_tmr.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Output a pulse and wait for 40ms */
R_TMR_CreateOneShot(
PDL_TMR_TMR0,
PDL_TMR_OUTPUT_HIGH,
40E-3,
PDL_NO_FUNC,
0
);
}
R20UT0084EE0112 Rev.1.12 Page 4-137
July. 16, 2014