<?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: Unable to access ADC registers in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803238#M2759</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;I tried that example and it works as expected. I am using a custom board that doesn't have SOSC, but PCC and PDB are enabled in that code and ADC is initialized properly. I can't seem to find what the problem with my other code is.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2018 11:30:33 GMT</pubDate>
    <dc:creator>sripav-7</dc:creator>
    <dc:date>2018-08-21T11:30:33Z</dc:date>
    <item>
      <title>Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803234#M2755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the internal ADC in my project. However, when I try to initialize the ADC, I get:&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/63268iFF9D78DFCC4F5481/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;P&gt;I cannot access any of the ADC registers and the same error persists. My ADC functional clock is set to SIRCDIV2_CLK (8 MHz), PDB block set to bus clock and turned on, Extension ADC clock divide set to 2. SOSC and SPLL are disabled. Frequency in run mode is 48 MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any leads regarding this issue are appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 11:49:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803234#M2755</guid>
      <dc:creator>sripav-7</dc:creator>
      <dc:date>2018-08-20T11:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803235#M2756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you enable the Module clock in PCC_ADCn?&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/63446i05512389E6C39122/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;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 11:54:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803235#M2756</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-08-20T11:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803236#M2757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;Do you mean this?&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/63483i41ED7977526067E6/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;P&gt;&lt;/P&gt;&lt;P&gt;If not, I cannot find anything about PCC in processor expert.&amp;nbsp;I put these line before ADC initialization to enable PCC manually and it still has the same problem:&lt;/P&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] &amp;amp;= ~PCC_PCCn_CGC_MASK; /* Disable clock to change PCS */&lt;BR /&gt; PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] |= PCC_PCCn_PCS(1); /* PCS=1: Select FIRC */&lt;BR /&gt; PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] |= PCC_PCCn_CGC_MASK; /* Enable bus clock in ADC */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I read registers, PCC reports that it is enabled:&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/63261iFAFCEDEE65E896B9/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;P&gt;&lt;/P&gt;&lt;P&gt;But PDB reports that it's disabled:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/63309i828B6771479E9EE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 12:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803236#M2757</guid>
      <dc:creator>sripav-7</dc:creator>
      <dc:date>2018-08-20T12:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803237#M2758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried the adc_hw_trigger_s32k142 example that is available in S32 Design Studio?&lt;/P&gt;&lt;P&gt;Does it work?&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/67240iD00DC69831F8DF95/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;P&gt;&lt;/P&gt;&lt;P&gt;After this code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67289i92555906EB10A972/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The clock is enabled in PCC registers, you can see it in the S32DS register view.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67330i57805246B655FFB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 10:16:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803237#M2758</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-08-21T10:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803238#M2759</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;I tried that example and it works as expected. I am using a custom board that doesn't have SOSC, but PCC and PDB are enabled in that code and ADC is initialized properly. I can't seem to find what the problem with my other code is.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 11:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803238#M2759</guid>
      <dc:creator>sripav-7</dc:creator>
      <dc:date>2018-08-21T11:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803239#M2760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you share the code so that I can test it?&lt;/P&gt;&lt;P&gt;If you don't want to share the code here, you can create a ticket.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-329745"&gt;https://community.nxp.com/docs/DOC-329745&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:25:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803239#M2760</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-08-24T13:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access ADC registers</title>
      <link>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803240#M2761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] |= PCC_PCCn_PCS(1); /* PCS=1: Select FIRC */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PCS(1) - SOSCDIV1&lt;/P&gt;&lt;P&gt;PCS(2) - SIRCDIV1&lt;/P&gt;&lt;P&gt;PCS(3) - FIRCDIV1&lt;/P&gt;&lt;P&gt;PCS(6) - SPLLDIV1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I suppose in order to enable FIRC clock for ADC.&lt;/P&gt;&lt;P&gt;PCS(3) needs to be enabled.&lt;/P&gt;&lt;P&gt;so,&lt;/P&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] |= PCC_PCCn_PCS(3); /* PCS=3: Select FIRC */&lt;/P&gt;&lt;P&gt;Please check the same and let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 09:58:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Unable-to-access-ADC-registers/m-p/803240#M2761</guid>
      <dc:creator>sunilkumarc</dc:creator>
      <dc:date>2018-08-29T09:58:04Z</dc:date>
    </item>
  </channel>
</rss>

