User`s manual

RX62N Group, RX621 Group 4. Library Reference
4.2.12. Multi-Function Timer Pulse Unit
1) R_MTU2_Set
Synopsis
Configure the Multi-function Timer Pulse Units.
Prototype
bool R_MTU2_Set(
uint16_t data
// Configuration
);
Description
Set up the global MTU options.
[data]
Select the MTU I/O pin options. All settings are optional. Use "|" to separate each selection.
Pin selection
PDL_MTU2_PIN_3C_A or
PDL_MTU2_PIN_3C_B
Select the -A or -B pin for MTIOC3C.
PDL_MTU2_PIN_3BD_A or
PDL_MTU2_PIN_3BD_B
Select the -A or -B pins for MTIOC3B and MTIOC3D.
PDL_MTU2_PIN_4AC_A or
PDL_MTU2_PIN_4AC_B
Select the -A or -B pins for MTIOC4A and MTIOC4C.
PDL_MTU2_PIN_4BD_A or
PDL_MTU2_PIN_4BD_B
Select the -A or -B pins for MTIOC4B and MTIOC4D.
PDL_MTU2_PIN_5UVW_A or
PDL_MTU2_PIN_5UVW_B
Select the -A or -B pins for MTIC5U, MTIC5V and
MTIC5W.
PDL_MTU2_PIN_CLKABCD_A or
PDL_MTU2_PIN_CLKABCD_B
Select the -A or -B pins for MTCLKA, MTCLKB, MTCLKD
and MTCLKD.
PDL_MTU2_PIN_11UVW_A or
PDL_MTU2_PIN_11UVW_B
Select the -A or -B pins for MTIC11U, MTIC11V and
MTIC11W.
PDL_MTU2_PIN_CLKEFGH_A or
PDL_MTU2_PIN_CLKEFGH_B
Select the -A or -B pins for MTCLKE, MTCLKF, MTCLKG
and MTCLKH.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Multi-function Timer Pulse Unit
Reference
R_MTU2_Create
Remarks
Before calling R_MTU2_Create, call this function once to configure the relevant pins.
Device packages with 145 or fewer pins do not have all of the -A/-B pin options.
Program example
#include "r_pdl_mtu2.h"
void func(void)
{
/* Configure the MTU pins */
R_MTU2_Set(
PDL_MTU2_PIN_3C_A | PDL_MTU2_PIN_3BD_A | \
PDL_MTU2_PIN_4AC_B | PDL_MTU2_PIN_4BD_A | \
PDL_MTU2_PIN_5UVW_B | PDL_MTU2_PIN_CLKABCD_B | \
PDL_MTU2_PIN_11UVW_A | PDL_MTU2_PIN_CLKEFGH_A
);
}
R20UT0084EE0112 Rev.1.12 Page 4-91
July. 16, 2014