User`s manual

RX62N Group, RX621 Group 4. Library Reference
3) R_TMR_CreateUnit
Synopsis
Configure a timer TMR unit.
Prototype
bool R_TMR_CreateUnit(
uint8_t data1,
// Unit selection
uint32_t data2,
// Configuration selection
uint8_t data3,
// Output control
uint16_t data4,
// Register value
uint16_t data5,
// Register value
uint16_t data6,
// Register value
void * func1,
// Callback function
void * func2,
// Callback function
void * func3,
// Callback function
uint8_t data7
// Interrupt priority level
);
Description (1/2)
Set up a timer TMR unit in 16-bit count mode.
[data1]
The unit number n (where n = 0 or 1).
[data2]
Configure the unit. If multiple selections are required, use "|" to separate each selection.
The default settings are shown in bold. Specify PDL_NO_DATA to use the defaults.
Counter clock source selection
PDL_TMR_CLK_OFF or
The clock input is disabled.
PDL_TMR_CLK_EXT_RISING or
PDL_TMR_CLK_EXT_FALLING or
PDL_TMR_CLK_EXT_BOTH or
The external clock signal TMCIx (x = 1 or 3 for n =
0 or 1) is used, with rising, falling or both edges
detected.
PDL_TMR_CLK_PCLK_DIV_1 or
PDL_TMR_CLK_PCLK_DIV_2 or
PDL_TMR_CLK_PCLK_DIV_8 or
PDL_TMR_CLK_PCLK_DIV_32 or
PDL_TMR_CLK_PCLK_DIV_64 or
PDL_TMR_CLK_PCLK_DIV_1024 or
PDL_TMR_CLK_PCLK_DIV_8192
The internal clock signal PCLK ÷ 1, 2, 8, 32, 64,
1024 or 8192.
Counter clearing
PDL_TMR_CLEAR_DISABLE or
Clearing is disabled.
PDL_TMR_CLEAR_CM_A or
Cleared after a compare match A occurs.
PDL_TMR_CLEAR_CM_B or
Cleared after a compare match B occurs.
PDL_TMR_CLEAR_RESET_RISING or
Cleared by a rising edge on the external reset pin
TMRIn.
PDL_TMR_CLEAR_RESET_HIGH
Cleared when the external reset pin TMRIx (x = 0
or 2 for n = 0 or 1) is high.
ADC trigger control
PDL_TMR_ADC_TRIGGER_DISABLE or
PDL_TMR_ADC_TRIGGER_ENABLE
Disable or enable ADC conversion start requests
on a compare match A signal.
Compare Match A DTC trigger control
PDL_TMR_CM_A_DTC_TRIGGER_DISABLE or
PDL_TMR_CM_A_DTC_TRIGGER_ENABLE
Disable or enable activation of the DTC
when a Compare Match A occurs.
Compare Match B DTC trigger control
PDL_TMR_CM_B_DTC_TRIGGER_DISABLE or
PDL_TMR_CM_B_DTC_TRIGGER_ENABLE
Disable or enable activation of the DTC
when a Compare Match B occurs.
R20UT0084EE0112 Rev.1.12 Page 4-130
July. 16, 2014