conflits when using several ADC components with KL25Z

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

conflits when using several ADC components with KL25Z

跳至解决方案
678 次查看
ise1
Contributor III

Hello everybody ! :smileywink:
I have some trouble with using several analog sensor. In fact I need for my project to get values from 4 analog sensor each 100 ms.
I know that the KL25Z board has only one ADC but I'm sure that the ADC can be shared to different analog component.
Here is what I've done: I've declared two ADC component at PTC2 and PTB3 pins. I've selected the "shared" option but I get the error message "The shared mode is not supported on this version of module". What can I do to share the ADC to each analog component ? and why the shared mode is not supported here ?
When the sharing option is unselected, I get the error message "error in the inherited component" because ADC_LDD is already used by the other ADC component.
I hope you will be able to help me.
Thank you in advance :smileywink:

0 项奖励
回复
1 解答
517 次查看
marek_neuzil
NXP Employee
NXP Employee

Hello Sebastien,

You needn't two ADC_LDD component in your project to measure two channels. Use one instance of ADC_LDD in your application and add one channel into the ADC_LDD component (so you have two channels in the ADC_LDD component that can be measured), see the following screenshot:

ADC Channels usage.png

You can also enable static sample groups, define one sample group for each channel and use methods SelectSampleGroup and StartSingleMeasurement for measuring these channels (software triggering). Or you can use (hardware) triggers, see the Trigger group in the Compnent Inspector.

For details see the help of the ADC_LDD component. There is also an example of typical usage.

Best Regards,

Marek Neuzil

在原帖中查看解决方案

0 项奖励
回复
2 回复数
518 次查看
marek_neuzil
NXP Employee
NXP Employee

Hello Sebastien,

You needn't two ADC_LDD component in your project to measure two channels. Use one instance of ADC_LDD in your application and add one channel into the ADC_LDD component (so you have two channels in the ADC_LDD component that can be measured), see the following screenshot:

ADC Channels usage.png

You can also enable static sample groups, define one sample group for each channel and use methods SelectSampleGroup and StartSingleMeasurement for measuring these channels (software triggering). Or you can use (hardware) triggers, see the Trigger group in the Compnent Inspector.

For details see the help of the ADC_LDD component. There is also an example of typical usage.

Best Regards,

Marek Neuzil

0 项奖励
回复
517 次查看
ise1
Contributor III

Thanks Marek, this works fine :smileywink:

0 项奖励
回复