User`s manual
RX62N Group, RX621 Group 4. Library Reference
9) R_TMR_ControlPeriodic
Synopsis
Control periodic operation.
Prototype
bool R_TMR_ControlPeriodic(
uint8_t data1,
// 8-bit (channel) or 16-bit (unit) selection
uint32_t data2,
// Configuration selection
float data3,
// The new period or frequency
float data4
// The new pulse width or duty cycle
);
Description
Modify a periodic timer operation.
[data1]
PDL_TMR_TMR0 or
PDL_TMR_TMR1 or
PDL_TMR_TMR2 or
PDL_TMR_TMR3 or
PDL_TMR_UNIT0 or
PDL_TMR_UNIT 1
The channel n (n = 0, 1, 2 or 3) or unit (n = 0 or 1) to be
configured.
[data2]
Select the options to be modified. Use "|" to separate each selection.
•
Period or frequency calculation
PDL_TMR_PERIOD or
PDL_TMR_FREQUENCY
The parameters data3 and data4 will contain either
period and pulse width or frequency and duty cycle.
•
Output pin control
PDL_TMR_OUTPUT_ENABLE or
PDL_TMR_OUTPUT_DISABLE
Enable or disable the periodic output on pin TMOn.
For 16-bit operation the pin shall be TMO2 when n = 1.
•
ADC trigger control
PDL_TMR_ADC_TRIGGER_OFF or
PDL_TMR_ADC_TRIGGER_ON
Disable or enable periodic ADC conversion start
requests.
Applicable only for channels TMR0 or TMR2, or units 0
or 1.
•
Counter stop / start
PDL_TMR_STOP or
PDL_TMR_START
Disable or re-enable the counter clock source.
[data3]
The new period or frequency. This will be ignored if a timing change is not requested.
[data4]
The new pulse width or duty cycle (%). This will be ignored if a timing change is not requested.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Timer TMR
Reference
R_TMR_CreatePeriodic
Remarks
•
See the remarks for R_TMR_CreatePeriodic.
R20UT0084EE0112 Rev.1.12 Page 4-142
July. 16, 2014