User`s manual
RX62N Group, RX621 Group 4. Library Reference
Remarks
•
Interrupts are enabled automatically if a callback function is specified.
Please see the notes on callback function usage in §6.
•
If an external trigger is used, the low-level pulse width must be at least 1.5 PCLK cycles.
•
This function brings the converter unit out of the power-down state.
•
A callback function is executed by the interrupt processing function. This means that no other
interrupt can be processed until the callback function has completed.
•
-A or –B pin selection is not available on the 85-pin package.
•
Function R_CGC_Set must be called before any use of this function.
•
Allow 10ms to elapse from the completion of this function to the start of the first conversion.
•
For more details of the MTU or TMR trigger options, please refer to the RX62N hardware
manual.
Program example
/* RPDL definitions */
#include "r_pdl_adc_12.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
/* ADC callback function */
void ADCIntFunc(void){}
void func(void)
{
/* Set up the ADC in single mode using AN0 and AN2 */
R_ADC_12_Create(
0,
PDL_ADC_12_SCAN_SINGLE | PDL_ADC_12_CHANNEL_0 |
PDL_ADC_12_CHANNEL_2 | PDL_ADC_12_DIV_1,
PDL_ADC_12_TRIGGER_SOFTWARE,
PDL_NO_DATA,
ADCIntFunc,
2
);
}
R20UT0084EE0112 Rev.1.12 Page 4-217
July. 16, 2014