background image

RX Family  

ADC Module Using Firmware Integration Technology 

R01AN1666EJ0220  Rev. 2.20 

 

Page 56 of 74 

Dec 01, 2016 

 

3.3 

R_ADC_Control() 

This function provides commands for enabling channels and sensors and for runtime operations. These include 

enabling/disabling trigger sources and interrupts, initiating a software trigger, and checking for scan completion. 

 

Format 

adc_err_t   R_ADC_Control(uint8_t                    unit, 

                                               adc_cmd_t const    cmd, 

                                               void * const            p_cfg); 

 

 

Parameters 

unit 

0 or 1. For MCUs with only one unit 0 should be passed (only the RX64M/RX71M/RX65x have 2 units). 

cmd 

Command to run. See type 

adc_cmd_t

 in section 2.10 for the MCU being used. 

Some commands require arguments. All other commands should use FIT_NO_PTR/NULL for the 

p_cfg

 argument.

 

p_cfg 

Pointer to optional configuration structure. FIT_NO_PTR/NULL for most commands. See type 

adc_ch_cfg_t

   

in section 2.10 for the MCU being used. 

 

Return Values 

ADC_SUCCESS:  

 

 

Successful 

ADC_ERR_MISSING_PTR: 

 

p_cfg pointer is FIT_NO_PTR/NULL when required as an argument 

ADC_ERR

_

INVALID_ARG: 

 

cmd or element of p_cfg structure has invalid value. 

ADC_ERR_ILLEGAL_ARG: 

 

cmd is illegal based upon mode 

ADC_ERR_SCAN_NOT_DONE:   

The requested scan has not completed 

ADC_ERR_TRIG_ENABLED:   

 

Cannot configure comparator because scan still running 

ADC_ERR_CONDITION_NOT_MET:      No channels/sensors met the comparison condition 

 

Properties 

Prototyped in file “r_s12ad_rx_if.h” 

 

Description 

Provides commands for enabling channels and sensors and for runtime operations. These include enabling/disabling 

trigger sources and interrupts, initiating a software trigger, and checking for scan completion. 

 

After an Open() call, the following sequence of Control() commands should be issued (MCU dependent): 

1)

 

Optionally issue commands for special hardware configuration (ADC_CMD_SET_DDA_STATE_CNT and/or 

ADC_CMD_SET_SAMPLE_STATE_CNT, ADC_CMD_USE_VREFL0, ADC_CMD_USE_VREFH0). 

2)

 

Issue a command to configure channels, sensors, and comparator  

(ADC_CMD_ENABLE_CHANS, ADC_CMD_EN_COMPARATOR_LEVEL, and/or 

ADC_CMD_EN_COMPARATOR_WINDOW, ADC_CMD_ENABLE_TEMP_SENSOR, 

ADC_CMD_ENABLE_VOLT_SENSOR).

 

 

3)

 

Issue a command to enable hardware triggers or cause a software trigger (ADC_CMD_TRIG_ENABLE or 

ADC_CMD_SCAN_NOW). 

4)

 

If polling instead of using interrupts, check for completion of scan or comparator match 

(ADC_CMD_CHECK_SCAN_DONE, ADC_CMD_CHECK_SCAN_DONE_GROUPA or 

ADC_CMD_CHECK_SCAN_DONE_GROUPB, ADC_CMD_CHECK_CONDITION_MET). 

5)

 

When the scan completes, the converted data is accessed using the Read() function at the application or 

interrupt level. 

 

To set values of parameters used in this function, first clear all members of parameters to 0, and then set values. 

 

 

Содержание RX130 Series

Страница 1: ...X110 RX111 RX113 RX130 Groups RX210 Group RX230 RX231 Groups RX631 RX63N Groups RX64M Group RX65N Group RX71M Group When using this application note with other Renesas MCUs careful evaluation is recommended after making modifications to comply with the alternate MCU Related Documents Firmware Integration Technology User s Manual R01AN1833 Board Support Package Firmware Integration Technology Modul...

Страница 2: ...onfiguration Overview 5 2 9 Code Size 5 2 10 API Data Structures 6 2 11 Return Values 51 2 12 Adding a FIT Module to Your Project 51 3 API Functions 52 3 1 Summary 52 3 2 R_ADC_Open 53 3 3 R_ADC_Control 56 3 4 R_ADC_Read 67 3 5 R_ADC_ReadAll 68 3 6 R_ADC_Close 69 3 7 R_ADC_GetVersion 70 4 Pin Setting 71 5 Demo Projects 72 5 1 s12ad_int_demo_rskrx113 72 5 2 s12ad_poll_demo_rskrx113 72 5 3 s12ad_pol...

Страница 3: ...ver in a group mode two different trigger sources are used Each group can contain one or more unique channels and may be scanned at different trigger intervals The majority of the driver serves to initialize the A D peripheral and provide functions to read conversion results Settings which are common to all channels such as conversion alignment or addition count are set in the Open call Specific c...

Страница 4: ...sas Board Support Package r_bsp 2 4 Limitations Registers settings or usage notes vary depending on the mode used in the 12 bit A D converter APIs in this application note must be used according to the 12 bit A D converter chapter in the User s Manual Hardware for the MCU used 2 5 Supported Toolchains This driver is tested and working with the following toolchains Renesas RX Toolchain v2 05 00 2 6...

Страница 5: ..._PGA_GAIN 3 This equate is for the Temperature Sensor gain amplifier on the RX210 The default is a value of 0 which is good for all target voltages For best temperature resolution the voltage range which most accurately reflects the AVcc0 should have its define uncommented Table 1 Info about the configuration 2 9 Code Size The code size is based on optimization level 2 and optimization type for si...

Страница 6: ...ed in the public interface files r_s12ad_rx_if h src targets rx110 r_s12ad_rx110_if h src targets rx111 r_s12ad_rx111_if h src targets rx113 r_s12ad_rx113_if h src targets rx130 r_s12ad_rx130_if h src targets rx210 r_s12ad_rx210_if h src targets rx230 r_s12ad_rx230_if h src targets rx231 r_s12ad_rx231_if h src targets rx63x r_s12ad_rx63x_if h src targets rx64m r_s12ad_rx64m_if h src targets rx65x ...

Страница 7: ...c_data_t const p_all_data adc_err_t R_ADC_Close uint8_t const unit uint32_t R_ADC_GetVersion void 2 10 2 RX110 Interface Types r_s12ad_rx110_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...

Страница 8: ...PEED_HIGH 0x0400 adc_speed_t typedef struct st_adc_cfg adc_add_t add_cnt adc_align_t alignment ignored if addition used adc_clear_t clearing adc_speed_t conv_speed adc_trig_t trigger default and Group A trigger source adc_trig_t trigger_groupb valid only for group modes uint8_t priority for S12ADIO int 1 lo 15 hi 0 off polled uint8_t priority_groupb GBADI interrupt priority 0 15 adc_cfg_t ADC_CONT...

Страница 9: ...T_CH3 ADC_SST_CH4 ADC_SST_CH6 ADC_SST_CH8_TO_15 ADC_SST_TEMPERATURE ADC_SST_VOLTAGE ADC_SST_REG_MAX ADC_SST_VOLTAGE adc_sst_reg_t define ADC_SST_CNT_MIN 6 minimum sampling state count define ADC_SST_CNT_MAX 255 define ADC_SST_CNT_DEFAULT 20 typedef struct st_adc_time adc_sst_reg_t reg_id uint8_t num_states 6 255 default 20 ch8 15 use same value adc_time_t for ADC_CMD_ENABLE_CHANS Bitwise OR these ...

Страница 10: ...s 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 mult...

Страница 11: ...f for chans sensors ADC_ADD_TWO_SAMPLES 1 ADC_ADD_THREE_SAMPLES 2 ADC_ADD_FOUR_SAMPLES 3 adc_add_t typedef enum e_adc_align ADC_ALIGN_RIGHT 0x0000 ADC_ALIGN_LEFT 0x8000 adc_align_t typedef enum e_adc_clear ADC_CLEAR_AFTER_READ_OFF 0x0000 ADC_CLEAR_AFTER_READ_ON 0x0020 adc_clear_t typedef enum e_adc_speed ADC_CONVERT_SPEED_NORM 0x0000 ADC_CONVERT_SPEED_HIGH 0x0400 adc_speed_t typedef struct st_adc_...

Страница 12: ..._CMD_ENABLE_INT interrupt enable ADCSR ADIE 1 ADC_CMD_DISABLE_INT_GROUPB interrupt disable ADCSR GBADIE 0 ADC_CMD_ENABLE_INT_GROUPB interrupt enable ADCSR GBADIE 1 adc_cmd_t for ADC_CMD_SET_SAMPLE_STATE_CNT typedef enum e_adc_sst_reg sample state registers ADC_SST_CH0 0 ADC_SST_CH1 ADC_SST_CH2 ADC_SST_CH3 ADC_SST_CH4 ADC_SST_CH6 ADC_SST_CH8_TO_15 ADC_SST_TEMPERATURE ADC_SST_VOLTAGE ADC_SST_REG_MAX...

Страница 13: ..._REG_CH14 14 ADC_REG_CH15 15 ADC_REG_TEMP 16 ADC_REG_VOLT 17 ADC_REG_DBLTRIG 18 ADC_REG_MAX 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 4 RX113 Interface Types r_s12ad_rx113_if h ADC_OPEN ARGUMENT DEFINITIONS typedef e...

Страница 14: ...DC_TRIG_SYNC_ELC 9 ELC ADC_TRIG_SOFTWARE 16 software trigger not for Group modes nor double trigger modes This is not set to TRSA or TRSB adc_trig_t typedef enum e_adc_add ADC_ADD_OFF 0 addition is turned off for chans sensors ADC_ADD_TWO_SAMPLES 1 ADC_ADD_THREE_SAMPLES 2 ADC_ADD_FOUR_SAMPLES 3 adc_add_t typedef enum e_adc_align ADC_ALIGN_RIGHT 0x0000 ADC_ALIGN_LEFT 0x8000 adc_align_t typedef enum...

Страница 15: ...on ADC_CMD_CHECK_SCAN_DONE for Normal or GroupA scan ADC_CMD_CHECK_SCAN_DONE_GROUPA ADC_CMD_CHECK_SCAN_DONE_GROUPB Advanced control commands ADC_CMD_DISABLE_TRIG ADCSR TRGE 0 for sync async trigs ADC_CMD_DISABLE_INT interrupt disable ADCSR ADIE 0 ADC_CMD_ENABLE_INT interrupt enable ADCSR ADIE 1 ADC_CMD_DISABLE_INT_GROUPB interrupt disable ADCSR GBADIE 0 ADC_CMD_ENABLE_INT_GROUPB interrupt enable A...

Страница 16: ... ADC_MASK_CH14 1 14 define ADC_MASK_CH15 1 15 define ADC_MASK_CH21 1 21 define ADC_MASK_GROUPB_OFF 0 define ADC_MASK_ADD_OFF 0 typedef struct st_adc_ch_cfg bit 0 is ch0 bit 15 is ch15 uint32_t chan_mask channels bits 0 15 21 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 ...

Страница 17: ... sources scan multiple channels ADC_MODE_SS_MULTI_CH_GROUPED_DBLTRIG_A ADC_MODE_MAX adc_mode_t typedef enum e_adc_align ADC_ALIGN_RIGHT 0x0000 ADC_ALIGN_LEFT 0x8000 adc_align_t typedef enum e_adc_add Addition and averaging of sampled data ADC_ADD_OFF 0 addition is turned off for chans sensors ADC_ADD_TWO_SAMPLES 1 Two samples are added Register ADADC ADC 1 0 ADC_ADD_THREE_SAMPLES 2 Three samples a...

Страница 18: ...GR TRSA default and Group A trigger source adc_trig_t trigger_groupb valid only for group modes uint8_t priority for S12ADIO int 1 lo 15 hi 0 off polled uint8_t priority_groupb S12GBADI interrupt priority 0 15 adc_cfg_t ADC_CONTROL ARGUMENT DEFINITIONS typedef enum e_adc_cmd Commands for special hardware configurations ADC_CMD_USE_VREFL0 Low reference Default is to use AVSS0 ADC_CMD_USE_VREFH0 Hig...

Страница 19: ...sconnection Detection Assist DDA ADC_DDA_DISCHARGE 0x00 ADC_DDA_PRECHARGE 0x01 ADC_DDA_OFF 0x02 adc_charge_t define ADC_DDA_STATE_CNT_MIN 2 ADDISCR ADNDIS 0 3 bits define ADC_DDA_STATE_CNT_MAX 15 typedef struct st_adc_dda adc_charge_t method Discharge or Precharge uint8_t num_states 2 15 0 DISABLED 1 is invalid adc_dda_t for ADC_CMD_SET_SAMPLE_STATE_CNT typedef enum e_adc_sst_reg sample state regi...

Страница 20: ...ge sensor define ADC_MASK_SENSORS ADC_MASK_TEMP ADC_MASK_VOLT define ADC_MASK_GROUPB_OFF 0 define ADC_MASK_ADD_OFF 0 define ADC_MASK_SAMPLE_HOLD_OFF 0 typedef enum e_adc_grpa action when groupa interrupts groupb scan ADC_GRPA_PRIORITY_OFF 0 groupa ignored and does not interrupt groupb ADC_GRPA_GRPB_WAIT_TRIG 1 groupb restarts at next trigger ADC_GRPA_GRPB_RESTART_SCAN 3 groupb restarts immediately...

Страница 21: ...A enable adc_cmpwin_t for ADC_CMD_CHECK_CONDITION_MET use uint32_t ADC_READ ARGUMENT DEFINITIONS typedef enum e_adc_reg ADC_REG_CH0 0 Channel 0 ADC_REG_CH1 ADC_REG_CH2 ADC_REG_CH3 ADC_REG_CH4 ADC_REG_CH5 ADC_REG_CH6 ADC_REG_CH7 Channel 7 ADC_REG_CH16 Channel 16 ADC_REG_CH17 ADC_REG_CH18 ADC_REG_CH19 ADC_REG_CH20 ADC_REG_CH21 ADC_REG_CH24 ADC_REG_CH25 ADC_REG_CH26 ADC_REG_TEMP A D Temperature senso...

Страница 22: ...t asynchronous trigger not for Group modes nor double trigger modes ADC_TRIG_SYNC_TRG0AN 1 MTU0 TRGA ADC_TRIG_SYNC_TRG0BN 2 MTU0 TRGB ADC_TRIG_SYNC_TRGAN_OR_UDF4N 3 MTUx TRGA or MTU4 underflow complementary PWM mode ADC_TRIG_SYNC_TRG0EN 4 MTU0 TRGE ADC_TRIG_SYNC_TRG0FN 5 MTU0 TRGF ADC_TRIG_SYNC_TRG4AN 6 MTU4 TADCORA ADC_TRIG_SYNC_TRG4BN 7 MTU4 TADCORB ADC_TRIG_SYNC_TRG4AN_AND_TRG4BN 8 MTU4 TADCORA...

Страница 23: ...VOLT_SENSOR enables sensor and INT if priority 0 Commands to enable hardware triggers or cause software trigger ADC_CMD_ENABLE_TRIG ADCSR TRGE 1 for sync async triggers ADC_CMD_SCAN_NOW software trigger start scan Commands to poll for scan completion ADC_CMD_CHECK_SCAN_DONE for Normal or GroupA scan ADC_CMD_CHECK_SCAN_DONE_GROUPA ADC_CMD_CHECK_SCAN_DONE_GROUPB Advanced control commands ADC_CMD_DIS...

Страница 24: ...define ADC_MASK_CH0 1 0 define ADC_MASK_CH1 1 1 define ADC_MASK_CH2 1 2 define ADC_MASK_CH3 1 3 define ADC_MASK_CH4 1 4 define ADC_MASK_CH5 1 5 define ADC_MASK_CH6 1 6 define ADC_MASK_CH7 1 7 define ADC_MASK_CH8 1 8 define ADC_MASK_CH9 1 9 define ADC_MASK_CH10 1 10 define ADC_MASK_CH11 1 11 define ADC_MASK_CH12 1 12 define ADC_MASK_CH13 1 13 define ADC_MASK_CH14 1 14 define ADC_MASK_CH15 1 15 defi...

Страница 25: ...DC_REG_CH9 ADC_REG_CH10 ADC_REG_CH11 ADC_REG_CH12 ADC_REG_CH13 ADC_REG_CH14 ADC_REG_CH15 ADC_REG_TEMP ADC_REG_VOLT ADC_REG_DBLTRIG ADC_REG_SELF_DIAG ADC_REG_MAX ADC_REG_SELF_DIAG 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 uint16_t temp uint16_t volt uint16_t dbltrig uint16_t self_diag adc_data_t 2 10 7 RX230 Int...

Страница 26: ..._ADD_AVG_4_SAMPLES 0x83 average 4 samples adc_add_t typedef enum e_adc_clear ADC_CLEAR_AFTER_READ_OFF 0x0000 ADC_CLEAR_AFTER_READ_ON 0x0020 adc_clear_t typedef enum e_adc_trig trigger sources set to TRSA bit or TRSB bit ADC_TRIG_ASYNC_ADTRG 0 external asynchronous trigger not for Group modes nor double trigger modes ADC_TRIG_SYNC_TRG0AN 1 MTU0 TRGA ADC_TRIG_SYNC_TRG0BN 2 MTU0 TRGB ADC_TRIG_SYNC_TR...

Страница 27: ...ersion time Command to configure channels sensors and comparator ADC_CMD_ENABLE_CHANS Configure channels to scan ADC_CMD_ENABLE_TEMP_SENSOR configure temperature sensor ADC_CMD_ENABLE_VOLT_SENSOR configure internal ref voltage sensor ADC_CMD_EN_COMPARATOR_LEVEL Enable comparator for threshold compare ADC_CMD_EN_COMPARATOR_WINDOW Enable comparator for range compare Commands to enable hardware trigg...

Страница 28: ...AGE ADC_SST_REG_MAX ADC_SST_VOLTAGE adc_sst_reg_t define ADC_SST_CNT_MIN 5 For PCLKB ADCLK 1 1 1 2 1 4 1 8 define ADC_SST_CNT_MIN 6 For PCLKB ADCLK 2 1 4 1 define ADC_SST_CNT_MAX 255 define ADC_SST_CNT_DEFAULT 13 typedef struct st_adc_sst adc_sst_reg_t reg_id uint8_t num_states ch16 31 use the same value adc_sst_t for ADC_CMD_CONFIGURE_SCAN Bitwise OR these masks together for desired channels and ...

Страница 29: ...restarts at next trigger ADC_GRPA_GRPB_RESTART_SCAN 3 groupb restarts immediately ADC_GRPA_GRPB_CONT_SCAN 0x8001 groupb restarts immediately and scans continuously adc_grpa_t typedef enum e_adc_diag Self Diagnosis Channel ADC_DIAG_OFF 0x00 ADC_DIAG_0_VOLT 0x01 ADC_DIAG_HALF_VREFH0 0x02 ADC_DIAG_VREFH0 0x03 ADC_DIAG_ROTATE_VOLTS 0x04 adc_diag_t typedef enum e_adc_elc ADC_ELC_SCAN_DONE 0 normal scan...

Страница 30: ...f window uint8_t int_priority S12CMPI priority level 1 low 15 hi 0 polled adc_cmpwin_t for ADC_CMD_CHECK_CONDITION_MET use uint32_t ADC_READ ARGUMENT DEFINITIONS typedef enum e_adc_reg ADC_REG_CH0 0 Channel 0 ADC_REG_CH1 ADC_REG_CH2 ADC_REG_CH3 ADC_REG_CH4 ADC_REG_CH5 ADC_REG_CH6 ADC_REG_CH7 Channel 7 ADC_REG_CH16 Channel 16 ADC_REG_CH17 ADC_REG_CH18 ADC_REG_CH19 ADC_REG_CH20 ADC_REG_CH21 ADC_REG_...

Страница 31: ...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_align ADC_ALIGN_RIGHT 0x0000 ADC_ALIGN_LEFT 0x8000 adc_align_t typedef enum e_adc_add ADC_ADD_OFF 0 addition is turned off for chans sensors ADC_ADD_TWO_SAMPLES 1 Two samples are added Reg ADADC ADC 1 0 ADC_AD...

Страница 32: ...R TRSA default Grp A trig src adc_trig_t trigger_groupb valid only for group modes uint8_t priority for S12ADIO int 1 lo 15 hi 0 off polled uint8_t priority_groupb S12GBADI interrupt priority 0 15 adc_cfg_t ADC_CONTROL ARGUMENT DEFINITIONS typedef enum e_adc_cmd Commands for special hardware configurations ADC_CMD_USE_VREFL0 Low reference Default is to use AVSS0 ADC_CMD_USE_VREFH0 High reference D...

Страница 33: ...ATE_CNT_MAX 15 typedef struct st_adc_dda adc_charge_t method Discharge or Precharge uint8_t num_states 2 15 0 DISABLED 1 is invalid adc_dda_t for ADC_CMD_SET_SAMPLE_STATE_CNT typedef enum e_adc_sst_reg sample state registers ADC_SST_CH0 0 ADC_SST_CH1 ADC_SST_CH2 ADC_SST_CH3 ADC_SST_CH4 ADC_SST_CH5 ADC_SST_CH6 ADC_SST_CH7 ADC_SST_CH16_TO_31 ADC_SST_TEMPERATURE ADC_SST_VOLTAGE ADC_SST_REG_MAX ADC_SS...

Страница 34: ...ASK_VOLT define ADC_MASK_GROUPB_OFF 0 define ADC_MASK_ADD_OFF 0 define ADC_MASK_SAMPLE_HOLD_OFF 0 typedef enum e_adc_grpa action when groupa interrupts groupb scan ADC_GRPA_PRIORITY_OFF 0 groupa ignored and doesn t int groupb ADC_GRPA_GRPB_WAIT_TRIG 1 groupb restarts at next trigger ADC_GRPA_GRPB_RESTART_SCAN 3 groupb restarts immediately ADC_GRPA_GRPB_CONT_SCAN 0x8001 groupb restarts immed scans ...

Страница 35: ... typedef enum e_adc_reg ADC_REG_CH0 0 Channel 0 ADC_REG_CH1 ADC_REG_CH2 ADC_REG_CH3 ADC_REG_CH4 ADC_REG_CH5 ADC_REG_CH6 ADC_REG_CH7 Channel 7 ADC_REG_CH16 Channel 16 ADC_REG_CH17 ADC_REG_CH18 ADC_REG_CH19 ADC_REG_CH20 ADC_REG_CH21 ADC_REG_CH22 ADC_REG_CH23 ADC_REG_CH24 ADC_REG_CH25 ADC_REG_CH26 ADC_REG_CH27 ADC_REG_CH28 ADC_REG_CH29 ADC_REG_CH30 ADC_REG_CH31 Channel 31 ADC_REG_TEMP A D Temperature...

Страница 36: ...RG0AN 1 MTU0 TRGA ADC_TRIG_SYNC_TRG0BN 2 MTU0 TRGB ADC_TRIG_SYNC_TRGAN 3 MTUx TRGA ADC_TRIG_SYNC_TPUTRGAN 4 TPUx TRGA ADC_TRIG_SYNC_TRG0EN 5 MTU0 TRGE ADC_TRIG_SYNC_TRG0FN 6 MTU0 TRGF ADC_TRIG_SYNC_TRG4AN_OR_TRG4BN 7 MTU4 TADCORA or MTU4 TADCORB ADC_TRIG_SYNC_TPUTRG0AN 8 TPU0 TRGA ADC_TRIG_SYNC_TMRTRG0AN 9 TMR0 TCORA ADC_TRIG_SYNC_TMRTRG2AN 10 TMR2 TCORA ADC_TRIG_SOFTWARE 16 software trigger This ...

Страница 37: ...s sensor and INT if priority 0 Commands to enable hardware triggers or cause software trigger ADC_CMD_ENABLE_TRIG ADCSR TRGE 1 for sync async triggers ADC_CMD_SCAN_NOW software trigger start scan Commands to poll for scan completion ADC_CMD_CHECK_SCAN_DONE for Normal Advanced control commands ADC_CMD_DISABLE_TRIG ADCSR TRGE 0 for sync async trigs ADC_CMD_DISABLE_INT interrupt disable ADCSR ADIE 0 ...

Страница 38: ...ADC_MASK_CH17 1 17 define ADC_MASK_CH18 1 18 define ADC_MASK_CH19 1 19 define ADC_MASK_CH20 1 20 define ADC_MASK_ADD_OFF 0 typedef struct st_adc_ch_cfg bit 0 is ch0 bit 20 is ch20 uint32_t chan_mask channels bits 0 20 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 ADC_REG_CH2 ADC_REG_CH3 ADC_REG_CH4 ADC_REG...

Страница 39: ...C_Open argument adc_mode_t typedef enum e_adc_res ADC_RESOLUTION_12_BIT 0 13 ADCLKs conversion 15 self diagnosis ADC_RESOLUTION_10_BIT 1 11 ADCLKs conversion 13 self diagnosis ADC_RESOLUTION_8_BIT 2 9 ADCLKs conversion 11 self diagnosis adc_res_t typedef enum e_adc_align ADC_ALIGN_RIGHT 0x0000 ADC_ALIGN_LEFT 0x8000 adc_align_t typedef enum e_adc_add ADC_ADD_OFF 0 addition is turned off for chans s...

Страница 40: ...OR_GTADTR0BN 25 GPT0 GTADTRA or GPT0 GTADTRB ADC_TRIG_SYNC_GTADTR1AN_OR_GTADTR1BN 26 GPT1 GTADTRA or GPT1 GTADTRB ADC_TRIG_SYNC_GTADTR2AN_OR_GTADTR2BN 27 GPT2 GTADTRA or GPT2 GTADTRB ADC_TRIG_SYNC_GTADTR3AN_OR_GTADTR3BN 28 GPT3 GTADTRA or GPT3 GTADTRB ADC_TRIG_SYNC_TMRTRG0AN 29 TMR0 TCORA ADC_TRIG_SYNC_TMRTRG2AN 30 TMR2 TCORA ADC_TRIG_SYNC_TPUTRGAN 31 TPUx TRGA ADC_TRIG_SYNC_TPUTRG0AN 32 TPU0 TRGA...

Страница 41: ...ADC_CMD_DISABLE_INT interrupt disable ADCSR ADIE 0 ADC_CMD_ENABLE_INT interrupt enable ADCSR ADIE 1 ADC_CMD_DISABLE_INT_GROUPB interrupt disable ADCSR GBADIE 0 ADC_CMD_ENABLE_INT_GROUPB interrupt enable ADCSR GBADIE 1 adc_cmd_t for ADC_CMD_SET_DDA_STATE_CNT typedef enum e_adc_charge Disconnection Detection Assist DDA ADC_DDA_DISCHARGE 0x00 ADC_DDA_PRECHARGE 0x01 ADC_DDA_OFF 0x02 adc_charge_t defin...

Страница 42: ...MASK_CH16 1 16 define ADC_MASK_CH17 1 17 define ADC_MASK_CH18 1 18 define ADC_MASK_CH19 1 19 define ADC_MASK_CH20 1 20 define ADC_MASK_TEMP 1 21 temperature sensor define ADC_MASK_VOLT 1 22 internal reference voltage sensor define ADC_MASK_SENSORS ADC_MASK_TEMP ADC_MASK_VOLT define ADC_MASK_GROUPB_OFF 0 define ADC_MASK_ADD_OFF 0 define ADC_MASK_SAMPLE_HOLD_OFF 0 typedef enum e_adc_grpa action when...

Страница 43: ...win_cfg bit OR ADC_MASK_xxx to indicate channels sensors uint32_t compare_mask channels sensors to compare uint32_t inside_window_mask condition met when within range default 0 met when outside range uint16_t level_lo uint16_t level_hi uint8_t int_priority S12CMPI priority level 1 low 15 hi 0 polled adc_cmpwin_t ADC_READ ARGUMENT DEFINITIONS typedef enum e_adc_reg ADC_REG_CH0 0 ADC_REG_CH1 1 ADC_R...

Страница 44: ...x_if h ADC_OPEN ARGUMENT DEFINITIONS typedef enum e_adc_mode 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 triggers save to ADDBLDR int ADC_MODE_SS_MULTI_CH_GROUPED 2 trigger sources scan multiple chan...

Страница 45: ...asynchronous trig not for Group modes nor double trigger modes MTU ADC_TRIG_SYNC_TRG0AN 1 ADC_TRIG_SYNC_TRG1AN 2 ADC_TRIG_SYNC_TRG2AN 3 ADC_TRIG_SYNC_TRG3AN 4 ADC_TRIG_SYNC_TRG4AN_OR_UDF4N 5 ADC_TRIG_SYNC_TRG6AN 6 ADC_TRIG_SYNC_TRG7AN_OR_UDF7N 7 ADC_TRIG_SYNC_TRG0EN 8 ADC_TRIG_SYNC_TRG4AN 9 ADC_TRIG_SYNC_TRG4BN 10 ADC_TRIG_SYNC_TRG4AN_OR_TRG4BN 11 either event causes a trigger ADC_TRIG_SYNC_TRG4AN...

Страница 46: ...MD_EN_COMPARATOR_WINDOW enable comparator for range compare Commands to enable hardware triggers or cause software trigger ADC_CMD_ENABLE_TRIG ADCSR TRGE 1 for sync async triggers ADC_CMD_SCAN_NOW software trigger start scan Commands to poll for scan completion and comparator results ADC_CMD_CHECK_SCAN_DONE for Normal or GroupA scan ADC_CMD_CHECK_SCAN_DONE_GROUPA ADC_CMD_CHECK_SCAN_DONE_GROUPB ADC...

Страница 47: ...CH16_TO_20 ADC_SST_TEMPERATURE ADC_SST_VOLTAGE ADC_SST_REG_MAX adc_sst_reg_t define ADC_SST_CNT_MIN 5 define ADC_SST_CNT_MAX 255 define ADC_SST_CNT_DEFAULT 11 typedef struct st_adc_time adc_sst_reg_t reg_id uint8_t num_states ch8 20 use the same value adc_sst_t for ADC_CMD_CONFIGURE_SCAN Bitwise OR these masks together for desired channels and sensors Used for all commands containing a mask or fla...

Страница 48: ...TART_SCAN 0x4003 ADC_GRPA_GRPB_GRPC_TOP_CONT_SCAN 0x8001 ADC_GRPA_GRPB_GRPC_RESTART_CONT_SCAN 0xC003 adc_grpa_t typedef enum e_adc_diag Self Diagnosis Channel ADC_DIAG_OFF 0x00 ADC_DIAG_0_VOLT 0x01 ADC_DIAG_HALF_VREFH0 0x2 ADC_DIAG_VREFH0 0x3 ADC_DIAG_ROTATE_VOLTS 0x4 ADC_DIAG_END_ENUM adc_diag_t define ADC_SST_SH_CNT_MIN 4 minimum sample hold states define ADC_SST_SH_CNT_MAX 255 maximum sample ho...

Страница 49: ...OMP_WINB_VOLT 33 Window B Comparison condition select define ADC_COMP_WINB_COND_BELOW 0 define ADC_COMP_WINB_COND_ABOVE 1 for ADC_CMD_EN_COMPARATOR_LEVEL and ADC_CMD_EN_COMPARATOR_WINDOW typedef struct st_adc_cmpwin_cfg Window A bit OR ADC_MASK_xxx to indicate channels sensors Window B ADC_COMP_WINB_xxx to indicate channels sensors uint32_t compare_mask channels sensors to compare uint32_t compare...

Страница 50: ...G_DBLTRIG ADC_REG_DBLTRIGA loaded when first multi source trigger was A ADC_REG_DBLTRIGB loaded when first multi source trigger was B ADC_REG_SELF_DIAG ADC_REG_MAX adc_reg_t define ADC_0_REG_ARRAY_MAX 8 define ADC_1_REG_ARRAY_MAX 21 ADC_READALL ARGUMENT DEFINITIONS typedef struct st_adc_unit0_data uint16_t chan ADC_0_REG_ARRAY_MAX uint16_t dbltrig uint16_t dbltrigA uint16_t dbltrigB uint16_t self_...

Страница 51: ...2 12 Adding a FIT Module to Your Project This module must be added in the e studio to each project in which it is used There are two methods for adding this module using the FIT plugin and adding it manually When the FIT plugin is used FIT modules can be added to projects easily and the include file path can be updated automatically Accordingly we recommend using the FIT plugin when adding FIT mod...

Страница 52: ...inter for notifying the user at interrupt level whenever a scan has completed R_ADC_Control Provides commands for enabling channels and sensors and for runtime operations These include enabling disabling trigger sources and interrupts initiating a software trigger and checking for scan completion R_ADC_Read Reads conversion results from a single channel sensor double trigger or self diagnosis regi...

Страница 53: ...ersion fields use the adc_align_t adc_clear_t enums If addition is enabled the alignment field is ignored The add_cnt field uses the adc_add_t enum The number of samples added applies to all channels and sensors except for Temperature sensor on RX210 An individual channel may opt out of any addition using the Control function The trigger and trigger_groupb fields use the adc_trig_t enum for trigge...

Страница 54: ...0 ADC_MODE_SS_TEMPERATURE config FIT_NO_FUNC Special Notes RX Family Common The application must complete MPC and PORT initialization prior to calling Open Refer to the User s Hardware Manual about limitations of using output pins on the same port as analog pins The following is a sample initialization for an RSKRX111 Rev 1 board R_BSP_RegisterProtectDisable BSP_REG_PROTECT_MPC MPC P40PFS BYTE 0x8...

Страница 55: ...d Group B results here nop else if args event ADC_EVT_CONDITION_MET Process chans sensors indicated in args compare_flags nop Special Notes RX 63x Even if register automatic clearing is enabled for temperature sensor output or internal reference voltage the A D conversion result is not cleared After the R_ADC_Open function is executed wait at least 10 ms before executing A D conversion Special Not...

Страница 56: ...nfigure comparator because scan still running ADC_ERR_CONDITION_NOT_MET No channels sensors met the comparison condition Properties Prototyped in file r_s12ad_rx_if h Description Provides commands for enabling channels and sensors and for runtime operations These include enabling disabling trigger sources and interrupts initiating a software trigger and checking for scan completion After an Open c...

Страница 57: ...gger single scan of one channel and polling config resolution ADC_RESOLUTION_12_BIT config trigger ADC_TRIG_SOFTWARE config priority 0 denotes polling config add_cnt ADC_ADD_OFF config alignment ADC_ALIGN_RIGHT config clearing ADC_CLEAR_AFTER_READ_OFF err R_ADC_Open 0 ADC_MODE_SS_ONE_CH config NULL ENABLE CHANNELS Clear all fields of the adc_ch_cfg_t structure memset ch_cfg 0 sizeof ch_cfg Specify...

Страница 58: ...ONE_CH config NULL DO SPECIAL HARDWARE CONFIGURATION Clear all fields of the adc_sst_t structure memset sst 0 sizeof sst Clear all fields of the adc_ch_cfg_t structure memset ch_cfg 0 sizeof ch_cfg Set number of sampling states for 4us sample For PCLKD 60MHz 1 state 1 60MHz 16 7ns 4us 16 7ns 240 states sst reg_id ADC_SST_TEMPERATURE sst num_states 240 adc_err R_ADC_Control 1 ADC_CMD_SET_SAMPLE_STA...

Страница 59: ...5 config add_cnt ADC_ADD_AVG_4_SAMPLES config alignment ADC_ALIGN_RIGHT config clearing ADC_CLEAR_AFTER_READ_OFF R_ADC_Open 1 ADC_MODE_SS_MULTI_CH_GROUPED_DBLTRIG_A config MyCallback CONFIGURE SCAN Can only have 1 channel for double triggering and is only channel in Group A Have channel 8 as Group A have 2 3 and 9 as Group B Perform addition average on all channels except 9 ch_cfg chan_mask ADC_MA...

Страница 60: ...of each structure memset config 0 sizeof config memset ch_cfg 0 sizeof ch_cfg INITIALIZE ADC FOR GROUP SCANNING WITH DOUBLE TRIGGER use synchronous trigger TRGA0N to start Group A scan int priority 4 use synchronous trigger TRGA1N to start Group B scan int priority 5 use synchronous trigger TRGA2N to start Group C scan int priority 6 allow each channel to be scanned four times and averaged before ...

Страница 61: ...DC_CMD_ENABLE_TRIG NULL INTERRUPT OCCURS UPON SCAN COMPLETION The callback is called twice from interrupt level once after each group scan completes The order depends upon the trigger order void MyCallback void p_args adc_cb_args_t args uint16_t data1 data2 data3 data4 data5 data6 args adc_cb_args_t p_args READ RESULTS if args event ADC_EVT_SCAN_COMPLETE From S12ADIO interrupt Group A scan complet...

Страница 62: ...llback CONFIGURE SCAN OF CHANNELS 3 5 Clear all fields of the adc_ch_cfg_t structure memset ch_cfg 0 sizeof ch_cfg ch_cfg chan_mask ADC_MASK_CH3 ADC_MASK_CH4 ADC_MASK_CH5 ch_cfg diag_method ADC_DIAG_OFF ch_cfg anex_enable false ch_cfg sample_hold_mask 0 R_ADC_Control 0 ADC_CMD_ENABLE_CHANS ch_cfg HAVE COMPARATOR CHECK ON CHANNELS 3 4 FOR DROPPING BELOW 1 65V Clear all fields of the adc_cmpwin_t st...

Страница 63: ...gger and 2 Comparator Checking RX65x adc_cfg_t config adc_ch_cfg_t ch_cfg adc_cmpwin_t cmpwin Clear all fields of each structure memset config 0 sizeof config memset ch_cfg 0 sizeof ch_cfg memset cmpwin 0 sizeof cmpwin INITIALIZE MTU HERE USED FOR TRIGGER SOURCES OPEN UNIT 0 config resolution ADC_RESOLUTION_12_BIT config trigger ADC_TRIG_SYNC_TRG0AN config priority 4 config add_cnt ADC_ADD_OFF con...

Страница 64: ...le true R_ADC_Control 0 ADC_CMD_EN_COMPARATOR_LEVEL cmpwin After open wait 1 us or longer before A D conversion starts ENABLE TRIGGERS R_ADC_Control 0 ADC_CMD_ENABLE_TRIG NULL INTERRUPT OCCURS UPON SCAN COMPLETION Callback called from interrupt level void MyCallback void p_args adc_cb_args_t args uint16_t data3 data4 data5 args adc_cb_args_t p_args READ RESULTS if args event ADC_EVT_SCAN_COMPLETE ...

Страница 65: ...ote 1 In RX63x ADC_CMD_CHECK_SCAN_DONE_GROUPA cannot be used Please check the interrupt request flag directly for completion of A D conversion Note 2 Use ADC_CMD_CHECK_SCAN_DONE_GROUPB when waiting completion of A D conversion for Group B Note 3 ADC_CMD_CHECK_SCAN_DONE_GROUPC can be used only with RX65x When A D conversion interrupts are enabled the R_ADC_Control function cannot be used to wait co...

Страница 66: ... channels must be in Group A B Sample and Hold channels must be in Group B or Group C S Sample and Hold channels cannot be split across groups Special Notes RX130 RX230 RX231 This function does not support following features Compare function window B Compare function window A B composite condition setting Special Notes RX130 RX230 RX231 RX64M RX71M RX65x When using the comparison configure the com...

Страница 67: ...10 for the MCU being used p_data Pointer to variable to load value into Return Values ADC_SUCCESS Success ADC_ERR_INVALID_ARG unit or reg_id contains an invalid value 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 a single channel sensor double trigger or self diagnosis register Reentrant Yes Example uint16_t d...

Страница 68: ... 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...

Страница 69: ...X64M RX71M RX65x have 2 units Return Values ADC_ERR_INVALID_ARG Unit not 0 or 1 Properties Prototyped in file r_s12ad_rx_if h Description Ends any scan in progress disables interrupts and removes power to the A D peripheral Allows call to Open to be performed again This is necessary when changing scan configurations Reentrant This may only be called once per unit after an Open is performed Example...

Страница 70: ...ion void Parameters None Return Values Version number Properties Prototyped in file r_s12ad_rx_if h Description Returns the version of this module The version number is encoded such that the top 2 bytes are the major version number and the bottom 2 bytes are the minor version number Reentrant Yes Example uint32_t version version R_ADC_GetVersion Special Notes This function is in lined using the pr...

Страница 71: ...mware Integration Technology R01AN1666EJ0220 Rev 2 20 Page 71 of 74 Dec 01 2016 4 Pin Setting Regarding the pin setting used for this module it is strictly recommended to perform the pin setting after calling the function R_ADC_Open ...

Страница 72: ...r position and observe the corresponding changes in the variable 5 4 s12ad_demo_rskrx64m This is a simple demo of the RX64M A D Converter S12AD for the RSKRX64M starter kit FIT module r_s12ad_rx The demo uses the Multi Function Timer Pulse Unit MTU3a to periodically trigger the ADC module to perform conversion on channel 0 which is connected to the on board potentiometer Each time a scan completes...

Страница 73: ...cts are found in the FITDemos subdirectory of the e2 studio installation directory To add a demo project to a workspace select File Import General Existing Projects into Workspace then click Next From the Import Projects dialog choose the Select archive file radio button Browse to the demo subdirectory select the desired demo zip file then click Finish ...

Страница 74: ...elated Technical Updates This module reflects the content of the following technical updates TN RX A124A E TN RX A117A E Website and Support Renesas Electronics Website http www renesas com Inquiries http www renesas com inquiry All trademarks and registered trademarks are the property of their respective owners ...

Страница 75: ...ol Added the following code in each Example section Code to clear all fields of each structure Comment regarding a wait time before A D conversion starts after open 55 3 2 R_ADC_Open Added the Special Notes RX 63x and Special Notes RX110 RX111 RX113 RX210 RX130 RX230 RX231 RX65x 56 3 3 R_ADC_Control Added the sentence to clear all members of parameters in the Description 65 3 3 R_ADC_Control Added...

Страница 76: ... Thus comparison for levels and windows does not work Condition Comparison does not work under any condition Measure Modified the code to enable the CMPAE bit using the adc_control function when the compare function is selected Use Rev 2 20 or later version of the S12AD FIT module Fixed the following issue Target Device RX64M RX71M RX230 RX231 Description After Disconnection Detection Assist DDA i...

Страница 77: ...DC_CFG_PGA_GAIN to r_s12ad_rx_config h Use Rev 2 20 or later version of the S12AD FIT module Deleted unnecessary definitions Deleted unnecessary members Modified the following procedures according to the User s Manual Hardware Procedure for when A D conversion stops Procedure for when entering low power consumption modes Procedure to rewrite the ADHSC bit Fixed the following issue Target Device RX...

Страница 78: ...ADC_CONVERT_SPEED_HI ADC_CONVERT_SPEED_HIGH ADC_TRIG_NONE_GROUPB Deleted ADC_TRIG_ASYNC_ADTRG0 ADC_TRIG_ASYNC_ADTRG RX111 ADC_CONVERT_SPEED_HI ADC_CONVERT_SPEED_HIGH ADC_TRIG_NONE_GROUPB Deleted ADC_TRIG_ASYNC_ADTRG0 ADC_TRIG_ASYNC_ADTRG ADC_TRIG_SYNC_TRGAN ADC_TRIG_SYNC_TRGAN_OR_UDF4N ADC_TRIG_SYNC_TRG4ABN ADC_TRIG_SYNC_TRG4AN_AND_TRG4BN RX113 ADC_CONVERT_SPEED_HI ADC_CONVERT_SPEED_HIGH ADC_TRIG_...

Страница 79: ...RIG_SYNC_GTADTR0AN ADC_TRIG_SYNC_GTADTRB0N ADC_TRIG_SYNC_GTADTR0BN ADC_TRIG_SYNC_GTADTRA1N ADC_TRIG_SYNC_GTADTR1AN ADC_TRIG_SYNC_GTADTRB1N ADC_TRIG_SYNC_GTADTR1BN ADC_TRIG_SYNC_GTADTRA2N ADC_TRIG_SYNC_GTADTR2AN ADC_TRIG_SYNC_GTADTRB2N ADC_TRIG_SYNC_GTADTR2BN ADC_TRIG_SYNC_GTADTRA3N ADC_TRIG_SYNC_GTADTR3AN ADC_TRIG_SYNC_GTADTRB3N ADC_TRIG_SYNC_GTADTR3BN ADC_TRIG_SYNC_GTADTRA0N_OR_GTADTRB0N ADC_TRIG...

Страница 80: ...RIG_SYNC_GTADTR0AN ADC_TRIG_SYNC_GTADTRB0N ADC_TRIG_SYNC_GTADTR0BN ADC_TRIG_SYNC_GTADTRA1N ADC_TRIG_SYNC_GTADTR1AN ADC_TRIG_SYNC_GTADTRB1N ADC_TRIG_SYNC_GTADTR1BN ADC_TRIG_SYNC_GTADTRA2N ADC_TRIG_SYNC_GTADTR2AN ADC_TRIG_SYNC_GTADTRB2N ADC_TRIG_SYNC_GTADTR2BN ADC_TRIG_SYNC_GTADTRA3N ADC_TRIG_SYNC_GTADTR3AN ADC_TRIG_SYNC_GTADTRB3N ADC_TRIG_SYNC_GTADTR3BN ADC_TRIG_SYNC_GTADTRA0N_OR_GTADTRB0N ADC_TRIG...

Страница 81: ...YNC_ELC ADC_TRIG_SYNC_TRGAN1 ADC_TRIG_SYNC_TPUTRGAN ADC_TRIG_SYNC_TRG4ABN1 ADC_TRIG_SYNC_TPUTRG0AN RX231 ADC_TRIG_NONE_GROUPB ADC_TRIG_NONE ADC_TRIG_ASYNC_ADTRG0 ADC_TRIG_ASYNC_ADTRG ADC_TRIG_SYNC_TRGAN ADC_TRIG_SYNC_TRGAN_OR_UDF4N ADC_TRIG_SYNC_TRG4ABN ADC_TRIG_SYNC_TRG4AN_AND_TRG4BN ADC_TRIG_SYNC_ELCTRG0N_OR_ELCTRG1N ADC_TRIG_SYNC_ELC ADC_TRIG_SYNC_TRGAN1 ADC_TRIG_SYNC_TPUTRGAN ADC_TRIG_SYNC_TRG...

Страница 82: ...e adc_data_t structure in the RX63x RX110 RX111 RX113 and RX210 Groups to unify the behavior of the R_ADC_ReadAll function over all MCU groups Fixed the following issue Target Device RX64M RX71M Description In the processing for checking arguments ADC_TRIG_NONE is checked with trigger Then the R_ADC_Open function returns an error even if the ADC_TRIG_NONE setting is valid Condition ADC_TRIG_NONE i...

Страница 83: ...parison is enabled the comparison cannot be set to level comparison Condition The comparison is reset to level comparison after setting to window comparison Measure Modified the code to properly set the WCMPE bit according to the selection of window or level comparison Use Rev 2 20 or later version of the S12AD FIT module Modified the code to use the interface provided in the BSP R_BSP_InterruptCo...

Страница 84: ...wait function adc_delay has been deleted Fixed the following issue Target Device RX210 Description An unnecessary error determination is performed Because of this when specifying a setting with the channel dedicated sample and hold function the R_ADC_Control function returns an error Condition In group scan mode A D conversion channels for group A and group B are set with the channel dedicated sam...

Страница 85: ...sure Modified the definition to determine a valid channel Use Rev 2 20 or later version of the S12AD FIT module Fixed the following issue Target Device RX631 Description There is no definition to determine a valid channel and this causes a compiling error Condition A chip with 64 pins or 48 pins is selected Measure Added the definition to determine a valid channel Use Rev 2 20 or later version of ...

Страница 86: ...he temperature sensor module is enabled Added the definition ADC_CONVERT_SPEED_DEFAULT for conversion speed of A D conversion in RX110 RX111 and RX113 ADC_CONVERT_SPEED_DEFAULT has the same value as ADC_CONVERT_SPEED_NORM Fixed the following issue Target Device RX110 Description An error occurs when attempting to set the minimum value for the number of sampling states Condition An error occurs whe...

Страница 87: ...ip power on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified 3 Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited The reserved addresses are provided for the possible future expansion of functions Do not access these addresses the correct operation of LSI is not guara...

Страница 88: ...on or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or systems manufactured by you 8 Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in...

Отзывы: