<?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 LPC822_features.h errata with ADTrim register definition value ? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345185#M46545</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In LPC822_features.h we can see next line:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;/* ADC module features */&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;/* @brief Has ADTrim register */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#define FSL_FEATURE_ADC_HAS_TRIM_REG (0)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;so in fsl_adc.h driver we will have no definition of "VoltageRange" parameter:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#if defined(FSL_FEATURE_ADC_HAS_TRIM_REG) &amp;amp; FSL_FEATURE_ADC_HAS_TRIM_REG&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;adc_vdda_range_t&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;voltageRange; /*!&amp;lt; Configure the ADC for the appropriate operating range of the analog supply voltage VDDA.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Failure to set the area correctly causes the ADC to return incorrect conversion results. */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#endif /* FSL_FEATURE_ADC_HAS_TRIM_REG. */&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And compiler will show error with that "Voltage range" included by peripherlas code generator.&lt;/P&gt;&lt;P&gt;So, is that an errata ? it would be (1), isn't it ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 16:05:47 GMT</pubDate>
    <dc:creator>asier</dc:creator>
    <dc:date>2021-09-23T16:05:47Z</dc:date>
    <item>
      <title>LPC822_features.h errata with ADTrim register definition value ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345185#M46545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In LPC822_features.h we can see next line:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;/* ADC module features */&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;/* @brief Has ADTrim register */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#define FSL_FEATURE_ADC_HAS_TRIM_REG (0)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;so in fsl_adc.h driver we will have no definition of "VoltageRange" parameter:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#if defined(FSL_FEATURE_ADC_HAS_TRIM_REG) &amp;amp; FSL_FEATURE_ADC_HAS_TRIM_REG&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;adc_vdda_range_t&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;voltageRange; /*!&amp;lt; Configure the ADC for the appropriate operating range of the analog supply voltage VDDA.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Failure to set the area correctly causes the ADC to return incorrect conversion results. */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;#endif /* FSL_FEATURE_ADC_HAS_TRIM_REG. */&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And compiler will show error with that "Voltage range" included by peripherlas code generator.&lt;/P&gt;&lt;P&gt;So, is that an errata ? it would be (1), isn't it ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 16:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345185#M46545</guid>
      <dc:creator>asier</dc:creator>
      <dc:date>2021-09-23T16:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822_features.h errata with ADTrim register definition value ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345497#M46550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the VDD voltage of LPC82x can range from 1.8V to 3.3V, so 1.8V is a working voltage.&lt;/P&gt;
&lt;P&gt;First of all, the ADC module of LPC82x defines the TRM register to trim ADC result based on the VDD voltage as following Fig, if the VDD is greater than 2.7V, clear VRANGE bit. if the VDDA is less than 2.7V, set VRANGE bit. In most case, the VDD is greater than 2.7V for example 3.3V, and the default value of VRANGE bit is cleared, so user do not need to write the TRM reg.&lt;/P&gt;
&lt;P&gt;In conclusion, it is NOT a errata.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1632452859262.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/157182i73805D7936C96692/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1632452859262.png" alt="xiangjun_rong_0-1632452859262.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have tried to compile the adc example, the TRM reg is initialized without any modification for the original code in SDK.&lt;/P&gt;
&lt;P&gt;In lpc824_features.h&lt;/P&gt;
&lt;P&gt;/* @brief Has ADC Trim register */&lt;BR /&gt;#define FSL_FEATURE_ADC_HAS_TRIM_REG (1)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1632453446488.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/157203i0ED1087226F1A8CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1632453446488.png" alt="xiangjun_rong_1-1632453446488.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see that the TRM reg is initialized.&lt;/P&gt;
&lt;P&gt;I attach the example&lt;/P&gt;
&lt;P&gt;If you still have issue, pls post your project so that I can have a review.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 03:23:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345497#M46550</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-09-24T03:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822_features.h errata with ADTrim register definition value ?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345677#M46553</link>
      <description>&lt;P&gt;Hi XiangJun,&lt;/P&gt;&lt;P&gt;Thanks for the fast response.&lt;/P&gt;&lt;P&gt;I'm agree with all you sais, but the issue I have is that&amp;nbsp;&lt;EM&gt;FSL_FEATURE_ADC_HAS_TRIM_REG&lt;/EM&gt; definition has 0 default value in&amp;nbsp;LPC822_features.h file.&lt;/P&gt;&lt;P&gt;In your example&amp;nbsp;&lt;EM&gt;FSL_FEATURE_ADC_HAS_TRIM_REG = 1&lt;/EM&gt; because "base--&amp;gt;trim" code in fsl_adc.c file is not graied.&lt;/P&gt;&lt;P&gt;In my file&amp;nbsp;&lt;EM&gt;FSL_FEATURE_ADC_HAS_TRIM_REG = 0&lt;/EM&gt; and&amp;nbsp;when peripheral code generator includes ".voltageRange" it reports an error.&lt;/P&gt;&lt;P&gt;It is solved doing&amp;nbsp;&lt;EM&gt;#define FSL_FEATURE_ADC_HAS_TRIM_REG (1)&lt;/EM&gt; in&amp;nbsp;LPC822_features.h file, this way some needed definition are ungraied (activated) in fsl_adc.c file.&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Asier.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 07:53:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-features-h-errata-with-ADTrim-register-definition-value/m-p/1345677#M46553</guid>
      <dc:creator>asier</dc:creator>
      <dc:date>2021-09-24T07:53:38Z</dc:date>
    </item>
  </channel>
</rss>

