<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Kinetis MicrocontrollersのトピックRe: ADC ISR between threshold</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616175#M36693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yasar Arafath,&lt;/P&gt;&lt;P&gt;I do not quite understand "But that gives interrupt when even 1 ADC sample also changed." &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The ADC module has this feature: Automatic compare with interrupt for less-than, greater-than or equal-to, within range, or out-of-range, programmable value.&lt;BR /&gt;You can have a look at section "28.4.5 Automatic compare function" in &lt;A href="http://www.nxp.com/assets/documents/data/en/reference-manuals/KL16P80M48SF4RM.pdf"&gt;KL16P80M48SF4RM&lt;/A&gt;:&lt;BR /&gt;If the condition selected evaluates true, SC1n[COCO] is set.&amp;nbsp; An ADC interrupt is generated when SC1n[COCO] is set and the respective ADC interrupt is enabled, that is, SC1n[AIEN]=1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Compare modes.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12562i2362047983CFDCDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Compare modes.png" alt="Compare modes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you using &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fproducts%2Fsoftware-and-tools%2Fhardware-development-tools%2Ffreedom-development-boards%2Fkinetis-design-studio-integrated-development-environment-ide%3AKDS_IDE" rel="nofollow" target="_blank"&gt;Kinetis Design Studio IDE&lt;/A&gt;.&amp;nbsp; CodeWarrior IDE Support to Change for Kinetis® Devices. &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fassets%2Fdocuments%2Fdata%2Fen%2Fsupporting-information%2FCWIDESUPPORTAD.pdf" rel="nofollow" target="_blank"&gt;Read More&lt;/A&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;The interrupt example of adc16 in&amp;nbsp;&lt;A href="https://mcuxpresso.nxp.com/en/builder"&gt;SDK_2.0_MKL16Z256xxx4&lt;/A&gt; can be used to evaluate automatic compare function.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SDK_2.0_MKL16Z256xxx4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12606i75A4BD80C94F41A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="SDK_2.0_MKL16Z256xxx4.png" alt="SDK_2.0_MKL16Z256xxx4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;You just need add ADC16_SetHardwareCompareConfig() function to realize automatic compare function.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;You can getting start with KSDK and KDS from reading below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;"&lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-content-finding="Community" data-objectid="329631" data-objecttype="102" href="https://community.nxp.com/docs/DOC-329631"&gt;How to start with KSDK&lt;/A&gt;"&amp;nbsp; and "&lt;A _jive_internal="true" data-containerid="11213" data-containertype="14" data-content-finding="Community" data-objectid="330200" data-objecttype="102" href="https://community.nxp.com/docs/DOC-330200"&gt;KDS Document List&lt;/A&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2016 08:54:31 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2016-12-16T08:54:31Z</dc:date>
    <item>
      <title>ADC ISR between threshold</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616173#M36691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using kl16 processor and I am using ADC peripheral as a part of my application. In ADC I want to write an ISR which has to&amp;nbsp;get&amp;nbsp;an interrupt when ADC value is between some threshold. So how can I do this? I tried the example code from codewarrior examples. But that gives interrupt when even 1 ADC sample also changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has idea on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Yasar Arafath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 16:29:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616173#M36691</guid>
      <dc:creator>yasararafathcs</dc:creator>
      <dc:date>2016-12-15T16:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: ADC ISR between threshold</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616174#M36692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please check chapter 2 of the following document: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerADC.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerADC.pdf&lt;/A&gt;&lt;BR /&gt;Is this what you require to do?&lt;BR /&gt;If so, it is available integrated in the uTasker project (as described) and also allows the operation to be simulated in the uTasker Kinetis simulator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;SPAN&gt;KL16 - &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-KL27Z.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-KL27Z.html&lt;/A&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FCapuccino-KL27.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/Capuccino-KL27.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 18:26:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616174#M36692</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-12-15T18:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: ADC ISR between threshold</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616175#M36693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yasar Arafath,&lt;/P&gt;&lt;P&gt;I do not quite understand "But that gives interrupt when even 1 ADC sample also changed." &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The ADC module has this feature: Automatic compare with interrupt for less-than, greater-than or equal-to, within range, or out-of-range, programmable value.&lt;BR /&gt;You can have a look at section "28.4.5 Automatic compare function" in &lt;A href="http://www.nxp.com/assets/documents/data/en/reference-manuals/KL16P80M48SF4RM.pdf"&gt;KL16P80M48SF4RM&lt;/A&gt;:&lt;BR /&gt;If the condition selected evaluates true, SC1n[COCO] is set.&amp;nbsp; An ADC interrupt is generated when SC1n[COCO] is set and the respective ADC interrupt is enabled, that is, SC1n[AIEN]=1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Compare modes.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12562i2362047983CFDCDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Compare modes.png" alt="Compare modes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you using &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fproducts%2Fsoftware-and-tools%2Fhardware-development-tools%2Ffreedom-development-boards%2Fkinetis-design-studio-integrated-development-environment-ide%3AKDS_IDE" rel="nofollow" target="_blank"&gt;Kinetis Design Studio IDE&lt;/A&gt;.&amp;nbsp; CodeWarrior IDE Support to Change for Kinetis® Devices. &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fassets%2Fdocuments%2Fdata%2Fen%2Fsupporting-information%2FCWIDESUPPORTAD.pdf" rel="nofollow" target="_blank"&gt;Read More&lt;/A&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;The interrupt example of adc16 in&amp;nbsp;&lt;A href="https://mcuxpresso.nxp.com/en/builder"&gt;SDK_2.0_MKL16Z256xxx4&lt;/A&gt; can be used to evaluate automatic compare function.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SDK_2.0_MKL16Z256xxx4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12606i75A4BD80C94F41A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="SDK_2.0_MKL16Z256xxx4.png" alt="SDK_2.0_MKL16Z256xxx4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;You just need add ADC16_SetHardwareCompareConfig() function to realize automatic compare function.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;You can getting start with KSDK and KDS from reading below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;"&lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-content-finding="Community" data-objectid="329631" data-objecttype="102" href="https://community.nxp.com/docs/DOC-329631"&gt;How to start with KSDK&lt;/A&gt;"&amp;nbsp; and "&lt;A _jive_internal="true" data-containerid="11213" data-containertype="14" data-content-finding="Community" data-objectid="330200" data-objecttype="102" href="https://community.nxp.com/docs/DOC-330200"&gt;KDS Document List&lt;/A&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 08:54:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616175#M36693</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2016-12-16T08:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: ADC ISR between threshold</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616176#M36694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am checking the same. Also I have another doubt like from that document how to get interrupt only for ADC0_SE0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Yasar Arafath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 15:38:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616176#M36694</guid>
      <dc:creator>yasararafathcs</dc:creator>
      <dc:date>2016-12-16T15:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: ADC ISR between threshold</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616177#M36695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I want interrupt with ranges. So I mentioned "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;But that gives interrupt when even 1 ADC sample also changed.&lt;/SPAN&gt;" Now I got the clarity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded the SDK. I will try with that and get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Yasar Arafath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 16:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-ISR-between-threshold/m-p/616177#M36695</guid>
      <dc:creator>yasararafathcs</dc:creator>
      <dc:date>2016-12-16T16:00:44Z</dc:date>
    </item>
  </channel>
</rss>

