<?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>S32K中的主题 Re: S32K148 adc not working</title>
    <link>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1639515#M22355</link>
    <description>&lt;P&gt;Hi &lt;SPAN&gt;guochuan&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;I think the problem can come from this parameter is so small to convert data on all channels. So, you can try to adjust it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_0-1682405950808.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220710iE25E4CDF0DC6DEBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_0-1682405950808.png" alt="Nhi_Nguyen_0-1682405950808.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is its description&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_1-1682406052209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220712iAA194ABAF3B6353A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_1-1682406052209.png" alt="Nhi_Nguyen_1-1682406052209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;ADC's clock frequency is 40 MHz and prescaler value for frequency is 1.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_2-1682406118434.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220713iCCE5F52DC528D528/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_2-1682406118434.png" alt="Nhi_Nguyen_2-1682406118434.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_6-1682406718717.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220717iF8534C7F1A381013/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_6-1682406718717.png" alt="Nhi_Nguyen_6-1682406718717.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDB's clock frequency is 80MHz get from SYS_CLK&lt;/P&gt;
&lt;P&gt;Follow to above expression for 1 ADC's channel: "ADC TOTAL CONVERSION TIME = Sample Phase Time (set by SMPLTS+1) + Hold Phase (1 ADC Cycle) + Compare Phase Time (8-bit Mode=20 ADC Cycles, 10-bit Mode=24 ADC Cycles, &lt;BR /&gt;12-bit Mode=28 ADC Cycles) + Single or First continuous time adder (5 ADC cycles + 5 bus clock cycles)."&lt;/P&gt;
&lt;P&gt;SMPLTS:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_3-1682406313533.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220714iEE330ABE6C690110/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_3-1682406313533.png" alt="Nhi_Nguyen_3-1682406313533.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I used 12 bit Mode.&lt;/P&gt;
&lt;P&gt;In my case, ADC cycle = Bus cycle.&lt;/P&gt;
&lt;P&gt;ADC TOTAL CONVERSION TIME = (255 + 1) + 1 + 28 + 10 = 295.&lt;/P&gt;
&lt;P&gt;I have this parameter:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_4-1682406519940.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220715iBC2FD142CB4F5174/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_4-1682406519940.png" alt="Nhi_Nguyen_4-1682406519940.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_5-1682406537209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220716i3BF5447EF7F4F432/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_5-1682406537209.png" alt="Nhi_Nguyen_5-1682406537209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, I have:&amp;nbsp;ADC TOTAL CONVERSION TIME&amp;nbsp; = 295 * 8 * 8 (channels) =&amp;nbsp; 18880 (cycles)&lt;/P&gt;
&lt;P&gt;This parameter&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Adc Delay Next PDB (0 -&amp;gt; 65535)&lt;/STRONG&gt;&lt;/EM&gt; have to ensure enough time to convert all pre-triggers in channel 0 and this value will be written as counter of PDB. So, we need to convert to PDB's cycles before write it into the register.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;(18880/ 40 * 80 = 37760)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Adc Delay Next PDB (0 -&amp;gt; 65535) have to configure bigger than 37760.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Nhi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 07:22:04 GMT</pubDate>
    <dc:creator>Nhi_Nguyen</dc:creator>
    <dc:date>2023-04-25T07:22:04Z</dc:date>
    <item>
      <title>S32K148 adc not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1633706#M22116</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Our project uses S32K148 ADC0 and ADC1, and each ADC is configured with 8 channels.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt; The test found that the last three channels could not obtain data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="guochuan_0-1681457159236.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/219261i226CC9F1DE5CB115/image-size/medium?v=v2&amp;amp;px=400" role="button" title="guochuan_0-1681457159236.png" alt="guochuan_0-1681457159236.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 07:26:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1633706#M22116</guid>
      <dc:creator>guochuan</dc:creator>
      <dc:date>2023-04-14T07:26:18Z</dc:date>
    </item>
    <item>
      <title>回复： S32K148 adc not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1633937#M22138</link>
      <description>&lt;P&gt;HI NXP team&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Our project uses S32K148 ADC0 and ADC1, and each ADC is configured with 11 channels.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt; The test found that the last three channels could not obtain data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 13:38:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1633937#M22138</guid>
      <dc:creator>guochuan</dc:creator>
      <dc:date>2023-04-14T13:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: S32K148 adc not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1639515#M22355</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;guochuan&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;I think the problem can come from this parameter is so small to convert data on all channels. So, you can try to adjust it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_0-1682405950808.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220710iE25E4CDF0DC6DEBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_0-1682405950808.png" alt="Nhi_Nguyen_0-1682405950808.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is its description&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_1-1682406052209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220712iAA194ABAF3B6353A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_1-1682406052209.png" alt="Nhi_Nguyen_1-1682406052209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;ADC's clock frequency is 40 MHz and prescaler value for frequency is 1.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_2-1682406118434.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220713iCCE5F52DC528D528/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_2-1682406118434.png" alt="Nhi_Nguyen_2-1682406118434.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_6-1682406718717.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220717iF8534C7F1A381013/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_6-1682406718717.png" alt="Nhi_Nguyen_6-1682406718717.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDB's clock frequency is 80MHz get from SYS_CLK&lt;/P&gt;
&lt;P&gt;Follow to above expression for 1 ADC's channel: "ADC TOTAL CONVERSION TIME = Sample Phase Time (set by SMPLTS+1) + Hold Phase (1 ADC Cycle) + Compare Phase Time (8-bit Mode=20 ADC Cycles, 10-bit Mode=24 ADC Cycles, &lt;BR /&gt;12-bit Mode=28 ADC Cycles) + Single or First continuous time adder (5 ADC cycles + 5 bus clock cycles)."&lt;/P&gt;
&lt;P&gt;SMPLTS:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_3-1682406313533.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220714iEE330ABE6C690110/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_3-1682406313533.png" alt="Nhi_Nguyen_3-1682406313533.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I used 12 bit Mode.&lt;/P&gt;
&lt;P&gt;In my case, ADC cycle = Bus cycle.&lt;/P&gt;
&lt;P&gt;ADC TOTAL CONVERSION TIME = (255 + 1) + 1 + 28 + 10 = 295.&lt;/P&gt;
&lt;P&gt;I have this parameter:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_4-1682406519940.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220715iBC2FD142CB4F5174/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_4-1682406519940.png" alt="Nhi_Nguyen_4-1682406519940.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nhi_Nguyen_5-1682406537209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/220716i3BF5447EF7F4F432/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nhi_Nguyen_5-1682406537209.png" alt="Nhi_Nguyen_5-1682406537209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, I have:&amp;nbsp;ADC TOTAL CONVERSION TIME&amp;nbsp; = 295 * 8 * 8 (channels) =&amp;nbsp; 18880 (cycles)&lt;/P&gt;
&lt;P&gt;This parameter&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Adc Delay Next PDB (0 -&amp;gt; 65535)&lt;/STRONG&gt;&lt;/EM&gt; have to ensure enough time to convert all pre-triggers in channel 0 and this value will be written as counter of PDB. So, we need to convert to PDB's cycles before write it into the register.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;(18880/ 40 * 80 = 37760)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Adc Delay Next PDB (0 -&amp;gt; 65535) have to configure bigger than 37760.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Nhi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 07:22:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K148-adc-not-working/m-p/1639515#M22355</guid>
      <dc:creator>Nhi_Nguyen</dc:creator>
      <dc:date>2023-04-25T07:22:04Z</dc:date>
    </item>
  </channel>
</rss>

