K10 ADC_LDD static sample group issue

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

K10 ADC_LDD static sample group issue

858 Views
gmorton
Contributor I

I'm using CodeWarrior Dev Studio SE 10.3. My project contains a K10 (MK10DN512VLL10) MCU, and I have added the ADC_LDD to my project as a component. I'm having issues getting the static sample groups set up under the component inspector. I've looked at the sample code with how to use this, but it doesn't make sense to me as written.

Here are my settings under component inspector:

Static Sample Groups : Enabled

Sample Group List: 1

Group 0:

     Sample List: 2

The Sample List started with a 1 in there, and there is only a + or - button to add to the list. I changed the 1 to a 2 and got this error:

"Only 1 samples are supported by this HW."

How do I create a list of the channels to add to the group?

Please advise.

Thanks.

Labels (1)
0 Kudos
3 Replies

423 Views
vfilip
NXP Employee
NXP Employee

Could you please post here the settings of the ADC_LDD component (or the *.pe file from the project). However I guess to avoid this issue is necessary to switch the ADC_LDD component to the Discontinuous mode. In this case the component allows to configure up to two channels within a group.

best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos

423 Views
gmorton
Contributor I

Here is my PE file.

0 Kudos

423 Views
vfilip
NXP Employee
NXP Employee

Hello,

I have opened your project and if I understand your task correctly you need to meausure 8 channels. The error message reported by PEx is correct (According to RM of K10 - K10 supports 1 result register for SW trigger mode and two result registers for HW trigger mode), it is not possible to get 8 results on one trigger but only one (two in HW trigger mode).

You need to select 8 Sample groups with one sample instead of 8 Samples within one group. Channel switching must be done by your app, for example by using the following method:

AD1_SelectSampleGroup(MyADCPtr, xU); /* Select sample group x */

*After end of channel 0 measurement you will swicth to 1 etc...

If it will not be clear I will prepare some example for you...

best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos