<?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: How to perform ADC Calibration in Vybrid Processors</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246315#M858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its unfortunate NXP was not able to help us (they claim 0 value output is the correct value, but&amp;nbsp;according to my testing it was&amp;nbsp;always 0 on several chips),&amp;nbsp;&amp;nbsp;as workaround reduces accuracy to perhaps marginal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2018 18:05:40 GMT</pubDate>
    <dc:creator>annan</dc:creator>
    <dc:date>2018-10-12T18:05:40Z</dc:date>
    <item>
      <title>How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246307#M850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having some trouble getting the ADC calibration to work. The description in Rev 4 of the RM refers to an "ADC_TEST" register which is not described in the interface description. Also, the expected effect of the calibration on the register is not explained, namely, does the correct value get put into the ADC_CAL register automatically, or must it be copied there from R1 (which incidentally shows up as R0 in the Peripheral display under DS-5). I don't see the CALF flag but the only "interesting" register content is a small number (2 or 3) in R0 (R1). ADCn_CAL is still 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal data acquisition is working fine; I'm using a PIT interrupt to sample at 1 KHz and then start another conversion. It's just the calibration that is giving me trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&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;Charlie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 19:11:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246307#M850</guid>
      <dc:creator>charliecheney</dc:creator>
      <dc:date>2013-06-28T19:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246308#M851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Charlie,&lt;/P&gt;&lt;P&gt;Before we dig deeper, may tell me if you looked into our Vybrid BSP (Board Support Platform), please? – E.g., examples for the 2 supported OSs:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MQX: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.freescale.com/webapp/sps/site/overview.jsp?code=MQXSWDW"&gt;http://www.freescale.com/webapp/sps/site/overview.jsp?code=MQXSWDW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Linux: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://linuxlink.timesys.com/register/freescale"&gt;https://linuxlink.timesys.com/register/freescale&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its function is two-fold:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;It contains information required for our customers to develop software. Some of them copy fragments from it; some, based on our code and comments, analyze the algorithm and develop their own code. All this is done to "answer in advance" all the possible future specific questions similar to those you are asking.&lt;/LI&gt;&lt;LI&gt;Quite often it clarifies aspects not always fully covered in our non-final documentation.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely yours, Naoum Gitnik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 23:04:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246308#M851</guid>
      <dc:creator>naoumgitnik</dc:creator>
      <dc:date>2013-06-28T23:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246309#M852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning Naoum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the OS from MQX4.0.1. However, this is only an interim solution since our Vybrid product will actually use AutoSAR (customer requirement).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, I have used some of the I/O from MQX, however, we have a lot of mid level code which will be reused for this project and it requires a specific API and level of performance from the low level drivers. Therefore I am using the MQX I/O only as an interim solution where necessary (e.g., I used the UART driver initially, however, it does not have enough throughput for our application, so I have replaced it with a solution using DMA).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case, I felt the A/D peripheral was simple enough that it would be no big deal to write a driver for it, and in fact had no difficulty getting basic conversions working simply by reading the RM. However, the calibration does not appear to work exactly as described in the RM. I looked at the MQX source code for an A/D driver but it didn’t really tell me much (and I’m not even sure it’s for the Vybrid). In particular, the RM says to poll the CAL flag and then check CALF. It seems that the calibration may still be in progress when CAL clears.&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;Charlie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 11:02:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246309#M852</guid>
      <dc:creator>charliecheney</dc:creator>
      <dc:date>2013-07-01T11:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246310#M853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Charlie,&lt;/P&gt;&lt;P&gt;Please find our comments below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;Q1. &lt;/P&gt;&lt;P&gt;… some trouble getting the ADC calibration to work:&lt;/P&gt;&lt;P&gt;The description in Rev 4 of the RM refers to the "ADC_TEST" register, which is not described in the interface description. &lt;/P&gt;&lt;P&gt;A1. &lt;/P&gt;&lt;P&gt;This register is for internal use only (to be removed from the&amp;nbsp; text), and all the customers have to know is that its default value is already set for calibration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2. &lt;/P&gt;&lt;P&gt;Also, the expected effect of the calibration on the register is not explained - namely, does the correct value get put into the ADC_CAL register automatically, or must it be copied there from R1 (which incidentally shows up as R0 in the Peripheral display under DS-5)? &lt;/P&gt;&lt;P&gt;I don't see the CALF flag but the only "interesting" register content is a small number (2 or 3) in R0 (R1), ADCn_CAL still being 0.&lt;/P&gt;&lt;P&gt;A2. &lt;/P&gt;&lt;P&gt;As defined in the Calibration section, after setting the CAL bit (bit 7) in ADC_GC, the user has to monitor this bit only to check when it goes zero (0) automatically.&lt;/P&gt;&lt;P&gt;At the end of calibration the user has to check the CALF bit of ADC_GS - if it equals 1 when the calibration failed. When passed, the calibrated value is automatically loaded into the&amp;nbsp; ADC_CAL[CAL_CODE] field.&lt;/P&gt;&lt;P&gt; Also, as mentioned in the Calibration section, if a user applies reset after calibration, then either re-calibration is required or the user has to save the prior calibration value and re-write it back once the reset state is over. The ADC has only one reset input, and if this reset is applied, re-calibration or&amp;nbsp; loading of&amp;nbsp; CAL_CODE saved from the earlier Calibration run is needed. &lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Q3.&lt;/P&gt;&lt;P&gt; I don't see the CALF flag, but the only "interesting" register content is a small number (2 or 3) in R0 (R1), ADCn_CAL still being 0.&lt;/P&gt;&lt;P&gt;A3.&lt;/P&gt;&lt;P&gt;If still relevant, may you &lt;SPAN style="background: white;"&gt;give additional details&lt;/SPAN&gt; of this, please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q4.&lt;/P&gt;&lt;P&gt;Normal data acquisition is working fine; I'm using a PIT interrupt to sample at 1 KHz and then start another conversion. It's just the calibration that is giving me trouble…&lt;/P&gt;&lt;P&gt;…I … had no difficulty getting basic conversions working simply by reading the RM. However, the calibration does not appear to work exactly as described in the RM. … the MQX source code … didn’t really tell me much (and I’m not even sure it’s for the Vybrid). In particular, the RM says to poll the CAL flag and then check CALF. It seems that the calibration may still be in progress when CAL clears.&lt;/P&gt;&lt;P&gt;A4.&lt;/P&gt;&lt;P&gt;It is supposed to work as described. The user has to check the CAL bit of ADC_GC after setting it. &lt;/P&gt;&lt;P&gt;It automatically clears when calibration is over, and the result can then be seen in CALF bit (0=pass, 1=fail). The ADC_CAL[CAL_CODE] is automatically loaded if it passes. &lt;/P&gt;&lt;P&gt;The user also can choose to get interrupt instead of polling the CAL bit as described in our documentation:&lt;/P&gt;&lt;P&gt;“At the end of a calibration sequence the COCO[0] bit of the ADC_HS register will be set.&lt;/P&gt;&lt;P&gt;The ADC_HCn[AIEN] bit can be used to allow an interrupt to occur at the end of a calibration sequence. If, at the end of calibration routine, the CALF bit is not set, the automatic calibration routine completed successfully.”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely yours, Naoum Gitnik.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 22:13:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246310#M853</guid>
      <dc:creator>naoumgitnik</dc:creator>
      <dc:date>2013-07-08T22:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246311#M854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. I observe the same issue with self-calibration of no value being written to ADC1_CAL after calibration completes successfully (CAL bit clears and CALF bit is not set). However some value getting written to ADC1_R0. This happens when VBGH/VBGL is selected as voltage reference, but if VREFH/VREFL with all other settings being the same, the calibration gives results in the ADC1_CAL.&amp;nbsp; In the first case where VBGH/VBHL is selected and calibration does not have any results, subsequent conversions seem to have significant offset from the true value. Any suggestions?&lt;/P&gt;&lt;P&gt;2. I need ADC performance/accuracy characterization with internal bandgap used as voltage reference. How can I get that data?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 20:22:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246311#M854</guid>
      <dc:creator>annan</dc:creator>
      <dc:date>2016-02-03T20:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246312#M855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anna,&lt;/P&gt;&lt;P&gt;Did you resolve this issue? &amp;nbsp;I am having something similar.&lt;/P&gt;&lt;P&gt;If you can, please post the code/solution.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Tomasz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 21:25:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246312#M855</guid>
      <dc:creator>tomaszsliwinski</dc:creator>
      <dc:date>2018-10-01T21:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246313#M856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tomasz,&lt;/P&gt;&lt;P&gt;No this issue was not resolved, we resorted to&amp;nbsp;just one-time 'manual' calibration in our manufacturing process.&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 22:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246313#M856</guid>
      <dc:creator>annan</dc:creator>
      <dc:date>2018-10-11T22:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246314#M857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anna,&lt;/P&gt;&lt;P&gt;Thanks for the update. &amp;nbsp;Glad you found a workaround.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tomasz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 16:25:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246314#M857</guid>
      <dc:creator>tomaszsliwinski</dc:creator>
      <dc:date>2018-10-12T16:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform ADC Calibration</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246315#M858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its unfortunate NXP was not able to help us (they claim 0 value output is the correct value, but&amp;nbsp;according to my testing it was&amp;nbsp;always 0 on several chips),&amp;nbsp;&amp;nbsp;as workaround reduces accuracy to perhaps marginal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 18:05:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/How-to-perform-ADC-Calibration/m-p/246315#M858</guid>
      <dc:creator>annan</dc:creator>
      <dc:date>2018-10-12T18:05:40Z</dc:date>
    </item>
  </channel>
</rss>

