User`s manual
RX62N Group, RX621 Group 4. Library Reference
Description (2/2)
[data2]
Operation control
If multiple selections are required, use "|" to separate each selection.
•
Output trigger selection
PDL_PPG_TRIGGER_MTU0 or
PDL_PPG_TRIGGER_MTU1 or
PDL_PPG_TRIGGER_MTU2 or
PDL_PPG_TRIGGER_MTU3 or
Select Compare Match on MTU channel 0 to 3 as the output
trigger.
PDL_PPG_TRIGGER_MTU6 or
PDL_PPG_TRIGGER_MTU7 or
PDL_PPG_TRIGGER_MTU8 or
PDL_PPG_TRIGGER_MTU9
Select Compare Match on MTU channel 6 to 9 as the output
trigger (valid only for groups 4 to 7).
•
Non-overlap control
PDL_PPG_NORMAL or
PDL_PPG_NON_OVERLAP
Select overlapping (Compare Match A) or
non-overlapping (Compare Match A or B) operation.
•
Invert control
PDL_PPG_DIRECT or
PDL_PPG_INVERT
Select direct or inverted output.
[data3]
The initial and next output values for the enabled pins, using the following format.
b7
b6
b5
b4
b3
b2
b1
b0
Group
Next pulse output values
Initial output values
0
PO3
PO2
PO1
PO0
PO3
PO2
PO1
PO0
1
PO7
PO6
PO5
PO4
PO7
PO6
PO5
PO4
2
PO11
PO10
PO9
PO8
PO11
PO10
PO9
PO8
3
PO15
PO14
PO13
PO12
PO15
PO14
PO13
PO12
4
PO19
PO18
PO17
PO16
PO19
PO18
PO17
PO16
5
PO23
PO22
PO21
PO20
PO23
PO22
PO21
PO20
6
PO27
PO26
PO25
PO24
PO27
PO26
PO25
PO24
7
PO31
PO30
PO29
PO28
PO31
PO30
PO29
PO28
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Programmable Pulse Generator
Reference
None.
Remarks
•
If more than one group must be configured, use multiple calls of this function.
•
The applicable PPG unit 0 or 1 is brought out of the stop state.
•
If both Group 0 and Group 1, Group 2 and Group 3, Group 4 and Group 5, or Group 6 and
Group 7 need to be configured, odd group must be configured before even group.
•
This function configures each PO pin that is required for operation. User needs to ensure no
higher priority modules using the same pins as required by PPG.
Program example
#include "r_pdl_ppg.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Configure PPG outputs PO4 and PO6 (group 1) */
R_PPG_Create(
PDL_PPG_PO4 | PDL_PPG_PO6,
PDL_PPG_TRIGGER_MTU2,
0x15
);
}
R20UT0084EE0112 Rev.1.12 Page 4-122
July. 16, 2014