<?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: How can we decide the exact values for the ADC Attributes?? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1254846#M60048</link>
    <description>&lt;P&gt;From the source code, the other attributes values are initialized in function _lwadc_init ()&amp;nbsp; , mqx/source/io/lwadc/lwadc_vadc.c&amp;nbsp; &amp;nbsp;line 47&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 08:34:30 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2021-03-31T08:34:30Z</dc:date>
    <item>
      <title>How can we decide the exact values for the ADC Attributes??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1216562#M59361</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I was working on the &lt;STRONG&gt;&lt;EM&gt;"TWR-K70120M" &lt;/EM&gt;&lt;/STRONG&gt;in which I was trying to understand the &lt;STRONG&gt;&lt;EM&gt;"LWADC" &lt;/EM&gt;&lt;/STRONG&gt;example which I found on the following path &lt;U&gt;"C:\Freescale\Freescale_MQX_4_1\mqx\examples\lwadc\build\uv4\lwadc_twrk70f120m". &lt;/U&gt;&lt;/P&gt;&lt;P&gt;So, while debugging I observed one thing that there is one function which is printing all the attributes on the uart&lt;/P&gt;&lt;P&gt;print_all_lwadc_attributes(&amp;amp;potentiometer)&lt;U&gt;;&lt;/U&gt;&amp;nbsp; (image is attached below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adc_params.JPG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/135174iCD29510D9AAFEBDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adc_params.JPG" alt="adc_params.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, now I really want to know how we can decide exact values for the ADC attributes??. Also, I already have gone through the &lt;U&gt;readme.pdf file&lt;/U&gt; but unfortunately, it wasn't mentioned there. Can anyone please help me to understand this?.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Omkar Dixit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 06:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1216562#M59361</guid>
      <dc:creator>omkardixit</dc:creator>
      <dc:date>2021-01-19T06:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can we decide the exact values for the ADC Attributes??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1219901#M59415</link>
      <description>&lt;P&gt;Hi omkardixit:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We get the real attribute value through API _lwad_read_raw()&lt;/P&gt;
&lt;P&gt;mqx/source/io/lwadc/lwadc_vadc.c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*FUNCTION*-------------------------------------------------------------------&lt;BR /&gt;*&lt;BR /&gt;* Function Name : _lwadc_read_raw&lt;BR /&gt;* Returned Value : TRUE for success, FALSE for failure&lt;BR /&gt;* Comments :&lt;BR /&gt;* This function Read the current value of the ADC input and return&lt;BR /&gt;* the result without applying any scaling.&lt;BR /&gt;*&lt;BR /&gt;*END*----------------------------------------------------------------------*/&lt;/P&gt;
&lt;P&gt;bool _lwadc_read_raw(LWADC_STRUCT_PTR lwadc_ptr, LWADC_VALUE_PTR outSample)&lt;BR /&gt;{&lt;BR /&gt;ADC_MemMapPtr adc_ptr;&lt;BR /&gt;LWADC_VALUE sample;&lt;/P&gt;
&lt;P&gt;if (NULL == lwadc_ptr){&lt;BR /&gt;return FALSE;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;if (lwadc_ptr-&amp;gt;context_ptr == NULL) {&lt;BR /&gt;return FALSE;&lt;BR /&gt;}&lt;BR /&gt;adc_ptr = lwadc_ptr-&amp;gt;context_ptr-&amp;gt;adc_ptr;&lt;/P&gt;
&lt;P&gt;if ((adc_ptr-&amp;gt;GC &amp;amp; ADC_GC_ADCO_MASK) == 0) {&lt;BR /&gt;/* ADC is not in continuous mode. */&lt;BR /&gt;adc_ptr-&amp;gt;GC |= ADC_GC_ADCO_MASK;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;sample = adc_ptr-&amp;gt;R[0];&lt;/P&gt;
&lt;P&gt;*outSample = sample &amp;amp; ADC_CDR_CDATA_MASK;&lt;/P&gt;
&lt;P&gt;return TRUE;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&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>Sat, 23 Jan 2021 03:11:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1219901#M59415</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2021-01-23T03:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can we decide the exact values for the ADC Attributes??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1219906#M59416</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Thanks for your reply. Yes, I have tried the API you mentioned. If you see the image which I have uploaded, consists of the ADC attributes eg. LWADC_FORMAT, LWADC_DIVIDER, and more.&lt;/P&gt;&lt;P&gt;So, my dought is except the LWADC_RESOLUTION &amp;amp; LWADC_FREQUNCY attributes how can we decide the values of the other attributes. If in the case of my next project again I need to work with ADC so how can I decide the values of the attributes?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Omkar Dixit&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 04:51:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1219906#M59416</guid>
      <dc:creator>omkardixit</dc:creator>
      <dc:date>2021-01-23T04:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can we decide the exact values for the ADC Attributes??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1254846#M60048</link>
      <description>&lt;P&gt;From the source code, the other attributes values are initialized in function _lwadc_init ()&amp;nbsp; , mqx/source/io/lwadc/lwadc_vadc.c&amp;nbsp; &amp;nbsp;line 47&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:34:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-can-we-decide-the-exact-values-for-the-ADC-Attributes/m-p/1254846#M60048</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2021-03-31T08:34:30Z</dc:date>
    </item>
  </channel>
</rss>

