ADC_DRV_ConfigChan function use problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC_DRV_ConfigChan function use problem

1,530 次查看
建宽高
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

标签 (1)
0 项奖励
回复
2 回复数

1,330 次查看
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 项奖励
回复

1,330 次查看
建宽高
Contributor III

3Q

0 项奖励
回复