<?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>LPC MicrocontrollersのトピックRe: Errors in &amp;quot;periph_adc&amp;quot; example for LPC11U68</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722191#M29180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark Johnson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for your feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Chip_ADC_StartCalibration warining&lt;/P&gt;&lt;P&gt;void Chip_ADC_StartCalibration(LPC_ADC_T *pADC)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint32_t save_ADC_CTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;save_ADC_CTRL = pADC-&amp;gt;CTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_ADC_SetClockRate(LPC_ADC, ADC_CALIBRATE_RATE);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL = (pADC-&amp;gt;CTRL | ADC_CR_CALMODEBIT) &amp;amp; ~ADC_CR_LPWRMODEBIT;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Yes, the save_ADC_CTRL is really not used in the code, the following code use pADC-&amp;gt;CTRL directly, but it doesn't matter, it won't influence the code function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;PIO0_12 mapped&lt;/SPAN&gt; problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have checked it on my side, you are right, it is really wrong, it should be IOCON_FUNC2 instead of IOCON_FUNC3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I already report this problem to our according department, any reply will let you know.&lt;/P&gt;&lt;P&gt;Thanks for your report.&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>Wed, 22 Nov 2017 08:14:07 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-11-22T08:14:07Z</dc:date>
    <item>
      <title>Errors in "periph_adc" example for LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722190#M29179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using theLPCXpresso11U68 Evaluation Board, the "periph_adc" example has a warning and&amp;nbsp;an invalid configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is from: lpcopen_3_01_lpcxpresso_lpcxpresso_11e68&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The warning is in &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Chip_ADC_StartCalibration()&lt;/SPAN&gt; because the variable &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;save_ADC_CTRL&lt;/SPAN&gt;&amp;nbsp; is set but not used.&amp;nbsp; Removing the declaration and assignment resolves the warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The invalid configuration is in the IOCON setup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;/* ADC input 8 is on PIO0_12 mapped to FUNC2 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 12, (IOCON_FUNC3 | IOCON_MODE_INACT |&amp;nbsp;IOCON_ADMODE_EN));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code sets the pin to Function 3 which is for the CT32B1 peripheral.&amp;nbsp; The comment is correct, Function 2 is for ADC_8.&amp;nbsp; Oddly enough, the ADC actually works with both&amp;nbsp;Function 2 and 3, but Function 2 is specified in the User's Manual Rev. 1.8.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 17:54:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722190#M29179</guid>
      <dc:creator>mjuggles</dc:creator>
      <dc:date>2017-11-20T17:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in "periph_adc" example for LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722191#M29180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark Johnson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for your feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. Chip_ADC_StartCalibration warining&lt;/P&gt;&lt;P&gt;void Chip_ADC_StartCalibration(LPC_ADC_T *pADC)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint32_t save_ADC_CTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;save_ADC_CTRL = pADC-&amp;gt;CTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_ADC_SetClockRate(LPC_ADC, ADC_CALIBRATE_RATE);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pADC-&amp;gt;CTRL = (pADC-&amp;gt;CTRL | ADC_CR_CALMODEBIT) &amp;amp; ~ADC_CR_LPWRMODEBIT;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Yes, the save_ADC_CTRL is really not used in the code, the following code use pADC-&amp;gt;CTRL directly, but it doesn't matter, it won't influence the code function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;PIO0_12 mapped&lt;/SPAN&gt; problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have checked it on my side, you are right, it is really wrong, it should be IOCON_FUNC2 instead of IOCON_FUNC3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I already report this problem to our according department, any reply will let you know.&lt;/P&gt;&lt;P&gt;Thanks for your report.&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>Wed, 22 Nov 2017 08:14:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722191#M29180</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-11-22T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Errors in "periph_adc" example for LPC11U68</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722192#M29181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark Johnson,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thanks a lot for your patience.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I have got the reply from our according department, it is the lpcopen code bug, it should be IOCON_FUNC2 instead of IOCON_FUNC3. This bug has been report.&lt;/P&gt;&lt;P&gt;&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>Thu, 30 Nov 2017 08:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Errors-in-quot-periph-adc-quot-example-for-LPC11U68/m-p/722192#M29181</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-11-30T08:53:09Z</dc:date>
    </item>
  </channel>
</rss>

