User`s manual
RX62N Group, RX621 Group 4. Library Reference
Remarks
•
Function R_CGC_Set must be called before any use of this function.
•
If a callback function is specified, this function will enable the relevant interrupt.
Please see the notes on callback function use in §6.
•
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.
•
Ensure that the timer channel is stopped before calling this function.
•
The timing limits depend on the frequency of the peripheral module clock, PCLK.
Equation
f
PCLK
(MHz)
50
48
12.5
12
32
8
Period
MIN
PCLK
f
8
160ns 167ns 640ns 667ns 250ns 1.0µs
Period
MA
X
PCLK
f
25
2
671ms 699ms 2.68s 2.79s 1.05s 4.19s
f
MAX
8
PCLK
f
6.25 MHz 6.0 MHz 1.56 MHz 1.5 MHz 4.0 MHz 1.0 MHz
f
MIN
25
2
PCLK
f
1.49 Hz 1.43 Hz 0.37 Hz 0.357 Hz 0.95 Hz 0.24 Hz
•
If the requested period is not a multiple of the minimum period, the actual time period will be
more than the requested time period.
Program example
/* RPDL definitions */
#include "r_pdl_cmt.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Configure CMT channel 0 for 10µs operation */
R_CMT_Create(
0,
PDL_CMT_PERIOD,
10E-6,
PDL_NO_FUNC,
0
);
/* Configure CMT channel 1 for 1kHz operation */
R_CMT_Create(
1,
PDL_CMT_FREQUENCY,
1E3,
PDL_NO_FUNC,
0
);
/* Configure CMT channel 2 using register values */
R_CMT_Create(
2,
PDL_CMT_PCLK_DIV_32,
0x55AA,
PDL_NO_FUNC,
0
);
}
R20UT0084EE0112 Rev.1.12 Page 4-148
July. 16, 2014