<?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 Chip_ADC_StartCalibration in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622078#M24377</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;In &lt;STRONG&gt;adc_8xx.c&lt;/STRONG&gt; there is a function to calibrate the ADC: &lt;STRONG&gt;Chip_ADC_StartCalibration:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;/* Start ADC calibration */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;void Chip_ADC_StartCalibration(LPC_ADC_T *pADC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Set calibration mode */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL |= ADC_CR_CALMODEBIT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clear ASYNC bit */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL &amp;amp;= ~ADC_CR_ASYNMODE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Setup ADC for about 500KHz (per UM) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_ADC_SetClockRate(pADC, 500000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clearn low power bit */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL &amp;amp;= ~ADC_CR_LPWRMODEBIT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Calibration is only complete when ADC_CR_CALMODEBIT bit has cleared */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;I am working with a LPC824. Why is firstly the &lt;SPAN style="font-size: 12px;"&gt;/*Set calibration mode*/&lt;/SPAN&gt;?, s&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;houldn't it be last after the &lt;SPAN style="font-size: 12px;"&gt;500KHz SetClockRate&lt;/SPAN&gt;?.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;And other cuestion, what does it mean by &lt;SPAN style="font-size: 11px;"&gt;ADC_CR_CALMODEBIT&lt;SPAN style="font-size: 15px;"&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp; it says in UM10800.pdf at page 327 "21.6.1 ADC Control Register"&amp;nbsp; that the bit 8 (the corresponding of &lt;SPAN style="font-size: 11px;"&gt;ADC_CR_CALMODEBIT&lt;/SPAN&gt;) is reserved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Thanks so much and regards. Daniel.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Mar 2017 10:19:50 GMT</pubDate>
    <dc:creator>vaque</dc:creator>
    <dc:date>2017-03-27T10:19:50Z</dc:date>
    <item>
      <title>Chip_ADC_StartCalibration</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622078#M24377</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;In &lt;STRONG&gt;adc_8xx.c&lt;/STRONG&gt; there is a function to calibrate the ADC: &lt;STRONG&gt;Chip_ADC_StartCalibration:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;/* Start ADC calibration */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;void Chip_ADC_StartCalibration(LPC_ADC_T *pADC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Set calibration mode */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL |= ADC_CR_CALMODEBIT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clear ASYNC bit */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL &amp;amp;= ~ADC_CR_ASYNMODE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Setup ADC for about 500KHz (per UM) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_ADC_SetClockRate(pADC, 500000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clearn low power bit */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL &amp;amp;= ~ADC_CR_LPWRMODEBIT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Calibration is only complete when ADC_CR_CALMODEBIT bit has cleared */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;I am working with a LPC824. Why is firstly the &lt;SPAN style="font-size: 12px;"&gt;/*Set calibration mode*/&lt;/SPAN&gt;?, s&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;houldn't it be last after the &lt;SPAN style="font-size: 12px;"&gt;500KHz SetClockRate&lt;/SPAN&gt;?.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;And other cuestion, what does it mean by &lt;SPAN style="font-size: 11px;"&gt;ADC_CR_CALMODEBIT&lt;SPAN style="font-size: 15px;"&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp; it says in UM10800.pdf at page 327 "21.6.1 ADC Control Register"&amp;nbsp; that the bit 8 (the corresponding of &lt;SPAN style="font-size: 11px;"&gt;ADC_CR_CALMODEBIT&lt;/SPAN&gt;) is reserved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Thanks so much and regards. Daniel.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:19:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622078#M24377</guid>
      <dc:creator>vaque</dc:creator>
      <dc:date>2017-03-27T10:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_ADC_StartCalibration</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622079#M24378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Answer your two questions:&lt;/P&gt;&lt;P&gt;1. &lt;SPAN style="font-size: 15px;"&gt;Why is firstly the &lt;SPAN style="font-size: 12px;"&gt;/*Set calibration mode*/&lt;/SPAN&gt;?, s&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;houldn't it be last after the &lt;SPAN style="font-size: 12px;"&gt;500KHz SetClockRate&lt;/SPAN&gt;?.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is the calibration correct cycle, the chip just design it like this, you can't change the operation sequence.&lt;/P&gt;&lt;P&gt;You can find it from chapter:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16029i6C44C1B5A9DA244C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-size: 15px;"&gt;what does it mean by &lt;SPAN style="font-size: 11px;"&gt;ADC_CR_CALMODEBIT?&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CALMODE it bit 30, you can find it from the user manual:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16081i5EB8EB96703C7FF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think maybe you want to ask ADC_CR_ASYNMODE, it is bit 8, I think it just want to clear these bit.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15813i6307001D25477016/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Tue, 28 Mar 2017 07:12:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622079#M24378</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-28T07:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_ADC_StartCalibration</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622080#M24379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A ___default_attr="215657" _jive_internal="true" data-avatarid="1015" data-externalid="" data-online="false" data-orig-content="Kerry Zhou" data-presence="null" data-userid="215657" data-username="kerryzhou" href="https://community.nxp.com/people/kerryzhou" jivemacro="user" title="Kerry Zhou"&gt;Kerry Zhou&lt;/A&gt;&amp;nbsp; thanks so much. You are aright, I wanted to ask about ADC_CR_ASYNMODE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot! Regards. Daniel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 10:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-ADC-StartCalibration/m-p/622080#M24379</guid>
      <dc:creator>vaque</dc:creator>
      <dc:date>2017-03-28T10:39:53Z</dc:date>
    </item>
  </channel>
</rss>

