EasyManua.ls Logo

Renesas RX110 User Manual

Renesas RX110
88 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #10 background imageLoading...
Page #10 background image
RX Family ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20 Page 10 of 74
Dec 01, 2016
{
uint32_t chan_mask; // channels/bits 0-15
uint32_t chan_mask_groupb; // valid for group modes
uint32_t add_mask; // valid if add enabled in Open()
} adc_ch_cfg_t;
/* ADC_READ() ARGUMENT DEFINITIONS */
typedef enum e_adc_reg
{
ADC_REG_CH0 = 0,
ADC_REG_CH1 = 1,
ADC_REG_CH2 = 2,
ADC_REG_CH3 = 3,
ADC_REG_CH4 = 4,
ADC_REG_CH6 = 6,
ADC_REG_CH8 = 8,
ADC_REG_CH9 = 9,
ADC_REG_CH10 = 10,
ADC_REG_CH11 = 11,
ADC_REG_CH12 = 12,
ADC_REG_CH13 = 13,
ADC_REG_CH14 = 14,
ADC_REG_CH15 = 15,
ADC_REG_TEMP = 16,
ADC_REG_VOLT = 17,
ADC_REG_DBLTRIG = 18,
ADC_REG_MAX = ADC_REG_DBLTRIG
} adc_reg_t;
#define ADC_REG_ARRAY_MAX (16)
/* ADC_READALL() ARGUMENT DEFINITIONS */
typedef struct st_adc_data
{
uint16_t chan[ADC_REG_ARRAY_MAX]; // chns/indexes used depends upon MCU
uint16_t temp;
uint16_t volt;
uint16_t dbltrig;
} adc_data_t;
2.10.3 RX111 Interface Types ( r_s12ad_rx111_if.h )
/* ADC_OPEN() ARGUMENT DEFINITIONS */
typedef enum e_adc_mode
{
ADC_MODE_SS_TEMPERATURE, // single scan temperature sensor
ADC_MODE_SS_INT_REF_VOLT, // single scan internal ref voltage sensor
ADC_MODE_SS_ONE_CH, // single scan one channel
ADC_MODE_SS_MULTI_CH, // 1 trigger source, scan multiple channels
ADC_MODE_CONT_ONE_CH, // continuous scan one channel
ADC_MODE_CONT_MULTI_CH, // continuous scan multiple channels
ADC_MODE_SS_ONE_CH_DBLTRIG, // on even trig save to ADDBLDR & interrupt
ADC_MODE_SS_MULTI_CH_GROUPED, // 2 trigger sources, scan multiple channels
ADC_MODE_SS_MULTI_CH_GROUPED_DBLTRIG_A,
ADC_MODE_MAX // This definition DO NOT USE for R_ADC_Open() argument
} adc_mode_t;
typedef enum e_adc_trig // trigger sources (set to TRSA bit or TRSB bit)
{
ADC_TRIG_ASYNC_ADTRG = 0, // ext asynchronous trigger; not for Group modes
// nor double trigger modes
Question and Answer IconNeed help?

Do you have a question about the Renesas RX110 and is the answer not in the manual?

Renesas RX110 Specifications

General IconGeneral
CPU CoreRXv1
Maximum Operating Frequency32 MHz
Operating Voltage1.8V to 5.5V
Operating Temperature-40°C to +85°C
PackageLQFP, QFN
ADC12-bit
Communication InterfacesUART, I2C, SPI

Summary

Overview

API Information

2.1 Hardware Requirements

MCU peripheral and feature requirements for the ADC driver.

2.2 Hardware Resource Requirements

Details required hardware peripherals like S12ADa/b/c/e/f and GPIO.

2.3 Software Requirements

Lists dependencies like the Renesas Board Support Package (r_bsp).

2.4 Limitations

Notes on variations in A/D converter modes and usage guidelines.

2.5 Supported Toolchains

Lists tested toolchains, e.g., Renesas RX Toolchain v2.05.00.

2.6 Header Files

Specifies required header files for configuration and API definitions.

2.7 Integer Types

Mentions ANSI C99 "Exact width integer types" for portability.

2.8 Configuration Overview

Explains build-time configuration options in r_s12ad_rx_config.h.

2.9 Code Size

Details ROM and RAM code sizes based on optimization and configuration.

2.10 API Data Structures

Details data structures used in API functions for strong type checking.

2.10.1 MCU Common Interface Types

Defines callback event types and arguments for MCU-specific interfaces.

2.10.2 RX110 Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX110.

2.10.4 RX113 Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX113.

2.10.5 RX130 Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX130.

2.10.6 RX210 Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX210.

2.10.7 RX231 Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX231.

2.10.9 RX63x Interface Types

Specifies ADC OPEN() argument definitions and trigger sources for RX63x.

2.10.10 RX64M, RX71M Interface Types

Specifies ADC OPEN() argument definitions and resolution types for RX64M/RX71M.

2.10.11 RX65x Interface Types

Specifies ADC OPEN() argument definitions and modes for RX65x.

2.11 Return Values

Lists and explains ADC API error codes returned by functions.

2.12 Adding a FIT Module to Your Project

Describes methods for adding the FIT module to projects using the FIT plugin.

API Functions

3.1 Summary

Provides an overview of the functions included in the ADC driver design.

3.2 R_ADC_Open()

Initializes the ADC peripheral, sets mode, triggers, and priority.

3.3 R_ADC_Control()

Manages channels, sensors, triggers, interrupts, and scan operations.

3.4 R_ADC_Read()

Reads conversion results from a single channel, sensor, or register.

3.5 R_ADC_ReadAll()

Reads all potential channel sources for a snapshot of all values.

3.6 R_ADC_Close()

Ends scans, disables interrupts, and removes power from the A/D peripheral.

3.7 R_ADC_GetVersion()

Returns the driver version number at runtime.

Pin Setting

Demo Projects

5.1 s12ad_int_demo_rskrx113

Demo using periodic interrupts from MTU0 to trigger ADC scans.

5.2 s12ad_poll_demo_rskrx113

Demo scanning potentiometer via software trigger in an endless loop.

5.3 s12ad_poll_demo_rskrx130

Demo scanning potentiometer via software trigger in an endless loop.

5.4 s12ad_demo_rskrx64m

Demo using MTU3a to trigger ADC for potentiometer conversion on RX64M.

5.5 s12ad_demo_rskrx71m

Demo using MTU3a to trigger ADC for potentiometer conversion on RX71M.

5.6 s12ad_demo_rskrx231

Demo using MTU2a to trigger ADC for potentiometer conversion on RX231.

5.7 Adding a Demo to a Workspace

Instructions on how to add a demo project to an e² studio workspace.

Related Technical Updates

Website and Support

Provides links to Renesas Electronics website and inquiry contact.

Related product manuals