![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the ADC_ETC module of MCUXpresso SDK devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/adc_etc
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/adc_etc
Data Structures | |
struct | _adc_etc_config |
ADC_ETC configuration. More... | |
struct | _adc_etc_trigger_chain_config |
ADC_ETC trigger chain configuration. More... | |
struct | _adc_etc_trigger_config |
ADC_ETC trigger configuration. More... | |
Macros | |
#define | FSL_ADC_ETC_DRIVER_VERSION (MAKE_VERSION(2, 2, 1)) |
ADC_ETC driver version. More... | |
#define | ADC_ETC_DMA_CTRL_TRGn_REQ_MASK 0xFF0000U |
The mask of status flags cleared by writing 1. More... | |
Typedefs | |
typedef enum _adc_etc_external_trigger_source | adc_etc_external_trigger_source_t |
External triggers sources. | |
typedef enum _adc_etc_interrupt_enable | adc_etc_interrupt_enable_t |
Interrupt enable/disable mask. | |
typedef enum _adc_etc_dma_mode_selection | adc_etc_dma_mode_selection_t |
DMA mode selection. | |
typedef struct _adc_etc_config | adc_etc_config_t |
ADC_ETC configuration. | |
typedef struct _adc_etc_trigger_chain_config | adc_etc_trigger_chain_config_t |
ADC_ETC trigger chain configuration. | |
typedef struct _adc_etc_trigger_config | adc_etc_trigger_config_t |
ADC_ETC trigger configuration. | |
Enumerations | |
enum | _adc_etc_status_flag_mask |
ADC_ETC customized status flags mask. | |
enum | _adc_etc_external_trigger_source |
External triggers sources. | |
enum | _adc_etc_interrupt_enable |
Interrupt enable/disable mask. | |
enum | _adc_etc_dma_mode_selection |
DMA mode selection. | |
Initialization | |
void | ADC_ETC_Init (ADC_ETC_Type *base, const adc_etc_config_t *config) |
Initialize the ADC_ETC module. More... | |
void | ADC_ETC_Deinit (ADC_ETC_Type *base) |
De-Initialize the ADC_ETC module. More... | |
void | ADC_ETC_GetDefaultConfig (adc_etc_config_t *config) |
Gets an available pre-defined settings for the ADC_ETC's configuration. More... | |
void | ADC_ETC_SetTriggerConfig (ADC_ETC_Type *base, uint32_t triggerGroup, const adc_etc_trigger_config_t *config) |
Set the external XBAR trigger configuration. More... | |
void | ADC_ETC_SetTriggerChainConfig (ADC_ETC_Type *base, uint32_t triggerGroup, uint32_t chainGroup, const adc_etc_trigger_chain_config_t *config) |
Set the external XBAR trigger chain configuration. More... | |
uint32_t | ADC_ETC_GetInterruptStatusFlags (ADC_ETC_Type *base, adc_etc_external_trigger_source_t sourceIndex) |
Gets the interrupt status flags of external XBAR and TSC triggers. More... | |
void | ADC_ETC_ClearInterruptStatusFlags (ADC_ETC_Type *base, adc_etc_external_trigger_source_t sourceIndex, uint32_t mask) |
Clears the ADC_ETC's interrupt status falgs. More... | |
static void | ADC_ETC_EnableDMA (ADC_ETC_Type *base, uint32_t triggerGroup) |
Enable the DMA corresponding to each trigger source. More... | |
static void | ADC_ETC_DisableDMA (ADC_ETC_Type *base, uint32_t triggerGroup) |
Disable the DMA corresponding to each trigger sources. More... | |
static uint32_t | ADC_ETC_GetDMAStatusFlags (ADC_ETC_Type *base) |
Get the DMA request status falgs. More... | |
static void | ADC_ETC_ClearDMAStatusFlags (ADC_ETC_Type *base, uint32_t mask) |
Clear the DMA request status falgs. More... | |
static void | ADC_ETC_DoSoftwareReset (ADC_ETC_Type *base, bool enable) |
When enable, all logical will be reset. More... | |
static void | ADC_ETC_DoSoftwareTrigger (ADC_ETC_Type *base, uint32_t triggerGroup) |
Do software trigger corresponding to each XBAR trigger sources. More... | |
uint32_t | ADC_ETC_GetADCConversionValue (ADC_ETC_Type *base, uint32_t triggerGroup, uint32_t chainGroup) |
Get ADC conversion result from external XBAR sources. More... | |
struct _adc_etc_config |
struct _adc_etc_trigger_chain_config |
struct _adc_etc_trigger_config |
#define FSL_ADC_ETC_DRIVER_VERSION (MAKE_VERSION(2, 2, 1)) |
Version 2.2.1.
#define ADC_ETC_DMA_CTRL_TRGn_REQ_MASK 0xFF0000U |
void ADC_ETC_Init | ( | ADC_ETC_Type * | base, |
const adc_etc_config_t * | config | ||
) |
base | ADC_ETC peripheral base address. |
config | Pointer to "adc_etc_config_t" structure. |
void ADC_ETC_Deinit | ( | ADC_ETC_Type * | base | ) |
base | ADC_ETC peripheral base address. |
void ADC_ETC_GetDefaultConfig | ( | adc_etc_config_t * | config | ) |
This function initializes the ADC_ETC's configuration structure with available settings. The default values are:
config | Pointer to "adc_etc_config_t" structure. |
void ADC_ETC_SetTriggerConfig | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
const adc_etc_trigger_config_t * | config | ||
) |
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. |
config | Pointer to "adc_etc_trigger_config_t" structure. |
void ADC_ETC_SetTriggerChainConfig | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
uint32_t | chainGroup, | ||
const adc_etc_trigger_chain_config_t * | config | ||
) |
For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means Trigger0 source's chain1 would be configurated.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
chainGroup | Trigger chain group index. Available number is 0~7. |
config | Pointer to "adc_etc_trigger_chain_config_t" structure. |
uint32_t ADC_ETC_GetInterruptStatusFlags | ( | ADC_ETC_Type * | base, |
adc_etc_external_trigger_source_t | sourceIndex | ||
) |
base | ADC_ETC peripheral base address. |
sourceIndex | trigger source index. |
void ADC_ETC_ClearInterruptStatusFlags | ( | ADC_ETC_Type * | base, |
adc_etc_external_trigger_source_t | sourceIndex, | ||
uint32_t | mask | ||
) |
base | ADC_ETC peripheral base address. |
sourceIndex | trigger source index. |
mask | Status flags mask of trigger. Refer to "_adc_etc_status_flag_mask". |
|
inlinestatic |
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
|
inlinestatic |
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
|
inlinestatic |
Only external XBAR sources support DMA request.
base | ADC_ETC peripheral base address. |
|
inlinestatic |
Only external XBAR sources support DMA request.
base | ADC_ETC peripheral base address. |
mask | Mask of external XBAR tirgger's DMA request asserted flags. Available range is trigger0:0x01 to trigger7:0x80. |
|
inlinestatic |
base | ADC_ETC peripheral base address. |
enable | Enable/Disable the software reset. |
|
inlinestatic |
Each XBAR trigger sources can be configured as HW or SW trigger mode. In hardware trigger mode, trigger source is from XBAR. In software mode, trigger source is from software tigger. TSC trigger sources can only work in hardware trigger mode.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
uint32_t ADC_ETC_GetADCConversionValue | ( | ADC_ETC_Type * | base, |
uint32_t | triggerGroup, | ||
uint32_t | chainGroup | ||
) |
For example, if triggerGroup is set to 0U and chainGroup is set to 1U, which means the API would return Trigger0 source's chain1 conversion result.
base | ADC_ETC peripheral base address. |
triggerGroup | Trigger group index. Available number is 0~7. |
chainGroup | Trigger chain group index. Available number is 0~7. |