<?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: LPC1768 TimerInterval question in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592825#M30183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Apr 09 07:25:45 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;UM10360: Peripheral Clock Selection registers 0 and 1 (PCLKSEL0 -0x400F C1A8 and PCLKSEL1 - 0x400F C1AC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PCLK_TIMER0 Peripheral clock selection for TIMER0. Default&amp;nbsp; 00 = CCLK/4 :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peripherals are&amp;nbsp; using clock divider. Default setting is 4, so either you set your divider to 1 or you change your timer setup&amp;nbsp; ;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:52:26 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:52:26Z</dc:date>
    <item>
      <title>LPC1768 TimerInterval question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592823#M30181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by julivico on Mon Apr 01 07:54:57 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, i'm beginer with Microcontroller. I have a LPC1768.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to question for functione "init_timer" and variable "TimerInterval"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;uint32_t init_timer ( uint8_t timer_num, uint32_t TimerInterval ) &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; if ( timer_num == 0 )&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;timer0_counter = 0;&lt;BR /&gt;LPC_TIM0-&amp;gt;MR0 = TimerInterval;&lt;BR /&gt;LPC_TIM0-&amp;gt;MCR = 3;/* Interrupt and Reset on MR0 */&lt;BR /&gt;&lt;BR /&gt;NVIC_EnableIRQ(TIMER0_IRQn);&lt;BR /&gt;return (1);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; else if ( timer_num == 1 )&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;timer1_counter = 0;&lt;BR /&gt;LPC_TIM1-&amp;gt;MR0 = TimerInterval;&lt;BR /&gt;LPC_TIM1-&amp;gt;MCR = 3;/* Interrupt and Reset on MR1 */&lt;BR /&gt;&lt;BR /&gt;NVIC_EnableIRQ(TIMER1_IRQn);&lt;BR /&gt;return (1);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; return (0);&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in main() function i have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;init_timer( 0, TIME_INTERVAL );&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i want to make an interrupt every ms. and i have found that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;#define TIME_INTERVAL(SystemCoreClock/1000 - 1)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemCoreClock is 100MHz. But that isn't correct. That is too slow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If i make with (SystemCoreClock/4/1000 - 1), than it's ok. Can someone explain me why???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:52:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592823#M30181</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 TimerInterval question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592824#M30182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by julivico on Tue Apr 09 05:58:35 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;no one can help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:52:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592824#M30182</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 TimerInterval question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592825#M30183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Apr 09 07:25:45 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;UM10360: Peripheral Clock Selection registers 0 and 1 (PCLKSEL0 -0x400F C1A8 and PCLKSEL1 - 0x400F C1AC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PCLK_TIMER0 Peripheral clock selection for TIMER0. Default&amp;nbsp; 00 = CCLK/4 :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peripherals are&amp;nbsp; using clock divider. Default setting is 4, so either you set your divider to 1 or you change your timer setup&amp;nbsp; ;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:52:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1768-TimerInterval-question/m-p/592825#M30183</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:52:26Z</dc:date>
    </item>
  </channel>
</rss>

