<?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: 500 kbps Sampling ADC on CAN channel</title>
    <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1224093#M9773</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PDB0-&amp;gt;SC |= PDB_SC_PDBEN(0) does not clear PDBEN, it should be rather&amp;nbsp;PDB0-&amp;gt;SC &amp;amp;=&amp;nbsp;~PDB_SC_PDBEN_MASK&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also you can try to clear CONT bit instead of disabling PDB and wait for conversion complete. Then set CONT and do SW trig again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Check if you do not have sequence error generated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2021 13:06:06 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2021-02-01T13:06:06Z</dc:date>
    <item>
      <title>500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1209774#M9547</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm a beginner on S32K144, so I&amp;nbsp;apologize in advance if I will say something totally wrong.&lt;/P&gt;&lt;P&gt;I need to sampling CAN High and CAN Low by ADC0 and ADC1, but I have to be sure that my ADCs sample at least 1 bit per sample when the bitrate on my CAN channel is 500 kbps. I have been read&amp;nbsp;how to configure high sample rate on ADC from&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/ADC-High-Sampling-Rate-and-Graph/m-p/871689" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K/ADC-High-Sampling-Rate-and-Graph/m-p/871689&lt;/A&gt;&amp;nbsp;but with these parameters I can't achieve the target.&lt;/P&gt;&lt;P&gt;I'd like to know if is possible achieve this sample performance on S32K144.&lt;/P&gt;&lt;P&gt;I attached the ADC.c, FlexCAN.c and clocks_and_modes.h used and below the Matlab graph obtained using 500kbps with 110 samples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="voltage_can_500kbps.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134450i97257A85093C8693/image-size/medium?v=v2&amp;amp;px=400" role="button" title="voltage_can_500kbps.png" alt="voltage_can_500kbps.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I did a test(below) with CAN 100kbps with others ADC.c, FlexCAN.c settings and this is the result (110 sample) what I'd like to reach, one sample per bit.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="voltage_can_100kbps.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134451iC606BFE8ED1C3E3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="voltage_can_100kbps.png" alt="voltage_can_100kbps.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly guide me or small example code will be helpful. Many thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 16:02:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1209774#M9547</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-01-11T16:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1210202#M9552</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;a minimum conversion time is around 1us, refer to DS for specification.&lt;BR /&gt;To have 1 sample per bit at 500kbps CAN rate you have to sample each 2us, this is possible. Ideally you should sample 2 times faster, but as above it is on ADC limits.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;Also instead of SW start of single ADC conversion you have, it would be better to use HW trigger, eg. using PBD and trigger ADC at given rate according to CAN bit time. Or at least set &lt;/FONT&gt;continuous&lt;FONT face="inherit"&gt;&amp;nbsp;mode on ADC and set conversion time for 2us. Using DMA to read results will be ideal for higher rates.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;You can refer to S32k144_Project_PDB example within S32DS, where ADC is HW triggered by PDB, which is set to continuous mode with SW trigger. You should be able to modify it for conversion rate you need.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 08:03:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1210202#M9552</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-01-12T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1212409#M9608</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I tried to modify these values&amp;nbsp;in the example that you suggested me for my purpose:&lt;/P&gt;&lt;P&gt;ADC.c:&lt;/P&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_ADC0_INDEX] |= PCC_PCCn_PCS(6);&lt;/P&gt;&lt;P&gt;ADC0-&amp;gt;CFG2 = ADC_CFG2_SMPLTS(12);&lt;/P&gt;&lt;P&gt;ADC_CFG1_ADIV(4);&lt;/P&gt;&lt;P&gt;PDB.c:&lt;/P&gt;&lt;P&gt;PDB0-&amp;gt;MOD = 400;&lt;BR /&gt;PDB0-&amp;gt;IDLY = 395;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PDB_SC_PRESCALER(0)&amp;nbsp;&lt;BR /&gt;PDB_SC_MULT(0)&lt;BR /&gt;PDB0-&amp;gt;CH[0].DLY[0] = 1;&lt;/P&gt;&lt;P&gt;clock_and_modes.c&lt;/P&gt;&lt;P&gt;void SPLL_init_200MHz(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;SCG-&amp;gt;SPLLDIV |= SCG_SPLLDIV_SPLLDIV1(2)|&amp;nbsp;&lt;BR /&gt;SCG_SPLLDIV_SPLLDIV2(3);&amp;nbsp;&lt;/P&gt;&lt;P&gt;SCG-&amp;gt;SPLLCFG = SCG_SPLLCFG_MULT(34);&lt;BR /&gt;SCG-&amp;gt;SPLLCFG = SCG_SPLLCFG_PREDIV(1)&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;In that way I think to have set SPLL 200MHz, divided by 4 for ADC input clock for 50MHz (max ADC speed), and set the PDB parameters for 500kHz.&lt;/P&gt;&lt;P&gt;With leds example, it works but I can't read the voltage data. I need to start saving the voltage values when the first dominant bit is detected. I modified the example code like below:&lt;/P&gt;&lt;P&gt;void ADC0_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while(((ADC0-&amp;gt;SC1[0] &amp;amp; ADC_SC1_COCO_MASK)&amp;gt;&amp;gt;ADC_SC1_COCO_SHIFT) == 0){};&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (ADC0-&amp;gt;R[0] &amp;lt; 1638){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i=0; i&amp;lt;110; i++)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vectors.Buffer_Low[i] = ADC0-&amp;gt;R[0];&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(((ADC0-&amp;gt;SC1[0] &amp;amp; ADC_SC1_COCO_MASK)&amp;gt;&amp;gt;ADC_SC1_COCO_SHIFT) == 0){};&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;I supposed that the for cycle dosen't work.&lt;/P&gt;&lt;P&gt;Is there that I'm mistaking?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 15:09:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1212409#M9608</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-01-27T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223218#M9750</link>
      <description>&lt;P&gt;Hi PetrS&lt;/P&gt;&lt;P&gt;I achieved the rate sampling for my purpose but when I try to use printf() for reading my voltage result the code stops working. I need to stop the sampling after 110 samples and do others calculus with voltage results. At the end, I'd like to start again with an other sampling and so on...&lt;/P&gt;&lt;P&gt;Is it possible? Do you know how to do it?&lt;/P&gt;&lt;P&gt;I really need some feedbacks&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 10:41:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223218#M9750</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-01-29T10:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223296#M9754</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the interrupt code could work. Only you will leave interrupt function after&amp;nbsp;&lt;SPAN&gt;vectors.Buffer_Low is filled. So it could be better to do not interrupt it by higher priority interrupt to do not miss sample eventually get error in PDB. I think DMA implementation to read results will be ideal.&lt;BR /&gt;To stop sampling just disable PDB using PDBEN bit, to start it again set PDBEN and do SW trigger.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 13:13:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223296#M9754</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-01-29T13:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223358#M9757</link>
      <description>&lt;P&gt;I didn't implement DMA yet but I'm working on it. I tried to insert&amp;nbsp; PDB0-&amp;gt;SC |= PDB_SC_PDBEN(0); in Interrupt and then I inserted&amp;nbsp; PDB0-&amp;gt;SC |= PDB_SC_PDBEN(1)| PDB_SC_SWTRIG_MASK;; at the end of the for(;;) main cycle. I can stop sampling but it doesn't start again.&lt;/P&gt;&lt;P&gt;Thank you for your help. I really appreciate it.&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 15:54:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1223358#M9757</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-01-29T15:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1224093#M9773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PDB0-&amp;gt;SC |= PDB_SC_PDBEN(0) does not clear PDBEN, it should be rather&amp;nbsp;PDB0-&amp;gt;SC &amp;amp;=&amp;nbsp;~PDB_SC_PDBEN_MASK&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also you can try to clear CONT bit instead of disabling PDB and wait for conversion complete. Then set CONT and do SW trig again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Check if you do not have sequence error generated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 13:06:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1224093#M9773</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-02-01T13:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1224799#M9796</link>
      <description>&lt;P&gt;The code has stopped&amp;nbsp;while(((ADC0-&amp;gt;SC1[0] &amp;amp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ADC_SC1_COCO_MASK)&amp;gt;&amp;gt;ADC_SC1_COCO_SHIFT) == 0){};&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }. It works until first set of data. It seems like&amp;nbsp;ADC0-&amp;gt;SC1[0] register doesn't give a complete conversion after the first.&lt;/P&gt;&lt;P&gt;void ADC0_IRQHandler(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if(ADC0-&amp;gt;SC1[0] &amp;amp; ADC_SC1_COCO_MASK)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (ADC0-&amp;gt;R[0] &amp;lt; 1638 &amp;amp;&amp;amp; ADC0-&amp;gt;R[0]&amp;gt;0){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (i=0; i&amp;lt;120; i++)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vectors.Buffer_Low[i] = ADC0-&amp;gt;R[0];&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(((ADC0-&amp;gt;SC1[0] &amp;amp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ADC_SC1_COCO_MASK)&amp;gt;&amp;gt;ADC_SC1_COCO_SHIFT) == 0){};&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PDB0-&amp;gt;SC &amp;amp;= ~PDB_SC_CONT_MASK;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;recived = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for(;;)&lt;BR /&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if(recived){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;recived = false;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (k = 0; k&amp;lt;120; k++)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;vectors.Buffer_Low_result[k]=(5000*vectors.Buffer_Low[k]/4095);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf(" %lu \n", vectors.Buffer_Low[k]);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PDB0-&amp;gt;SC |= PDB_SC_CONT_MASK|&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PDB_SC_SWTRIG_MASK;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Maybe it&amp;nbsp;&lt;SPAN&gt;is necessary to clean ADC registers but I can't figure out&amp;nbsp;which ones.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Really thank you for your help.&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 09:02:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1224799#M9796</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-02-03T09:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1226322#M9822</link>
      <description>&lt;P&gt;Hi PetrS&lt;/P&gt;&lt;P&gt;I achieved my sampling target with just one channel. I need to sample the CANH channel too. Is it possible to set one PDB for hardware-triggering 2 ADC?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set ADC0 an ADC1 with the same parameters and I add in PDB code this lines:&lt;/P&gt;&lt;P&gt;PDB0-&amp;gt;CH[0].C1|=1|PDB_C1_TOS_MASK;&lt;/P&gt;&lt;P&gt;PDB0-&amp;gt;CH[1].C1|=1|PDB_C1_TOS_MASK;&lt;/P&gt;&lt;P&gt;PDB0-&amp;gt;CH[0].DLY[0] = 1;&lt;/P&gt;&lt;P&gt;PDB0-&amp;gt;CH[1].DLY[0] = 205;&lt;/P&gt;&lt;P&gt;I tried this but the second ADC doesn't work. I think I couldn't trigger it. Is it strictly necessary using the back-to-back mode to do it? Have I to set an other interrupt?&lt;/P&gt;&lt;P&gt;Refer to the&amp;nbsp;&lt;SPAN&gt;S32k144_Project_PDB, I don't know how to add an other channel for sampling.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I really thank you so much&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:30:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1226322#M9822</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-02-05T09:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1230313#M9885</link>
      <description>&lt;P&gt;Hi PetrS&lt;/P&gt;&lt;P&gt;I finally found a way to sample 2 channels (CANL and&amp;nbsp; CANH) by tuning PDB in back-to-back mode with ADC0 setting on two channels. The result is quite good but I have a doubt: I need to sample at the same time from CANL and CANH but if I use back-to-back mode the sampling is in sequence I suppose. Would it be better using two ADC to guarantee the simultaneity for those two channels?&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1230313#M9885</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-02-12T11:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1230329#M9886</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, using single PDB-ADC triggering scheme you will do sampling in sequence.&lt;/P&gt;
&lt;P&gt;Thus 2 ADCs should be used to get parallel conversion&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PetrS_0-1613130655073.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/137118i6ADF8C7DC13418FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PetrS_0-1613130655073.png" alt="PetrS_0-1613130655073.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:51:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1230329#M9886</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-02-12T11:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1245681#M10173</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;PetrS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;At the end, I implemented the sampling HW with PDB in back-to-back mode but I notice that it would be perfect if I use DMA. I found your example here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-PDB-ADC-trigger-DMA-ISR-S32DS/ta-p/1103221" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-PDB-ADC-trigger-DMA-ISR-S32DS/ta-p/1103221&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This example is implemented for 4 channels, but I didn't understand how to use it just for 2 channels. I tried just to reduce the result[4] to&amp;nbsp;result[2] and set ADC with just to channels but, after that, it doesn't work.&lt;/P&gt;&lt;P&gt;Could you explain me how to do it?&lt;/P&gt;&lt;P&gt;I attached your example with some changes. It works really good just for the first channel (3 in my case) but dosen't work for the other one&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 11:45:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1245681#M10173</guid>
      <dc:creator>Andre_b</dc:creator>
      <dc:date>2021-03-15T11:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: 500 kbps Sampling ADC on CAN channel</title>
      <link>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1246427#M10199</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you should do changes in ADC , PDB and DMA init functions. You did it in ADC and PDB, for DMA you should change below lines to transfer just 2 results.&lt;/P&gt;
&lt;P&gt;DMA-&amp;gt;TCD[0].SLAST = DMA_TCD_SLAST_SLAST(-8); // Last Source Address Adjustment is -4*2 = 8&lt;/P&gt;
&lt;P&gt;DMA-&amp;gt;TCD[0].CITER.ELINKNO = DMA_TCD_CITER_ELINKNO_CITER(2) // Current Major Iteration Count is 2&lt;/P&gt;
&lt;P&gt;DMA-&amp;gt;TCD[0].DLASTSGA = DMA_TCD_DLASTSGA_DLASTSGA(-8); // Destination last address adjustment is -8&lt;/P&gt;
&lt;P&gt;DMA-&amp;gt;TCD[0].BITER.ELINKNO = DMA_TCD_BITER_ELINKNO_BITER(2) | // Starting major iteration count is 2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/500-kbps-Sampling-ADC-on-CAN-channel/m-p/1246427#M10199</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-03-16T12:17:34Z</dc:date>
    </item>
  </channel>
</rss>

