conflits when using several ADC components with KL25Z

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

conflits when using several ADC components with KL25Z

ソリューションへジャンプ
862件の閲覧回数
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 解決策
701件の閲覧回数
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 返答(返信)
702件の閲覧回数
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 件の賞賛
返信
701件の閲覧回数
ise1
Contributor III

Thanks Marek, this works fine :smileywink:

0 件の賞賛
返信