G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Configuration of ADC hierarchical scope: channels

Functions

__STATIC_INLINE void DDL_ADC16_SetChannelSamplingTime (ADC16_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTime)
 Set sampling time of the selected ADC channel Unit: ADC clock cycles.
__STATIC_INLINE uint32_t DDL_ADC16_GetChannelSamplingTime (ADC16_TypeDef *ADCx, uint32_t Channel)
 Get sampling time of the selected ADC channel Unit: ADC clock cycles.
__STATIC_INLINE void DDL_ADC16_SetDisableCommand (ADC16_TypeDef *ADCx)
 Set ADC Disable Command.
__STATIC_INLINE uint32_t DDL_ADC16_GetDisableCommandStatus (ADC16_TypeDef *ADCx)
 Get ADC Disable Command.
__STATIC_INLINE void DDL_ADC16_SetChannelSingleDiff (ADC16_TypeDef *ADCx, uint32_t Channel, uint32_t SingleDiff)
 Set mode single-ended or differential input of the selected ADC channel.
__STATIC_INLINE uint32_t DDL_ADC16_GetChannelSingleDiff (ADC16_TypeDef *ADCx, uint32_t Channel)
 Get mode single-ended or differential input of the selected ADC channel.

Detailed Description

Function Documentation

◆ DDL_ADC16_GetChannelSamplingTime()

__STATIC_INLINE uint32_t DDL_ADC16_GetChannelSamplingTime ( ADC16_TypeDef * ADCx,
uint32_t Channel )

◆ DDL_ADC16_GetChannelSingleDiff()

__STATIC_INLINE uint32_t DDL_ADC16_GetChannelSingleDiff ( ADC16_TypeDef * ADCx,
uint32_t Channel )

Get mode single-ended or differential input of the selected ADC channel.

Note
When configuring a channel 'i' in differential mode, the channel 'i+1' is not usable separately. Therefore, to ensure a channel is configured in single-ended mode, the configuration of channel itself and the channel 'i-1' must be read back (to ensure that the selected channel channel has not been configured in differential mode by the previous channel).
Refer to Reference Manual to ensure the selected channel is available in differential mode. For example, internal channels (VrefInt, TempSensor, ...) are not available in differential mode.
When configuring a channel 'i' in differential mode, the channel 'i+1' is not usable separately.
Parameters
ADCxADC instance
ChannelThis parameter can be a combination of the following values:
Return values
0channel in single-ended mode, else: channel in differential mode

Definition at line 2426 of file g32r4xx_ddl_adc16.h.

◆ DDL_ADC16_GetDisableCommandStatus()

__STATIC_INLINE uint32_t DDL_ADC16_GetDisableCommandStatus ( ADC16_TypeDef * ADCx)

Get ADC Disable Command.

Parameters
ADCxADC instance
Return values
ADCDisable Command

Definition at line 2359 of file g32r4xx_ddl_adc16.h.

◆ DDL_ADC16_SetChannelSamplingTime()

__STATIC_INLINE void DDL_ADC16_SetChannelSamplingTime ( ADC16_TypeDef * ADCx,
uint32_t Channel,
uint32_t SamplingTime )

Set sampling time of the selected ADC channel Unit: ADC clock cycles.

Note
On this device, sampling time is on channel scope: independently of channel mapped on ADC group regular or injected.
In case of internal channel (VrefInt, TempSensor, ...) to be converted: sampling time constraints must be respected (sampling time can be adjusted in function of ADC clock frequency and sampling time setting). Refer to device datasheet for timings values (parameters TS_vrefint, TS_temp, ...).
In case of ADC conversion of internal channel (VrefInt, temperature sensor, ...), a sampling time minimum value is required. Refer to device datasheet.
Parameters
ADCxADC instance
ChannelThis parameter can be one of the following values:
SamplingTimeThis parameter can be one of the following values:
Return values
None

Definition at line 2289 of file g32r4xx_ddl_adc16.h.

◆ DDL_ADC16_SetChannelSingleDiff()

__STATIC_INLINE void DDL_ADC16_SetChannelSingleDiff ( ADC16_TypeDef * ADCx,
uint32_t Channel,
uint32_t SingleDiff )

Set mode single-ended or differential input of the selected ADC channel.

Note
Channel ending is on channel scope: independently of channel mapped on ADC group regular or injected. In differential mode: Differential measurement is carried out between the selected channel 'i' (positive input) and channel 'i+1' (negative input). Only channel 'i' has to be configured, channel 'i+1' is configured automatically.
Refer to Reference Manual to ensure the selected channel is available in differential mode. For example, internal channels (VrefInt, TempSensor, ...) are not available in differential mode.
When configuring a channel 'i' in differential mode, the channel 'i+1' is not usable separately.
Parameters
ADCxADC instance
ChannelThis parameter can be one of the following values:
SingleDiffThis parameter can be a combination of the following values:
Return values
None

Definition at line 2392 of file g32r4xx_ddl_adc16.h.

◆ DDL_ADC16_SetDisableCommand()

__STATIC_INLINE void DDL_ADC16_SetDisableCommand ( ADC16_TypeDef * ADCx)

Set ADC Disable Command.

Note
ADDIS can only be set to 1 by software when ADEN=1, ADSTART=0, and JADSTART=0 (this ensures that no conversions are currently in progress)
Parameters
ADCxADC instance
Return values
None

Definition at line 2347 of file g32r4xx_ddl_adc16.h.