<?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>topic Re: Re: Re: ADC interrupt / compare function in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353609#M17577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using the range comparison you have 2 different modes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Inside range&lt;UL&gt;&lt;LI&gt;A dual comparison is performed and if the input value is within the defined threshold values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) and the interrupt trigger enabled, an interrupt will be generated by the comparison, the COCO flag will be set and the result will be transferred to the result register.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Outside range&lt;UL&gt;&lt;LI&gt;A dual comparison is performed and if the input value is outside the defined threshold values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) and the interrupt trigger enabled, an interrupt will be generated by the comparison, the COCO flag will be set and the result will be transfered to the result register.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using the inside/outside range comparison you will have two different settings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Inclusive&lt;UL&gt;&lt;LI&gt;When the comparison is performed, the fringe values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) are taken into consideration.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Not inclusive&lt;UL&gt;&lt;LI&gt;When the comparison is performed, the fringe values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) are not taken into consideration; only greater or lesser values.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 19:45:24 GMT</pubDate>
    <dc:creator>apanecatl</dc:creator>
    <dc:date>2015-01-19T19:45:24Z</dc:date>
    <item>
      <title>ADC interrupt / compare function</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353606#M17574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a Kinetis MK10DX128VLH7 uC and would like to monitore an ADC value in bachground.&lt;/P&gt;&lt;P&gt;If the value is not in the calculated area, I would like to generate an interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this, I initialised the internal ADC0 with continous mode and the specific sample parameters.&lt;/P&gt;&lt;P&gt;Well, the initialisation and the interrupt works but I can only generate an interrupt when the calculated&lt;/P&gt;&lt;P&gt;value is reached, NOT if the value is beyond my calculated borders. (The datasheet says the same)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Now I generate an interrupt when my calculated value is reached&lt;/P&gt;&lt;P&gt;ADC0_CV1 = 0x6000;&lt;/P&gt;&lt;P&gt;ADC0_CV2 = 0x5000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, am I right just to switch the two values like this??&lt;/P&gt;&lt;P&gt;//Now I would like to generate an interrupt only when the ADC value is beyond my calculated area&lt;/P&gt;&lt;P&gt;ADC0_CV2 = 0x6000;&lt;/P&gt;&lt;P&gt;ADC0_CV1 = 0x5000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems to work but I'm not able to verify it in the moment...&lt;/P&gt;&lt;P&gt;Maybe someone can say me the rules for generating an interrupt&lt;/P&gt;&lt;P&gt;based on the two CV values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 17:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353606#M17574</guid>
      <dc:creator>pascalschröer</dc:creator>
      <dc:date>2015-01-17T17:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: ADC interrupt / compare function</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353607#M17575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would instead use the &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;Greater than or equal to threshold&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp; function to generate an interrupt when the analog input reaches your threshold value; for the range comparison I would use the &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;Outside range, inclusive&lt;/EM&gt;&lt;/STRONG&gt; function instead of changing the compare threshold (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADC0_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADC0_CV2&lt;/EM&gt;&lt;/STRONG&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 18:42:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353607#M17575</guid>
      <dc:creator>apanecatl</dc:creator>
      <dc:date>2015-01-19T18:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re: ADC interrupt / compare function</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353608#M17576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure, if I understand the text in the data sheet right:&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/ref_manual/K10P64M72SF1RM.pdf" title="http://cache.freescale.com/files/32bit/doc/ref_manual/K10P64M72SF1RM.pdf"&gt;http://cache.freescale.com/files/32bit/doc/ref_manual/K10P64M72SF1RM.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Refer to page 704:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="page" title="Page 704"&gt;&lt;SPAN style="line-height: 1.5em; color: #ff0000; font-size: 9pt; font-family: HelveticaLTStd;"&gt;Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2. &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 10pt; line-height: 1.5em; color: #ff0000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="section" style="background-color: rgb(100.000000%, 100.000000%, 100.000000%);"&gt;&lt;DIV class="column"&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Does it means that I &lt;STRONG&gt;only&lt;/STRONG&gt; generate an interrupt, if my measured value is &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. smaller than the CV1 value or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. taller than the CV2 value??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't find this meaning in the text....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 19:28:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353608#M17576</guid>
      <dc:creator>pascalschröer</dc:creator>
      <dc:date>2015-01-19T19:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: ADC interrupt / compare function</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353609#M17577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using the range comparison you have 2 different modes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Inside range&lt;UL&gt;&lt;LI&gt;A dual comparison is performed and if the input value is within the defined threshold values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) and the interrupt trigger enabled, an interrupt will be generated by the comparison, the COCO flag will be set and the result will be transferred to the result register.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Outside range&lt;UL&gt;&lt;LI&gt;A dual comparison is performed and if the input value is outside the defined threshold values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) and the interrupt trigger enabled, an interrupt will be generated by the comparison, the COCO flag will be set and the result will be transfered to the result register.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using the inside/outside range comparison you will have two different settings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Inclusive&lt;UL&gt;&lt;LI&gt;When the comparison is performed, the fringe values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) are taken into consideration.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Not inclusive&lt;UL&gt;&lt;LI&gt;When the comparison is performed, the fringe values (&lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV1&lt;/EM&gt;&lt;/STRONG&gt;, &lt;STRONG&gt;&lt;EM style="color: #0000ff;"&gt;ADCx_CV2&lt;/EM&gt;&lt;/STRONG&gt;) are not taken into consideration; only greater or lesser values.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 19:45:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353609#M17577</guid>
      <dc:creator>apanecatl</dc:creator>
      <dc:date>2015-01-19T19:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: ADC interrupt / compare function</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353610#M17578</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;okay thanks for your explanation! Now, it's clear!&lt;/P&gt;&lt;P&gt;I have probably skiped page 728 :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 08:01:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-interrupt-compare-function/m-p/353610#M17578</guid>
      <dc:creator>pascalschröer</dc:creator>
      <dc:date>2015-01-20T08:01:07Z</dc:date>
    </item>
  </channel>
</rss>

