<?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: PDB continuous mode timing in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325913#M15001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The modulus value in MOD register, is used to reset the counter back to zero at the end of the count. If SC[CONT] bit is set, the counter will then resume a new count. Otherwise, the counter operation will cease until the next trigger input event occurs.&lt;/P&gt;&lt;P&gt;If it was in continuous mode, the period should be (MOD+1),so:&amp;nbsp; 46.08MHz / (1920+1) = 23.9875kHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using systick to measure the period of PDB interrupt, we can also get the 2*(MOD+1) of core clock cycle. Just because the PDB use the bus clock which is half of core clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2014 08:13:24 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2014-08-05T08:13:24Z</dc:date>
    <item>
      <title>PDB continuous mode timing</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325911#M14999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Running the PDB in continuous mode, how do I calculate the timebase? ie the periodicity of the PDB interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm on a K10, with a 92.16MHz core, 46.08MHz bus, and 23.04MHz flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PDB set with PRESCALER = 0, MULT = 0, MOD 1920.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With these settings I was assuming the PDB would have a cycle time of 46.08MHz / 1920 = 24.000kHz. What I actually get is a cycle time of slightly longer, so a lower frequency, something like 23.98kHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had assumed that when PDBx_CNT reached MOD - 1, it wrapped to zero and continued without additional delay. This seems not to be the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The manual says...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Trigger input event to pre-trigger m = (prescaler X multiplication factor X delay m) +&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 peripheral clock cycles"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...which suggests that maybe there could be a 2 clk delay when the wrap round occurs, if this is treated as a trigger input event every time. So investigating this gives...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOD: 1920, PDB F: 23.98kHz&lt;/P&gt;&lt;P&gt;MOD: 1919, PDB F: 24.00kHz&lt;/P&gt;&lt;P&gt;MOD: 1918, PDB F: 24.02kHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there was 2 clock cycles added, I would have thought 1918 would give the closest match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what am I missing, any suggestions welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 17:03:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325911#M14999</guid>
      <dc:creator>billnd</dc:creator>
      <dc:date>2014-07-29T17:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: PDB continuous mode timing</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325912#M15000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi billnd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell us how did you measure the frequency of the PDB interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 07:25:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325912#M15000</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2014-08-05T07:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: PDB continuous mode timing</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325913#M15001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The modulus value in MOD register, is used to reset the counter back to zero at the end of the count. If SC[CONT] bit is set, the counter will then resume a new count. Otherwise, the counter operation will cease until the next trigger input event occurs.&lt;/P&gt;&lt;P&gt;If it was in continuous mode, the period should be (MOD+1),so:&amp;nbsp; 46.08MHz / (1920+1) = 23.9875kHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using systick to measure the period of PDB interrupt, we can also get the 2*(MOD+1) of core clock cycle. Just because the PDB use the bus clock which is half of core clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 08:13:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PDB-continuous-mode-timing/m-p/325913#M15001</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2014-08-05T08:13:24Z</dc:date>
    </item>
  </channel>
</rss>

