<?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: PWM_BCTU_ADC in S32K</title>
    <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013670#M44239</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;With respect to your timing diagram, would the 'BCTU Trigger' be triggered every time the ADC is triggered by the BCTU (BCTU output trigger) or the eMIOS triggers the BCTU (BCTU input trigger)?&lt;BR /&gt;&lt;BR /&gt;Also, if we have a MPC (cross trigger) where the 6 signals were triggered in the below way:&lt;BR /&gt;- signal 1 and signal 2 parallelly sampled&lt;BR /&gt;- signal 3 and signal 4 parallelly sampled&lt;BR /&gt;- signal 5 and signal 6 parallelly sampled&lt;BR /&gt;Would we still see the 'BCTU Trigger' triggered 6 times or 3?&lt;BR /&gt;</description>
    <pubDate>Fri, 13 Dec 2024 14:36:03 GMT</pubDate>
    <dc:creator>Samuel_DCosta</dc:creator>
    <dc:date>2024-12-13T14:36:03Z</dc:date>
    <item>
      <title>PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011216#M44102</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I am currently designing an ADC reading system where I trigger the BCTU using PWM flags in OPWMT mode. I have set up three triggers for the BCTU, each offset to ensure that signals are sampled sequentially and stored in the FIFO in the correct order. This way, I can be certain that the data in FIFO[0] corresponds to the first signal, FIFO[1] to the second signal, and FIFO[2] to the third signal.&lt;/P&gt;&lt;P&gt;The setup is as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PWM Trigger CH3&amp;nbsp;—&amp;gt;&amp;nbsp;BCTU&amp;nbsp;—&amp;gt;&amp;nbsp;ADC 0&lt;/LI&gt;&lt;LI&gt;PWM Trigger CH1&amp;nbsp;—&amp;gt;&amp;nbsp;BCTU&amp;nbsp;—&amp;gt;&amp;nbsp;ADC 1&lt;/LI&gt;&lt;LI&gt;PWM Trigger CH2&amp;nbsp;—&amp;gt;&amp;nbsp;BCTU&amp;nbsp;—&amp;gt;&amp;nbsp;ADC 2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;I have designed my ADC reading system as described, but the signals are not appearing in the correct order. Could you please assist me with this issue? I have attached my project.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 16:49:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011216#M44102</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2024-12-10T16:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011382#M44114</link>
      <description>2) for OPMMT mode , to calculate the offset .&lt;BR /&gt;Offset in ticks = core clock * time (us) . But the trigger start from 1 .&lt;BR /&gt;My question is is the the formula above should be +1 or -1 ??</description>
      <pubDate>Tue, 10 Dec 2024 23:51:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011382#M44114</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2024-12-10T23:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011785#M44145</link>
      <description>Additional Information :&lt;BR /&gt;S32K344&lt;BR /&gt;RTD 5.0.0</description>
      <pubDate>Wed, 11 Dec 2024 08:32:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011785#M44145</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2024-12-11T08:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011892#M44151</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Ayaz&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I'm sorry, I'm dealing with your problem, but it will take me some time to figure out the reason, please be patient&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>Thu, 12 Dec 2024 09:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011892#M44151</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2024-12-12T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011934#M44155</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188029"&gt;@Senlent&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;I would like to know the order of signals that is stored in the BCTU FIFO considering trigger offsets.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;ADC0 signals are grouped together and a single trigger triggers it (no cross triggering). The same is done with ADC1 and ADC2.&lt;BR /&gt;&lt;BR /&gt;Now, since I have offset the triggers, I would expect that the BCTU FIFO is filled in the order of the offset.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Consider the example that I sent you (all in OPWMT mode):&lt;BR /&gt;&lt;BR /&gt;EMIOS_0_3 has an offset value of 1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_0-1733912160053.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315358i309BD0417EDF248A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_0-1733912160053.png" alt="Ayaz_0-1733912160053.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EMIOS_0_1 has an offset of 312&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_1-1733912208115.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315360i8461E60FDD3EBA8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_1-1733912208115.png" alt="Ayaz_1-1733912208115.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EMIOS_0_2 has an offset of 416&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_2-1733912237387.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315361iEC260BD9AEA60E2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_2-1733912237387.png" alt="Ayaz_2-1733912237387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is my BCTU configuration&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_3-1733912296640.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315362i60F539C417B01B62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_3-1733912296640.png" alt="Ayaz_3-1733912296640.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_4-1733912307270.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315363iDE06B0EA309A24EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_4-1733912307270.png" alt="Ayaz_4-1733912307270.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_5-1733912317463.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315364iF52D79E883BF9A9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_5-1733912317463.png" alt="Ayaz_5-1733912317463.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I plotted the eMIOS trigger I can see the trigger offset on the oscilloscope.&lt;/P&gt;&lt;P&gt;Considering that the BCTU FIFO is empty at the start, I expect that the EMIOS_0_3 will be the first to generate a trigger to the BCTU.&amp;nbsp;The signals&amp;nbsp;ADC0_A_RD and&amp;nbsp;ADC0_B_RD will be sampled first and will be filled in the BCTU FIFO[0] and&amp;nbsp;BCTU FIFO[1].&lt;BR /&gt;&lt;BR /&gt;The next trigger will be&amp;nbsp;EMIOS_0_1 and will sample the signals&amp;nbsp;ADC1_A and&amp;nbsp;ADC1_B. These 2 values will be stored in the&amp;nbsp;BCTU FIFO[2] and&amp;nbsp;BCTU FIFO[3] respectively.&lt;BR /&gt;&lt;BR /&gt;Finally the last trigger&amp;nbsp;EMIOS_0_2 which will sample&amp;nbsp;ADC2_A and&amp;nbsp;ADC2_B and store it in&amp;nbsp;BCTU FIFO[2] and&amp;nbsp;BCTU FIFO[3] respectively&lt;STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;But when I read the first 6 BCTU FIFO values using&amp;nbsp;Bctu_Ip_GetFifoResult API I see the following order&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ayaz_6-1733913266457.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315369i4A9F02D3258F6B27/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ayaz_6-1733913266457.png" alt="Ayaz_6-1733913266457.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is not as per the expectation. Could you help me with what is going wrong?&lt;BR /&gt;&lt;BR /&gt;P.S.: The sample time for all the ADC's are the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 10:37:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011934#M44155</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2024-12-11T10:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011994#M44160</link>
      <description>The sequence must be&lt;BR /&gt;eMios0_Ch3-&amp;gt;ADC0.Ch38&lt;BR /&gt;&lt;BR /&gt;eMios0_Ch3-&amp;gt;ADC0.Ch39&lt;BR /&gt;&lt;BR /&gt;eMios0_Ch1-&amp;gt;ADC1.Ch6&lt;BR /&gt;&lt;BR /&gt;eMios0_Ch1-&amp;gt;ADC1.Ch7&lt;BR /&gt;&lt;BR /&gt;eMios0_Ch2-&amp;gt;ADC2_Ch4&lt;BR /&gt;&lt;BR /&gt;eMios0_Ch2-&amp;gt;ADC2_Ch3</description>
      <pubDate>Wed, 11 Dec 2024 11:45:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2011994#M44160</guid>
      <dc:creator>Ayaz</dc:creator>
      <dc:date>2024-12-11T11:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013592#M44233</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Ayaz&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This is probably because the interval between your emios triggering BCTU is too short, causing a timing error. You can increase the trigger interval and try again.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1734091419894.png" style="width: 679px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315808iF5CE3F954FA708C7/image-dimensions/679x324?v=v2" width="679" height="324" role="button" title="Senlent_0-1734091419894.png" alt="Senlent_0-1734091419894.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="Senlent_1-1734091446907.png" style="width: 683px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315809iCB20E038E95F7D67/image-dimensions/683x352?v=v2" width="683" height="352" role="button" title="Senlent_1-1734091446907.png" alt="Senlent_1-1734091446907.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 12:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013592#M44233</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2024-12-13T12:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013670#M44239</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;With respect to your timing diagram, would the 'BCTU Trigger' be triggered every time the ADC is triggered by the BCTU (BCTU output trigger) or the eMIOS triggers the BCTU (BCTU input trigger)?&lt;BR /&gt;&lt;BR /&gt;Also, if we have a MPC (cross trigger) where the 6 signals were triggered in the below way:&lt;BR /&gt;- signal 1 and signal 2 parallelly sampled&lt;BR /&gt;- signal 3 and signal 4 parallelly sampled&lt;BR /&gt;- signal 5 and signal 6 parallelly sampled&lt;BR /&gt;Would we still see the 'BCTU Trigger' triggered 6 times or 3?&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Dec 2024 14:36:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013670#M44239</guid>
      <dc:creator>Samuel_DCosta</dc:creator>
      <dc:date>2024-12-13T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: PWM_BCTU_ADC</title>
      <link>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013902#M44257</link>
      <description>&lt;P&gt;Hi@&lt;SPAN&gt;Samuel_DCosta&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;STRONG&gt;Please ignore the previous answer&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;1.Would the 'BCTU Trigger' be triggered every time the ADC is triggered by the BCTU (BCTU output trigger) or the eMIOS triggers the BCTU (BCTU input trigger)?&lt;/U&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to the BCTU MCR-&amp;gt;TRGF register,it should be the fisrt one which is BCTU output trigger to ADC.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1734243968271.png" style="width: 654px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315898i4E0A21D9C30B5F79/image-dimensions/654x118?v=v2" width="654" height="118" role="button" title="Senlent_0-1734243968271.png" alt="Senlent_0-1734243968271.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;2.Also, if we have a MPC (cross trigger) where the 6 signals were triggered in the below way:&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;- signal 1 and signal 2 parallelly sampled&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;- signal 3 and signal 4 parallelly sampled&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;- signal 5 and signal 6 parallelly sampled&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;Would we still see the 'BCTU Trigger' triggered 6 times or 3?&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;This is related to your BCTU configuration. You need to give me a specific configuration so that I can answer your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In short, &lt;STRONG&gt;there is no problem with your project and your's understanding is right&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I modified your demo and tested it.（Please refer to the attachments）&lt;/P&gt;
&lt;P&gt;The incorrect data order in the FIFO may be caused by the following reasons.&lt;/P&gt;
&lt;P&gt;You will find that this is because there are some problems in the first cycle of PWM, which leads to inconsistent FIFO storage order.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_2-1734246801406.png" style="width: 759px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315900i75D6D84B6FD57FF0/image-dimensions/759x386?v=v2" width="759" height="386" role="button" title="Senlent_2-1734246801406.png" alt="Senlent_2-1734246801406.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I modified the trigger points of OPWMT to Ch3, Ch1, Ch2, the watermask value is 3, and the sampling is 4 times each time the trigger is triggered, for a total of 12 samples.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_3-1734246891284.png" style="width: 731px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315901i509B417A94D2E794/image-dimensions/731x380?v=v2" width="731" height="380" role="button" title="Senlent_3-1734246891284.png" alt="Senlent_3-1734246891284.png" /&gt;&lt;/span&gt;&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>Sun, 15 Dec 2024 07:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/PWM-BCTU-ADC/m-p/2013902#M44257</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2024-12-15T07:27:26Z</dc:date>
    </item>
  </channel>
</rss>

