ADC_DRV_ConfigChan function use problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC_DRV_ConfigChan function use problem

925 Views
建宽高
Contributor III

when I USE ADC_DRV_ConfigChan   to config ADC ,  I have a problem about this function

This is the prototype of its function

/*!
* @brief Defines the control channel configuration
*
* This structure is used to configure a control channel
* of the ADC
*
* Implements : adc_chan_config_t_Class
*/
typedef struct
{
bool interruptEnable; /*!< Enable interrupts for this channel */
adc_inputchannel_t channel; /*!< Selection of input channel for measurement */
} adc_chan_config_t;

void ADC_DRV_ConfigChan(const uint32_t instance,const uint8_t chanIndex,const adc_chan_config_t *const config)

so,when i want to config adc chanel  11

so i use this

ADC_DRV_ConfigChan(XX,11,XX)

but it can not work !!!!

but i use this

adc_chan_config_t  test ={true,11}

ADC_DRV_ConfigChan(XX,XX,test )

it can work!!!!!!!!!!!!!!!!!!!!!!!!!!!

so,why?  Configure which parameters the channel selects?

3Q

Labels (1)
0 Kudos
2 Replies

725 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I assume you want to use SW trigger.

Please refer to adc_swtrigger_S32k144 SDK example.

pastedImage_1.png

Only channel 0 (SC1A) supports SW trigger.

And you can choose its input (SC1A[ADCH]).  

Regards,

Daniel

0 Kudos

725 Views
建宽高
Contributor III

3Q

0 Kudos