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

Functions

__STATIC_INLINE void DDL_ADC12_INJ_SetTriggerSource (ADC12_TypeDef *ADCx, uint32_t TriggerSource)
 Set ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTriggerSource (ADC12_TypeDef *ADCx)
 Get ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).
__STATIC_INLINE uint32_t DDL_ADC12_INJ_IsTriggerSourceSWStart (ADC12_TypeDef *ADCx)
 Get ADC group injected conversion trigger source internal (SW start) or external.
__STATIC_INLINE void DDL_ADC12_INJ_SetTriggerEdge (ADC12_TypeDef *ADCx, uint32_t ExternalTriggerEdge)
 Set ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTriggerEdge (ADC12_TypeDef *ADCx)
 Get ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.
__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerLength (ADC12_TypeDef *ADCx, uint32_t SequencerNbRanks)
 Set ADC group injected sequencer length and scan direction.
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerLength (ADC12_TypeDef *ADCx)
 Get ADC group injected sequencer length and scan direction.
__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerDiscont (ADC12_TypeDef *ADCx, uint32_t SeqDiscont)
 Set ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerDiscont (ADC12_TypeDef *ADCx)
 Get ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.
__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
 Set ADC group injected sequence: channel on the selected sequence rank.
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank)
 Get ADC group injected sequence: channel on the selected sequence rank.
__STATIC_INLINE void DDL_ADC12_INJ_SetTrigAuto (ADC12_TypeDef *ADCx, uint32_t TrigAuto)
 Set ADC group injected conversion trigger: independent or from ADC group regular.
__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTrigAuto (ADC12_TypeDef *ADCx)
 Get ADC group injected conversion trigger: independent or from ADC group regular.
__STATIC_INLINE void DDL_ADC12_INJ_ConfigQueueContext (ADC12_TypeDef *ADCx, uint32_t TriggerSource, uint32_t ExternalTriggerEdge, uint32_t SequencerNbRanks, uint32_t Rank1_Channel, uint32_t Rank2_Channel, uint32_t Rank3_Channel, uint32_t Rank4_Channel)
 Set one context on ADC group injected that will be checked in contexts queue.

Detailed Description

Function Documentation

◆ DDL_ADC12_INJ_ConfigQueueContext()

__STATIC_INLINE void DDL_ADC12_INJ_ConfigQueueContext ( ADC12_TypeDef * ADCx,
uint32_t TriggerSource,
uint32_t ExternalTriggerEdge,
uint32_t SequencerNbRanks,
uint32_t Rank1_Channel,
uint32_t Rank2_Channel,
uint32_t Rank3_Channel,
uint32_t Rank4_Channel )

Set one context on ADC group injected that will be checked in contexts queue.

Note
A context is a setting of group injected sequencer:
  • group injected trigger
  • sequencer length
  • sequencer ranks This function is intended to be used when contexts queue is enabled, because the sequence must be fully configured in one time (functions to set separately injected trigger and sequencer channels cannot be used): Refer to function DDL_ADC12_INJ_SetQueueMode().
In the contexts queue, only the active context can be read. The parameters of this function can be read using functions:
Parameters
ADCxADC instance
TriggerSourceThis parameter can be one of the following values:
ExternalTriggerEdgeThis parameter can be one of the following values: Note: This parameter is discarded in case of SW start: parameter "TriggerSource" set to "DDL_ADC12_INJ_TRIG_SOFTWARE".
SequencerNbRanksThis parameter can be one of the following values:
Rank1_ChannelThis parameter can be one of the following values:
Rank2_ChannelThis parameter can be one of the following values:
Rank3_ChannelThis parameter can be one of the following values:
Rank4_ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1787 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetSequencerDiscont()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerDiscont ( ADC12_TypeDef * ADCx)

Get ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Parameters
ADCxADC instance
Return values
Returnedvalue can be one of the following values:

Definition at line 1548 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetSequencerLength()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerLength ( ADC12_TypeDef * ADCx)

Get ADC group injected sequencer length and scan direction.

Note
This function retrieves:
  • Sequence length: Number of ranks in the scan sequence.
  • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n).
Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.
Parameters
ADCxADC instance
Return values
Returnedvalue can be one of the following values:

Definition at line 1517 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetSequencerRanks()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetSequencerRanks ( ADC12_TypeDef * ADCx,
uint32_t Rank )

Get ADC group injected sequence: channel on the selected sequence rank.

Note
Depending on devices and packages, some channels may not be available. Refer to device datasheet for channels availability.
Parameters
ADCxADC instance
RankThis parameter can be one of the following values:
Return values
Returnedvalue can be one of the following values:

Definition at line 1624 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetTrigAuto()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTrigAuto ( ADC12_TypeDef * ADCx)

Get ADC group injected conversion trigger: independent or from ADC group regular.

Parameters
ADCxADC instance
Return values
Returnedvalue can be one of the following values:

Definition at line 1673 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetTriggerEdge()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTriggerEdge ( ADC12_TypeDef * ADCx)

Get ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.

Parameters
ADCxADC instance
Return values
Returnedvalue can be one of the following values:

Definition at line 1473 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_GetTriggerSource()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_GetTriggerSource ( ADC12_TypeDef * ADCx)

Get ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Note
Availability of parameters of trigger sources from timer depends on timers availability on the selected device.
Parameters
ADCxADC instance
Return values
Returnedvalue can be one of the following values:

Definition at line 1432 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_IsTriggerSourceSWStart()

__STATIC_INLINE uint32_t DDL_ADC12_INJ_IsTriggerSourceSWStart ( ADC12_TypeDef * ADCx)

Get ADC group injected conversion trigger source internal (SW start) or external.

Parameters
ADCxADC instance
Return values
Value"0" if trigger source external trigger Value "1" if trigger source SW start.

Definition at line 1444 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetSequencerDiscont()

__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerDiscont ( ADC12_TypeDef * ADCx,
uint32_t SeqDiscont )

Set ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks.

Note
It is not possible to enable both ADC group injected auto-injected mode and sequencer discontinuous mode.
Parameters
ADCxADC instance
SeqDiscontThis parameter can be one of the following values:
Return values
None

Definition at line 1534 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetSequencerLength()

__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerLength ( ADC12_TypeDef * ADCx,
uint32_t SequencerNbRanks )

Set ADC group injected sequencer length and scan direction.

Note
This function performs configuration of:
  • Sequence length: Number of ranks in the scan sequence.
  • Sequence direction: Unless specified in parameters, sequencer scan direction is forward (from rank 1 to rank n).
Sequencer disabled is equivalent to sequencer of 1 rank: ADC conversion on only 1 channel.
ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.
Parameters
ADCxADC instance
SequencerNbRanksThis parameter can be one of the following values:
Return values
None

Definition at line 1497 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetSequencerRanks()

__STATIC_INLINE void DDL_ADC12_INJ_SetSequencerRanks ( ADC12_TypeDef * ADCx,
uint32_t Rank,
uint32_t Channel )

Set ADC group injected sequence: channel on the selected sequence rank.

Note
Depending on devices and packages, some channels may not be available. Refer to device datasheet for channels availability.
Parameters
ADCxADC instance
RankThis parameter can be one of the following values:
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1584 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetTrigAuto()

__STATIC_INLINE void DDL_ADC12_INJ_SetTrigAuto ( ADC12_TypeDef * ADCx,
uint32_t TrigAuto )

Set ADC group injected conversion trigger: independent or from ADC group regular.

Note
This mode can be used to extend number of data registers updated after one ADC conversion trigger and with data permanently kept (not erased by successive conversions of scan of ADC sequencer ranks), up to 5 data registers: 1 data register on ADC group regular, 4 data registers on ADC group injected.
If ADC group injected injected trigger source is set to an external trigger, this feature must be must be set to independent trigger. ADC group injected automatic trigger is compliant only with group injected trigger source set to SW start, without any further action on ADC group injected conversion start or stop: in this case, ADC group injected is controlled only from ADC group regular.
It is not possible to enable both ADC group injected auto-injected mode and sequencer discontinuous mode.
ADC must be disabled or enabled without conversion on going on either groups regular or injected.
Parameters
ADCxADC instance
TrigAutoThis parameter can be one of the following values:
Return values
None

Definition at line 1660 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetTriggerEdge()

__STATIC_INLINE void DDL_ADC12_INJ_SetTriggerEdge ( ADC12_TypeDef * ADCx,
uint32_t ExternalTriggerEdge )

Set ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger.

Note
ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.
Parameters
ADCxADC instance
ExternalTriggerEdgeThis parameter can be one of the following values:
Return values
None

Definition at line 1460 of file g32r4xx_ddl_adc12.h.

◆ DDL_ADC12_INJ_SetTriggerSource()

__STATIC_INLINE void DDL_ADC12_INJ_SetTriggerSource ( ADC12_TypeDef * ADCx,
uint32_t TriggerSource )

Set ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line).

Note
Availability of parameters of trigger sources from timer depends on timers availability on the selected device.
ADC must not be disabled. Can be enabled with or without conversion on going on either groups regular or injected.
Parameters
ADCxADC instance
TriggerSourceThis parameter can be one of the following values:
Return values
None

Definition at line 1409 of file g32r4xx_ddl_adc12.h.