<?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>LPCXpresso IDEのトピックlpc1769 - timer match register</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565474#M18028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by inspire on Sun Jan 13 05:11:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the LPCXpresso examples for the timer the MR0 register is set to the value where the timer interrupt occurs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define TIME_INTERVALmS&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000
...
LPC_TIM0-&amp;gt;MR0 = TIME_INTERVALmS * 10; /* Set up 10 mS interval */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now I wonder if this is absolutely right this way? When the interrupt occurs the TC value is reset. So TC moves between 0 and TIME_INTERVALmS * 10 = 10000. But this means that 10000+1 ticks have to pass until the interrupt occurs, right? So shouldn't MR0 be (TIME_INTERVALmS * 10) - 1?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a nice sunday! &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inspire&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:23:56 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:23:56Z</dc:date>
    <item>
      <title>lpc1769 - timer match register</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565474#M18028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by inspire on Sun Jan 13 05:11:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the LPCXpresso examples for the timer the MR0 register is set to the value where the timer interrupt occurs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define TIME_INTERVALmS&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000
...
LPC_TIM0-&amp;gt;MR0 = TIME_INTERVALmS * 10; /* Set up 10 mS interval */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now I wonder if this is absolutely right this way? When the interrupt occurs the TC value is reset. So TC moves between 0 and TIME_INTERVALmS * 10 = 10000. But this means that 10000+1 ticks have to pass until the interrupt occurs, right? So shouldn't MR0 be (TIME_INTERVALmS * 10) - 1?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a nice sunday! &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inspire&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:23:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565474#M18028</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1769 - timer match register</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565475#M18029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Sun Jan 13 05:23:43 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are right of course - to get N ticks you should load N-1 to MR.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:23:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565475#M18029</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: lpc1769 - timer match register</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565476#M18030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by inspire on Sun Jan 13 05:31:52 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;okay thanks! :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:23:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/lpc1769-timer-match-register/m-p/565476#M18030</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:23:57Z</dc:date>
    </item>
  </channel>
</rss>

