<?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: LPC15xx ADC maximum sample rate</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582164#M20610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do NXP people read this forum?&lt;/P&gt;&lt;P&gt;I would be glad to hear a comment from them...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jul 2016 09:01:25 GMT</pubDate>
    <dc:creator>martinlorenz</dc:creator>
    <dc:date>2016-07-25T09:01:25Z</dc:date>
    <item>
      <title>LPC15xx ADC maximum sample rate</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582163#M20609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am just examining the ADC example code periph_adc of LPCXpresso for LPC1549 and I found a strange issue:&lt;/P&gt;&lt;P&gt;The example code uses&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;/* Setup for maximum ADC clock rate */&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_ADC_SetClockRate(LPC_ADC0, ADC_MAX_SAMPLE_RATE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which uses ADC_MAX_SAMPLE_RATE=50e6, the maximum ADC conversion rate of 50MHz for the 12bit ADC as given in the manual. So far so good, but stepping through the code reveals that this call translates into:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;/* Set ADC clock rate */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;void Chip_ADC_SetClockRate(LPC_ADC_T *pADC, uint32_t rate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t div;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Get ADC clock source to determine base ADC rate. IN sychronous mode,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the ADC base clock comes from the system clock. In ASYNC mode, it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comes from the ASYNC ADC clock and this function doesn't work. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; div = Chip_Clock_GetSystemClockRate() / rate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (div == 0) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; div = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_ADC_SetDivider(pADC, (uint8_t) div - 1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;and the divider is set to div=72e6/50e6=1. So actually, the ADC runs with an clock rate of 72MHz which is &lt;STRONG&gt;above&lt;/STRONG&gt; the specified 50MHz maximum rate. I would have expected that the CPU clock of 72MHz is divided by 2 to get 36MHz which is below the maximum value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Even more strange: The ADC seems to work quite well with 72MHz clock. I was sampling a &lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt; 50kHz &lt;/SPAN&gt;sinus signal with 72MHz/26=2.77MHz sample rate (one conversion takes 26 cycles and not 25 as given in the manual) and I got reasonable noise (on the least significant bit) and reasonable distortions/non-linearities (looking on the harmonics after FFT).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Dear NXP support, can you please state on this issue? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;How safe is it to operate the ADC out of limits, as given in the example code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Will the example code be corrected? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Or will the specification be corrected, if it is save to run the ADC with 72MHz?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Do other users have experience with operating the ADC with 72MHz clock rate?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;Regards, Martin&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 08:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582163#M20609</guid>
      <dc:creator>martinlorenz</dc:creator>
      <dc:date>2016-07-18T08:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC15xx ADC maximum sample rate</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582164#M20610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do NXP people read this forum?&lt;/P&gt;&lt;P&gt;I would be glad to hear a comment from them...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 09:01:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582164#M20610</guid>
      <dc:creator>martinlorenz</dc:creator>
      <dc:date>2016-07-25T09:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC15xx ADC maximum sample rate</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582165#M20611</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;We do recommend customer to use the LPC1549 ADC module with Max. ADC clock 50MHz.&lt;/P&gt;&lt;P&gt;We could not guarantee the LPC1549 ADC module performance if ADC clock exceed 50MHz, especially for long term working.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&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, 02 Aug 2016 08:19:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582165#M20611</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-08-02T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: LPC15xx ADC maximum sample rate</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582166#M20612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has been reported to the developers, thanks for reporting this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Carlos Mendoza&lt;/P&gt;&lt;P&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC15xx-ADC-maximum-sample-rate/m-p/582166#M20612</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2016-08-03T14:45:43Z</dc:date>
    </item>
  </channel>
</rss>

