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.
Original Attachment has been moved to: adc_test.zip
Solved! Go to Solution.
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.
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.
Thanks! And do you know, does all of reading ADC need to be triggered by some hardware of software?
-Yaran
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.