<?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: Loading previously generated ADC calibration values in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378627#M20071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some more concrete data to answer your question. following are calibration register values for 3 calibration cycles under the same conditions (same Voltage input). As you mentioned Bob, there is some difference in each one. To be honest, I can't tell if these are significant differences or not. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.02.15 PM 1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40417iC45DB059A24268CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.02.15 PM 1.png" alt="Screen Shot 2015-04-09 at 11.02.15 PM 1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.03.46 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47994i7D4A62B5CBAA5F51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.03.46 PM.png" alt="Screen Shot 2015-04-09 at 11.03.46 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.04.20 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49075i387B88A58CE47EB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.04.20 PM.png" alt="Screen Shot 2015-04-09 at 11.04.20 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Apr 2015 05:10:51 GMT</pubDate>
    <dc:creator>adrian11</dc:creator>
    <dc:date>2015-04-10T05:10:51Z</dc:date>
    <item>
      <title>Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378622#M20066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with KL16 ADC block. I want to be able to calibrate ADC once, save the values in flash, and then re-load them during the next boot without re-calibrating. According to the spec, this should be possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My calibration works perfectly, but loading of the registers does not. When restoring the values, I begin by running the adc configuration routine first, that sets up voltage reference, clock source, etc. Then, I simply loop through the registers 4003_B028 to 4003_B06C and copy the values from flash to those registers. I verified with memory view that all of the registers, including the control and status registers have the same values after the restoration of the calibration values, as they have after the calibration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something important here? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 02:55:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378622#M20066</guid>
      <dc:creator>adrian11</dc:creator>
      <dc:date>2015-04-06T02:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378623#M20067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have a direct answer for your questions.&lt;/P&gt;&lt;P&gt;I am curious why you want to use stored values?&lt;/P&gt;&lt;P&gt;Won't the calibration values change with ambient environment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something that I've noticed while doing testing is that resetting a KL25 or KL27 the calibration values are different from reset to reset, sometimes radically different.&lt;/P&gt;&lt;P&gt;Have you noticed this as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 19:20:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378623#M20067</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2015-04-06T19:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378624#M20068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My ADC is connected to a POT. My calibration values are pretty similar, as long as the POT is in the same position. I want to be able to calibrate the device once in mfg, in controlled environment and then restore those values later. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 23:06:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378624#M20068</guid>
      <dc:creator>adrian11</dc:creator>
      <dc:date>2015-04-06T23:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378625#M20069</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;Sorry for my later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had done a test. That should be ok for customer to load ADC calibration value to ADC module related registers.&lt;/P&gt;&lt;P&gt;Please check my test code below and the ADC conversion result is also OK.&lt;/P&gt;&lt;P&gt;void manual_ADC1_CAL(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_OFS&amp;nbsp;&amp;nbsp; = 0xFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_PG&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x8309;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_MG&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x8306;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLPD&amp;nbsp; = 0x14;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLPS&amp;nbsp; = 0x31;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLP4&amp;nbsp; = 0x303;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLP3&amp;nbsp; = 0x187;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLP2&amp;nbsp; = 0xC4;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLP1&amp;nbsp; = 0x62;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLP0&amp;nbsp; = 0x31;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLMD&amp;nbsp; = 0x15;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLMS&amp;nbsp; = 0x31;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLM4&amp;nbsp; = 0x302;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLM3&amp;nbsp; = 0x186;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLM2&amp;nbsp; = 0xC2;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLM1&amp;nbsp; = 0x61;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC1_CLM0&amp;nbsp; = 0x30;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&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>Thu, 09 Apr 2015 06:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378625#M20069</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-04-09T06:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378626#M20070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell me what happens before and after you write to the calibration registers? Do you set up the rest of ADC before? Do you still trigger the real calibration and then overwrite the values? Or can you just overwrite the values whenever you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for running this test for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my values that are read back from flash and loaded into ADC registers:&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 10.34.49 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51694i06E25E7A2F92B95B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 10.34.49 PM.png" alt="Screen Shot 2015-04-09 at 10.34.49 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 21:58:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378626#M20070</guid>
      <dc:creator>adrian11</dc:creator>
      <dc:date>2015-04-09T21:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378627#M20071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some more concrete data to answer your question. following are calibration register values for 3 calibration cycles under the same conditions (same Voltage input). As you mentioned Bob, there is some difference in each one. To be honest, I can't tell if these are significant differences or not. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.02.15 PM 1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40417iC45DB059A24268CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.02.15 PM 1.png" alt="Screen Shot 2015-04-09 at 11.02.15 PM 1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.03.46 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47994i7D4A62B5CBAA5F51/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.03.46 PM.png" alt="Screen Shot 2015-04-09 at 11.03.46 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2015-04-09 at 11.04.20 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49075i387B88A58CE47EB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2015-04-09 at 11.04.20 PM.png" alt="Screen Shot 2015-04-09 at 11.04.20 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 05:10:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378627#M20071</guid>
      <dc:creator>adrian11</dc:creator>
      <dc:date>2015-04-10T05:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378628#M20072</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;Please check my test code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; // REPEAT for BOTH ADC's.&amp;nbsp; However we will only 'use' the results from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the ADC wired to the Potentiometer on the Kinetis Tower Card.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Repeating for ADC1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC_Config_Alt(ADC1_BASE_PTR, &amp;amp;Master_Adc_Config);&amp;nbsp; // config ADC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADC1 registers value is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ADC register 1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49277i52BFE589293DC0DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ADC register 1.png" alt="ADC register 1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ADC_Cal(ADC1_BASE_PTR);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do the calibration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do manual ADC1 calibratin here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; manual_ADC1_CAL();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After manual calibration ADC1 registers value is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ADC register 2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49323iFC0E867A9FDE04FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ADC register 2.png" alt="ADC register 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // config the ADC again to default conditions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC_Config_Alt(ADC1_BASE_PTR, &amp;amp;Master_Adc_Config);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that code, ADC1 registers value is :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ADC register 3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49385i36D07A19668B2A50/image-size/large?v=v2&amp;amp;px=999" role="button" title="ADC register 3.png" alt="ADC register 3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't run the ADC calibration , just load the ADC calibration value into the related registers.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&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>Mon, 13 Apr 2015 05:48:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378628#M20072</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-04-13T05:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Loading previously generated ADC calibration values</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378629#M20073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your patience. I was able to figure out my problem. I had an issue elsewhere in my application that was skewing my results. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:34:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Loading-previously-generated-ADC-calibration-values/m-p/378629#M20073</guid>
      <dc:creator>adrian11</dc:creator>
      <dc:date>2015-04-14T17:34:53Z</dc:date>
    </item>
  </channel>
</rss>

