User`s manual
RX62N Group, RX621 Group 4. Library Reference
3) R_ADC_12_Control
Synopsis
Start or stop an ADC unit.
Prototype
bool R_ADC_10_Control(
uint8_t data
// Conversion unit control
);
Description
Controls start / stop operation of the specified ADC.
[data]
To select multiple options at the same time, use "|" to separate each value.
•
On / off control
PDL_ADC_12_0_ON or
Start a software-triggered conversion or re-enable the trigger.
PDL_ADC_12_0_OFF
Stop the conversion (and disable all triggers).
•
Control the CPU during the ADC conversion.
PDL_ADC_12_CPU_OFF
Stop the CPU when the scan conversion process starts.
The CPU will re-start when any valid interrupt occurs.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
12-bit ADC
Reference
R_ADC_12_Create
Remarks
•
For single scan mode, the ADC will stop automatically when the conversion is complete.
•
Do not select CPU Off when stopping the ADC conversion, unless there is another interrupt to
wake up the CPU.
Program example
/* RPDL definitions */
#include "r_pdl_adc_12.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Start the ADC conversion process */
R_ADC_12_Control(
PDL_ADC_12_0_ON
);
}
R20UT0084EE0112 Rev.1.12 Page 4-219
July. 16, 2014