<?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 do I setup continious PDB-ADC sampling in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863744#M3784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hello Edgar,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;You are bypassing the delay registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Try setting the&amp;nbsp;PDB_CHnC1_TOS bits.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Jan 2019 19:24:28 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2019-01-26T19:24:28Z</dc:date>
    <item>
      <title>How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863743#M3783</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 try to setup PDB0-ADC0 for continious sampling. Below I have attached the register setup. PDB0 and ADC are clocked with 50 MHz. I am using a S32k144.&lt;/P&gt;&lt;P&gt;When I init the registers I see 1 sample only. I observe that the PDB counter count up until MOD and restarts at 0.&lt;/P&gt;&lt;P&gt;My expectation is that at restart this triggers new sampling. Also CH0S does not show any error.&lt;/P&gt;&lt;P&gt;What do I miss to do? Anything special to start continious sampling or do I setup the registers not correct?&lt;/P&gt;&lt;P&gt;Thanks in advance for your help or hint.&lt;/P&gt;&lt;P&gt;Edgar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Bildschirmfoto 2019-01-25 um 21.34.22.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/77271i5F3E1D0D28C77041/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2019-01-25 um 21.34.22.png" alt="Bildschirmfoto 2019-01-25 um 21.34.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Bildschirmfoto 2019-01-25 um 21.34.50.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/77326i14B55ACC2FEE0080/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2019-01-25 um 21.34.50.png" alt="Bildschirmfoto 2019-01-25 um 21.34.50.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Bildschirmfoto 2019-01-25 um 21.35.30.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/77361i1B0454077212B445/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2019-01-25 um 21.35.30.png" alt="Bildschirmfoto 2019-01-25 um 21.35.30.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2019 20:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863743#M3783</guid>
      <dc:creator>edgarmichel</dc:creator>
      <dc:date>2019-01-25T20:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863744#M3784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hello Edgar,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;You are bypassing the delay registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Try setting the&amp;nbsp;PDB_CHnC1_TOS bits.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2019 19:24:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863744#M3784</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-01-26T19:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863745#M3785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;Thanks for your reply&lt;/P&gt;&lt;P&gt;I tried this also. If I set the TOS bit and a delay eg 100 then the CF ist set after the COunter CNT reaches the delay&lt;/P&gt;&lt;P&gt;This screen below. I have tried several settings - with and w/o sw trigger. Also no BB but TOS Bits set&amp;nbsp; and delay.&lt;/P&gt;&lt;P&gt;It is not clear to me how do I set properly continous mode. Setting TOS and delay register is of course also fin.&lt;/P&gt;&lt;P&gt;Basically what I need is a setup of the registers to sample 5 ADC channels continously at a maximum of 10 usec per loop.&lt;/P&gt;&lt;P&gt;Any idea or example how to set this up?&lt;/P&gt;&lt;P&gt;Maybe I shall mention that the ADC values not read after each conversion ie COCO is still set when the next conversion starts.&lt;/P&gt;&lt;P&gt;While debugging I guess that the CHOS-ERR are set for the channels if COCO is still set ie ADC value not read.&lt;/P&gt;&lt;P&gt;Is that the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2019-01-28 at 05.55.24.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/77266i871E49CFBB8FC5A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-01-28 at 05.55.24.png" alt="Screen Shot 2019-01-28 at 05.55.24.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2019 05:01:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863745#M3785</guid>
      <dc:creator>edgarmichel</dc:creator>
      <dc:date>2019-01-28T05:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863746#M3786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Edgar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the additional information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are several ways to do it.&lt;/P&gt;&lt;P&gt;You can use either the Back-to-back&amp;nbsp;One-Shot mode as shown in the below examples and then trigger the PDB back-to-back mode again with a SW trigger.&lt;BR /&gt;&lt;A href="https://community.nxp.com/docs/DOC-332749" rel="nofollow noopener noreferrer" target="_blank"&gt;Example S32K144 PDB ADC back-to-back test S32DS12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-339808" rel="nofollow noopener noreferrer" target="_blank"&gt;Example S32K144 PDB ADC trigger DMA ISR S32DS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use &lt;SPAN&gt;the Back-to-back&lt;/SPAN&gt;&amp;nbsp;Continues mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;Initial SW trigger, first ADC conversion triggered by DLY[0], then back-to-back.&lt;/P&gt;&lt;P&gt;However, you need to read all the ADC result register to clear the COCO flags before the PDB back-to-back operation gets triggered again, before it reaches MOD.&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PDB_Init&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 PCC&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;PCCn&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;PCC_PDB0_INDEX&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PCC_PCCn_CGC_MASK&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* Enable bus clock in PDB0 */&lt;/SPAN&gt;
 PDB0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;SC &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PDB_SC_TRGSEL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0xF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* b1111: Software trigger is selected */&lt;/SPAN&gt;
 PDB_SC_PDBEN_MASK&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* 1: PDB enabled */&lt;/SPAN&gt;
 
 PDB0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;CH&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;C1 &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PDB_C1_BB&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x1E&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PDB_C1_TOS&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0xFF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  &lt;SPAN class="token function"&gt;PDB_C1_EN&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x1F&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// DLY[0] : pre-trigger from PDB DLY  &lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// DLY[5:1] : back-to-back enabled&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// Pretrigger Output Select: 0=bypassed , 1=enabled&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// PDB channel's pre-trigger enabled&lt;/SPAN&gt;
 
 PDB0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;MOD &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FFFF&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* Specifies the period of the counter */&lt;/SPAN&gt;
 
 PDB0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;CH&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DLY&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* Pretrigger 0 */&lt;/SPAN&gt;
 
 PDB0&lt;SPAN class="operator token"&gt;-&amp;gt;&lt;/SPAN&gt;SC &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PDB_SC_LDOK_MASK&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you can use the PDB interrupt (configured by PDB_IDLY &amp;lt; MOD) and read the ADC results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could use the delay registers for all ADC channels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2019 14:11:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863746#M3786</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-01-28T14:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863747#M3787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the help. It works now. In case someboday else has the same issue let me summerize what needs to be considered - the manual is very fuzzy in that area.&lt;/P&gt;&lt;P&gt;For continious sampling one shall use PDB. Even the sampling results are not needed immediately one must use DMA to handle COCO reset. Ie setup of DMA to a result buffer is necessary. It is best to use the BB feature however the first ADC channel must be triggered by the PDB counter ie for the first channel TOS must be enable with a delay of 1.&lt;/P&gt;&lt;P&gt;Also Software Trigger must be enabled. To start continious sampling PDB0 must be started by software&lt;BR /&gt;The PDB runs with system clock, ADC with bus clock . This must be considered to calculate the correct MOD value for PDB. For integration observer seqeunce error. It may be good to set MOD to 0xffff for first integration as in the example above.&lt;BR /&gt;Do not enable DMA interrupt in that case as you will receive an interrupt for every ADC sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Regards Edgar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2019 08:35:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863747#M3787</guid>
      <dc:creator>edgarmichel</dc:creator>
      <dc:date>2019-02-01T08:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup continious PDB-ADC sampling</title>
      <link>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863748#M3788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has&amp;nbsp; the&amp;nbsp;&lt;A _jive_internal="true" data-containerid="11492" data-containertype="14" data-content-finding="Community" data-objectid="332749" data-objecttype="102" href="https://community.nxp.com/docs/DOC-332749" style="color: #3d9ce7; background-color: #ffffff; border: 0px; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;Example S32K144 PDB ADC back-to-back test S32DS12&lt;/A&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; been deleted? Where can find it again?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 04:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-do-I-setup-continious-PDB-ADC-sampling/m-p/863748#M3788</guid>
      <dc:creator>cccdq</dc:creator>
      <dc:date>2020-06-19T04:31:26Z</dc:date>
    </item>
  </channel>
</rss>

