Assertion failed to read ADC1 potentio-meter TWR-K60D100M

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

Assertion failed to read ADC1 potentio-meter TWR-K60D100M

Jump to solution
697 Views
yarannan
Contributor III

1. I am using TWR-K60D100M

2. I am running my code based on KSDK1.1.0 and KDS 2.0

3.I use ADC1, and channel 20

4. From what I understand, instance is 1 since I use ADC1, and group channel is channel number which is 20

5. Please feel free to point out anything wrong.

I attached myentire KDS project below.

 

21817_21817.pngCapture2.PNG.png

Original Attachment has been moved to: adc_test.zip

Labels (1)
1 Solution
539 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Yaran,

In the function  : void ADC16_TEST_IntMode(uint32_t instance, uint32_t chnGroup, uint8_t chn)   ,

the "chn" is the channel number ,

the "chnGroup" is the adc channel group , for example , the ADC0 and ADC1 of k60 all  have two channel group.(or it also mean ADC1 have two adc converter . )

So it can configure as :

  ADC16_TEST_IntMode(1, 0, 20);

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

View solution in original post

0 Kudos
3 Replies
540 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Yaran,

In the function  : void ADC16_TEST_IntMode(uint32_t instance, uint32_t chnGroup, uint8_t chn)   ,

the "chn" is the channel number ,

the "chnGroup" is the adc channel group , for example , the ADC0 and ADC1 of k60 all  have two channel group.(or it also mean ADC1 have two adc converter . )

So it can configure as :

  ADC16_TEST_IntMode(1, 0, 20);

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

0 Kudos
539 Views
yarannan
Contributor III

Thanks! And do you know, does all of reading ADC need to be triggered by some hardware of software?

-Yaran

0 Kudos
541 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Yaran,

Do you mean trigger ADC ?

If yes , all of the ADC need trigger , while  SC1A is used for both software and hardware trigger modes of operation.

The SC1B–SC1n registers indicate potentially multiple SC1 registers for use only in hardware  trigger mode.

(the detail please see K60P144M100SF2VRM.PDF -> 35.3.1 ADC status and control registers ).

If you mean read the result of ADC, end of conversion , there will be a interrupt , then read the data of ADC   .

And under the KSDK1.1.0, there are ADC demo . (....\KSDK_1.1.0\demos).

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.