User`s manual
RX62N Group, RX621 Group 4. Library Reference
6) R_MTU2_ReadChannel
Synopsis
Read from MTU channel registers.
Prototype
bool R_MTU2_ReadChannel(
uint8_t data1,
// Channel 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
uint16_t * data6,
// A pointer to the data storage location
uint16_t * data7,
// A pointer to the data storage location
uint16_t * data8,
// A pointer to the data storage location
uint16_t * data9
// A pointer to the data storage location
);
Description (1/2)
Read any of the timer’s counter, compare or status flag registers.
[data1]
The channel number n (where n = 0 to 11).
[data2]
The status flags shall be stored in the format below.
The input capture / compare match flags will be set to 1 if the condition has been detected.
Specify PDL_NO_PTR if the flags are not to be read.
For n = 0 or 6
b7
b6
b5
b4
b3
b2
b1
b0
Detection
Count
direction
Overflow
Input capture / compare match
V F E D C B A
0: down
1: up
For n = 1, 2, 7 or 8
b7
b6
b5 – b3
b2
b1
b0
Detection
Count
direction
Underflow
Overflow
-
Input capture / compare match
U V 0 B A
0: down
1: up
For n = 3 or 9
b7
b6
b5
b4
b3
b2
b1
b0
-
Detection
Count
direction
Overflow
-
Input capture / compare match
0 V 0 D C B A
0: down
1: up
For n = 4 or 10
b7
b6
b5
b4
b3
b2
b1
b0
Detection
Count
direction
-
Overflow or
underflow
- Input capture / compare match
0 V 0 D C B A
0: down
1: up
For n = 5 or 11
b7 – b3
b2
b1
b0
-
Detection
Input capture / compare match
0
W
V
U
R20UT0084EE0112 Rev.1.12 Page 4-110
July. 16, 2014