<?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 S32K146 PDB Example ERROR in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1452260#M15243</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to understand few things with this example.&lt;/P&gt;&lt;P&gt;How do I get a 1.2ms period (see comment) with this configuration :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_0-1651754920848.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178893iFF43C95EF677E0B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_0-1651754920848.png" alt="f_gaudon_0-1651754920848.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can read In the RM :&amp;nbsp;Counting uses : (peripheral clock)/(MULT x PRESCALAR)&lt;/P&gt;&lt;P&gt;Here we got 80MHz / (40*128) = 15625 and PDB0-&amp;gt;MOD = 14400 so I got a 1,085Hz freq .&lt;/P&gt;&lt;P&gt;Do I get something wrong with this ?&lt;/P&gt;&lt;P&gt;While debugging, I can see that I need more than 1.2ms ton reenter in my interruption but if I comment the line ADC_result = ADC0-&amp;gt;R[0]; I reenter in my interruption without delay. Do the reading clear any flag ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ISR code :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_1-1651754963317.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178895i6AA999564E10DEB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_1-1651754963317.png" alt="f_gaudon_1-1651754963317.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answers,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 12:49:44 GMT</pubDate>
    <dc:creator>f_gaudon</dc:creator>
    <dc:date>2022-05-05T12:49:44Z</dc:date>
    <item>
      <title>S32K146 PDB Example ERROR</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1452260#M15243</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to understand few things with this example.&lt;/P&gt;&lt;P&gt;How do I get a 1.2ms period (see comment) with this configuration :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_0-1651754920848.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178893iFF43C95EF677E0B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_0-1651754920848.png" alt="f_gaudon_0-1651754920848.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can read In the RM :&amp;nbsp;Counting uses : (peripheral clock)/(MULT x PRESCALAR)&lt;/P&gt;&lt;P&gt;Here we got 80MHz / (40*128) = 15625 and PDB0-&amp;gt;MOD = 14400 so I got a 1,085Hz freq .&lt;/P&gt;&lt;P&gt;Do I get something wrong with this ?&lt;/P&gt;&lt;P&gt;While debugging, I can see that I need more than 1.2ms ton reenter in my interruption but if I comment the line ADC_result = ADC0-&amp;gt;R[0]; I reenter in my interruption without delay. Do the reading clear any flag ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ISR code :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_1-1651754963317.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178895i6AA999564E10DEB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_1-1651754963317.png" alt="f_gaudon_1-1651754963317.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answers,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 12:49:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1452260#M15243</guid>
      <dc:creator>f_gaudon</dc:creator>
      <dc:date>2022-05-05T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 PDB Example ERROR</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1455735#M15346</link>
      <description>&lt;P&gt;I just put this piece of code in the ADC ISR :&amp;nbsp;&lt;/P&gt;&lt;P&gt;PTB-&amp;gt; PTOR |= 1 &amp;lt;&amp;lt; 17; // Toggle&lt;/P&gt;&lt;P&gt;And this is what I see with my scope :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDS00001.png" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/179363i9C4607708577C45C/image-size/large?v=v2&amp;amp;px=999" role="button" title="SDS00001.png" alt="SDS00001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have the 1,09 Hz freq I calculated ...&lt;/P&gt;&lt;P&gt;When I open the project in SDK example it says :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_0-1652189332055.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/179364iE8CCF11182D8EB40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_0-1652189332055.png" alt="f_gaudon_0-1652189332055.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Period = 9ms&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in the code comment :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f_gaudon_1-1652189365945.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/179366i0B5599C23A8B4FEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f_gaudon_1-1652189365945.png" alt="f_gaudon_1-1652189365945.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can see on my scope 0,91s period.&lt;/P&gt;&lt;P&gt;Which one of those periods is the correct one ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 13:30:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1455735#M15346</guid>
      <dc:creator>f_gaudon</dc:creator>
      <dc:date>2022-05-10T13:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 PDB Example ERROR</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1462965#M15622</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;your calculation is correct and you confirmed it by measurement you did.&lt;BR /&gt;Unfortunately example description here is wrong.&lt;BR /&gt;You need to read ADC result register to clear COCO flag.&amp;nbsp;An interrupt is generated if the respective SC1n[AIEN] and&amp;nbsp;SC1n[COCO] are set.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 07:00:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-PDB-Example-ERROR/m-p/1462965#M15622</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-05-24T07:00:46Z</dc:date>
    </item>
  </channel>
</rss>

