User`s manual

RX62N Group, RX621 Group 4. Library Reference
8) R_TMR_ControlUnit
Synopsis
Write to timer unit registers.
Prototype
bool R_TMR_ControlUnit(
uint8_t data1,
// Unit selection
uint32_t data2,
// Configuration selection
uint16_t data3,
// Register value
uint16_t data4,
// Register value
uint16_t data5
// Register value
);
Description
Modify a timer unit’s counter and compare registers.
[data1]
The unit number n (where n = 0 or 1).
[data2]
The channel settings to be modified.
If multiple selections are required, use "|" to separate each selection.
Counter stop / re-start
PDL_TMR_STOP or
PDL_TMR_START
Disable or re-enable the counter clock source.
The counter or compare registers to be modified.
PDL_TMR_COUNTER
Update the timer counter register (TCNT).
PDL_TMR_TIME_CONSTANT_A
Update the timer compare match A register (TCORA).
PDL_TMR_TIME_CONSTANT_B
Update the timer compare match B register (TCORB).
[data3]
The 16-bit counter value. This will be ignored if the register is not selected.
[data4]
The 16-bit compare match A value. This will be ignored if the register is not selected.
[data5]
The 16-bit compare match B value. This will be ignored if the register is not selected.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Timer TMR
Reference
R_TMR_CreateUnit
Remarks
For unit 0, the upper byte is the value for TMR0 and the lower byte is the value for TMR1.
For unit 1, the upper byte is the value for TMR2 and the lower byte is the value for TMR3.
R20UT0084EE0112 Rev.1.12 Page 4-140
July. 16, 2014