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 #68 background imageLoading...
Page #68 background image
RX Family ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20 Page 68 of 74
Dec 01, 2016
3.5 R_ADC_ReadAll()
This function reads conversion results from all potential sources, enabled or not.
Format
adc_err_t R_ADC_ReadAll(adc_data_t * const p_data);
Parameters
p_data
Pointer to structure to load register values into.
See type adc_data_t in section 2.10 for the MCU being used
An example structure for the register values is as follows:
typedef struct st_adc_data
{
uint16_t chan[ADC_REG_ARRAY_MAX]; // chans/indexes used depends upon MCU
uint16_t temp;
uint16_t volt;
uint16_t dbltrig;
uint16_t self_diag;
} adc_data_t;
Return Values
ADC_SUCCESS: Success
ADC_ERR_MISSING_PTR: p_data is FIT_NO_PTR/NULL
Properties
Prototyped in file “r_s12ad_rx_if.h”
Description
Reads conversion results from all potential sources, enabled or not. This function is convenient for getting a
snapshot of all values at any point in time.
Reentrant
Yes.
Example
adc_data_t data;
:
/* Read all channel registers available on hardware */
R_ADC_ReadAll(&data); // “data” loaded with all conversion reg values
Special Notes:
None.
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