<?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: LPC55s69 LPADC  Calibration code</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954992#M37920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, HyMai,&lt;/P&gt;&lt;P&gt;I think you can download the latest SDK package based on LPC55S69 SDK_2.6.3_LPCXpresso55S69.zip and use the latest MCUXpresso tools ver11.0.1, and load the lpadc_interrupt example. You do not need to change anything, it do calibration exactly&amp;nbsp; without any modification.&lt;/P&gt;&lt;P&gt;I have tried to debug, this is the result. of course, I can pass the calibration.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85093i7CE63ACA531F7D52/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_9.png" alt="pastedImage_9.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2019 07:17:07 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2019-09-27T07:17:07Z</dc:date>
    <item>
      <title>LPC55s69 LPADC  Calibration code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954989#M37917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;hDear LPC55xx support,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Customer : I-Blades.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; I-blades was looking at the lpadc sample code to figure out how the calibration code works .After stepping through the code they realize that the sample code does not actual go thru the calibration procedure but simply writes to fixed values of 10 into the calibration offset register.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Q: Are those values specific for the eval Board ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10.0pt; "&gt;Snippet of Calibration code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;#if defined(FSL_FEATURE_LPADC_HAS_CTRL_CALOFS) &amp;amp;&amp;amp; FSL_FEATURE_LPADC_HAS_CTRL_CALOFS&lt;BR /&gt; #if defined(FSL_FEATURE_LPADC_HAS_OFSTRIM) &amp;amp;&amp;amp; FSL_FEATURE_LPADC_HAS_OFSTRIM&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; /* Request offset calibration. */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (true == DEMO_LPADC_DO_OFFSET_CALIBRATION)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPADC_DoOffsetCalibration(DEMO_LPADC_BASE);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPADC_SetOffsetValue(DEMO_LPADC_BASE, DEMO_LPADC_OFFSET_VALUE_A, DEMO_LPADC_OFFSET_VALUE_B);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt; #endif /* FSL_FEATURE_LPADC_HAS_OFSTRIM */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; /* Request gain calibration. */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; LPADC_DoAutoCalibration(DEMO_LPADC_BASE);&lt;BR /&gt; #endif /* FSL_FEATURE_LPADC_HAS_CTRL_CALOFS */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-size: 10.0pt; "&gt;if you use the debugger and step thru this code you will see that the line :&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black; background: white;"&gt;&amp;nbsp; LPADC_SetOffsetValue(DEMO_LPADC_BASE, DEMO_LPADC_OFFSET_VALUE_A, DEMO_LPADC_OFFSET_VALUE_B);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 10.0pt; "&gt;is the only line that is executed.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 10.0pt; "&gt;As you can see from the code below the LPADC_DoAutoCAlibration is greyout&amp;nbsp; by the #if Defined at the top so there is no auto calibration taken place.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 10.0pt; "&gt;Q: what is the reason for not&amp;nbsp; calling the auto calibration in the demo code?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 10.0pt; "&gt;Q: If the customer want to use this calibration for his own board, can he just call it?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black; background: white;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/84944i98613EF59CB5F2B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2019 19:12:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954989#M37917</guid>
      <dc:creator>HeMyFAE</dc:creator>
      <dc:date>2019-09-20T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55s69 LPADC  Calibration code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954990#M37918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, HyMai,&lt;/P&gt;&lt;P&gt;I have tested the ADC calibration for LPC55S69, the calibration code works fine.&lt;/P&gt;&lt;P&gt;It is okay if you set the following calibration.&lt;/P&gt;&lt;P&gt;//#define DEMO_LPADC_DO_OFFSET_CALIBRATION false&lt;BR /&gt;#define FSL_FEATURE_LPADC_HAS_CTRL_CALOFS 1&lt;BR /&gt;#define FSL_FEATURE_LPADC_HAS_OFSTRIM 1&lt;BR /&gt;#define DEMO_LPADC_DO_OFFSET_CALIBRATION true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you modified the code, the macro is like this:&lt;/P&gt;&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&amp;nbsp;* Definitions&lt;BR /&gt;&amp;nbsp;******************************************************************************/&lt;BR /&gt;#define DEMO_LPADC_BASE ADC0&lt;BR /&gt;#define DEMO_LPADC_IRQn ADC0_IRQn&lt;BR /&gt;#define DEMO_LPADC_IRQ_HANDLER_FUNC ADC0_IRQHandler&lt;BR /&gt;#define DEMO_LPADC_USER_CHANNEL 0U&lt;BR /&gt;#define DEMO_LPADC_USER_CMDID 1U /* CMD1 */&lt;BR /&gt;#define DEMO_LPADC_VREF_SOURCE kLPADC_ReferenceVoltageAlt2&lt;BR /&gt;//#define DEMO_LPADC_DO_OFFSET_CALIBRATION false&lt;BR /&gt;#define FSL_FEATURE_LPADC_HAS_CTRL_CALOFS 1&lt;BR /&gt;#define FSL_FEATURE_LPADC_HAS_OFSTRIM 1&lt;BR /&gt;#define DEMO_LPADC_DO_OFFSET_CALIBRATION true&lt;BR /&gt;#define DEMO_LPADC_OFFSET_VALUE_A 10U&lt;BR /&gt;#define DEMO_LPADC_OFFSET_VALUE_B 10U&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&amp;nbsp;* Prototypes&lt;BR /&gt;&amp;nbsp;******************************************************************************/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*******************************************************************************&lt;BR /&gt;&amp;nbsp;* Variables&lt;BR /&gt;&amp;nbsp;******************************************************************************/&lt;/P&gt;&lt;P&gt;.....................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2019 05:29:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954990#M37918</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-09-23T05:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55s69 LPADC  Calibration code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954991#M37919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&amp;nbsp;XiangJun Rong,&lt;/P&gt;&lt;P&gt;i added the code into both interrupt and polling code, but when i ran it, it keep getting stuck on this while loop right here.&lt;/P&gt;&lt;P&gt;(See below screen capture).&lt;/P&gt;&lt;P&gt;Please advise!&lt;/P&gt;&lt;P&gt;&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/83125i0777182ABA59AFDE/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 00:00:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954991#M37919</guid>
      <dc:creator>HeMyFAE</dc:creator>
      <dc:date>2019-09-27T00:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55s69 LPADC  Calibration code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954992#M37920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, HyMai,&lt;/P&gt;&lt;P&gt;I think you can download the latest SDK package based on LPC55S69 SDK_2.6.3_LPCXpresso55S69.zip and use the latest MCUXpresso tools ver11.0.1, and load the lpadc_interrupt example. You do not need to change anything, it do calibration exactly&amp;nbsp; without any modification.&lt;/P&gt;&lt;P&gt;I have tried to debug, this is the result. of course, I can pass the calibration.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85093i7CE63ACA531F7D52/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_9.png" alt="pastedImage_9.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 07:17:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55s69-LPADC-Calibration-code/m-p/954992#M37920</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-09-27T07:17:07Z</dc:date>
    </item>
  </channel>
</rss>

