<?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: LPC5528: ADC at high resolution misses codes in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1562617#M50903</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls try to calibrate the ADC, then use the ADC example code to sample analog channel, then do the histogram.&lt;/P&gt;
&lt;P&gt;LPADC_Init(DEMO_LPADC_BASE, &amp;amp;mLpadcConfigStruct);&lt;/P&gt;
&lt;P&gt;LPADC_DoOffsetCalibration(DEMO_LPADC_BASE);&lt;/P&gt;
&lt;P&gt;LPADC_DoAutoCalibration(DEMO_LPADC_BASE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 07:43:02 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2022-12-01T07:43:02Z</dc:date>
    <item>
      <title>LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1559955#M50841</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using the LPC5528 on a custom board and ran code based on the &lt;STRONG&gt;"lpadc_interrupt" example&amp;nbsp;&lt;/STRONG&gt;(SDK version 2.12.0).&lt;/P&gt;&lt;P&gt;The ADC clock is at 18.5 MHz. The input of ADC0 is held at 1/2 Vcc (aka. half rail) using a simple voltage divider. Further, I output 2000 samples that are acquired as fast as possible.&lt;/P&gt;&lt;P&gt;This is the output plotted as a histogram when the ADC is configured in &lt;STRONG&gt;low-resolution&lt;/STRONG&gt; (full range contains 4096 code symbols):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data1-lores.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/201749iD354911ADD0A55BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="data1-lores.png" alt="data1-lores.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I change the code to configure the ADC in high-resolution using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define DEMO_LPADC_USE_HIGH_RESOLUTION 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the output plotted as a histogram when the ADC is configured in &lt;STRONG&gt;high-resolution&lt;/STRONG&gt; (full range contains 65536 code symbols) using&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data1.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/201750i93A9D0BEE18133C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="data1.png" alt="data1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a part of the histogram data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
 32761  73 
 32762  0
 32763  0
 32764  0
 32765  0
 32766  160  
 32767  0
 32768  1
 32769  0  
 32770  51  
 32771  0
 32772  0
 32773  0
 32774  342 
 32775  1  
 32776  0
 32777  0
 32778  45  
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Obviously some output codes are missing.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why is this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 12:01:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1559955#M50841</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-11-25T12:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1562617#M50903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls try to calibrate the ADC, then use the ADC example code to sample analog channel, then do the histogram.&lt;/P&gt;
&lt;P&gt;LPADC_Init(DEMO_LPADC_BASE, &amp;amp;mLpadcConfigStruct);&lt;/P&gt;
&lt;P&gt;LPADC_DoOffsetCalibration(DEMO_LPADC_BASE);&lt;/P&gt;
&lt;P&gt;LPADC_DoAutoCalibration(DEMO_LPADC_BASE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pls have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 07:43:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1562617#M50903</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-12-01T07:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1562925#M50913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as you know, the code I'm running is based on the "lpadc_interrupt" example from the SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Starting from there, I extended the example code by adding:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define DEMO_LPADC_DO_OFFSET_CALIBRATION true // changed to true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This enables offset calibration. In MCUXpresso IDE the code looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielholala_0-1669909427338.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202463iB2437751299CFDBB/image-size/large?v=v2&amp;amp;px=999" role="button" title="danielholala_0-1669909427338.png" alt="danielholala_0-1669909427338.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, the three lines of code that you provided are used in this example.&lt;/P&gt;&lt;P&gt;Running this code on LPCXpresso55S28 demo board with the input of ADC channel 0A (pin 4 of connector P19, i.e., pin 20 of MCU) held at 1/2 AVDD results in this histogram:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="data1.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/202464iD09E599773265566/image-size/large?v=v2&amp;amp;px=999" role="button" title="data1.png" alt="data1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This doesn't look any better. In fact, the result on the demo board is worse as conversion results are shifted towards higher values away from the "correct" 1/2 full scale value 🤨.&lt;/P&gt;&lt;P&gt;Any idea why this is and what I could try next?&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;Best regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 16:15:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1562925#M50913</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-01T16:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1564205#M50935</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Regarding the missing code of ADC result sample, I do not know if the design/test team has the spec, anyway, I have asked AE team, I will give you a reply after I get feedback.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun rong&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 08:00:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1564205#M50935</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-12-05T08:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1566485#M50973</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a sticky code issue on LPC55S28, which already confirm by design, will be fixed in future slicion version.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Due to deisgn request. Customer need to assign NDA if they want to see more details explanation on this.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 03:08:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1566485#M50973</guid>
      <dc:creator>alex_yang</dc:creator>
      <dc:date>2022-12-08T03:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1568119#M50992</link>
      <description>&lt;P&gt;Thanks for the information. I suggest to mention this ADC issue in the Errata Sheet (it's not discussed in version 2.2).&lt;/P&gt;&lt;P&gt;As workaround, one has to enable averaging, I guess. Do you see any other workaround?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 08:50:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1568119#M50992</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-12-12T08:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5528: ADC at high resolution misses codes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1722206#M54087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I see that this issue has not been documented in the&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/nxp/errata/LPC55S2x_LPC552x_ES.pdf" target="_self"&gt;errata sheet for LPC55S2x/LPC552x&lt;/A&gt;. I think it is important to know &lt;STRONG&gt;which silicon versions&lt;/STRONG&gt; are affected.&lt;/P&gt;&lt;P&gt;Further, I wonder whether the &lt;STRONG&gt;ADC in LPC553x&lt;/STRONG&gt; family exhibits missing codes, too.&lt;/P&gt;&lt;P&gt;Please advise!&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 16:10:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5528-ADC-at-high-resolution-misses-codes/m-p/1722206#M54087</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2023-09-13T16:10:32Z</dc:date>
    </item>
  </channel>
</rss>

