User`s manual

RX62N Group, RX621 Group 4. Library Reference
11) R_TMR_ReadUnit
Synopsis
Read from timer unit registers.
Prototype
bool R_TMR_ReadUnit(
uint8_t data1,
// Unit selection
uint8_t * data2,
// A pointer to the data storage location
uint16_t * data3,
// A pointer to the data storage location
uint16_t * data4,
// A pointer to the data storage location
uint16_t * data5
// A pointer to the data storage location
);
Description
Read any of the timer’s counter, compare or status flag registers.
[data1]
The unit number n (where n = 0 or 1).
[data2]
The status flags shall be stored in the format below.
A flag will be set to 1 if the condition has been detected.
Specify PDL_NO_PTR if the flags are not to be read.
The unit 0 status flags shall be stored in the format:
b7
b6
b5
b4
b3
b2
b1
b0
0
TMR0
0
TMR1
Overflow
Compare
match B
Compare
match A
Overflow
Compare
match B
Compare
match A
The unit 1 status flags shall be stored in the format:
b7
b6
b5
b4
b3
b2
b1
b0
0
TMR2
0
TMR3
Overflow
Compare
match B
Compare
match A
Overflow
Compare
match B
Compare
match A
[data3]
Where the counter value shall be stored. Specify PDL_NO_PTR if it is not required.
[data4]
Where the compare match A value shall be stored. Specify PDL_NO_PTR if it is not required.
[data5]
Where the compare match B value shall be stored. Specify PDL_NO_PTR if it is not required.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Timer TMR
Reference
R_TMR_CreateUnit
Remarks
If the status flags are read, any flag that has been set to 1 shall be automatically cleared to 0 by
this function.
R20UT0084EE0112 Rev.1.12 Page 4-145
July. 16, 2014