User`s manual

RX62N Group, RX621 Group 4. Library Reference
2) R_TMR_CreateChannel
Synopsis
Configure a timer TMR channel.
Prototype
bool R_TMR_CreateChannel(
uint8_t data1,
// Channel selection
uint32_t data2,
// Configuration selection
uint8_t data3,
// Configuration selection
uint8_t data4,
// Register value
uint8_t data5,
// Register value
uint8_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 an 8-bit timer TMR channel.
[data1]
The channel number n (where n = 0, 1, 2 or 3).
[data2]
Configure the channel. 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 TMCIn is used.
Select 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 or
The internal clock signal PCLK ÷ 1, 2, 8, 32, 64,
1024 or 8192.
PDL_TMR_CLK_TMR1_OVERFLOW or
PDL_TMR_CLK_TMR3_OVERFLOW or
The overflow signal from TMR(n+1).
Valid for n = 0 or 2.
PDL_TMR_CLK_TMR0_CM_A or
PDL_TMR_CLK_TMR2_CM_A
The compare match A signal from TMR(n-1).
Valid for n = 1 or 3.
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 TMRIn 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.
Only applicable for channels TMR0 or TMR2.
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-127
July. 16, 2014