<?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>LPC MicrocontrollersのトピックRe: How to generate nano seconds delay in LPC1768</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-generate-nano-seconds-delay-in-LPC1768/m-p/1151400#M42182</link>
    <description>&lt;P&gt;How many nanoseconds? If you are running at 100Mhz, each instruction will take at least 10nS (you also have to factor in flash waits states etc). A very very tight loop with a counter is going to take 50-100nS. Then factor in function calls and bit manipulation (if you want to set GPIOs), then I doubt you could get better than 250nS minimum (I’ve not done exact calculation, so this is ballpark)&lt;/P&gt;</description>
    <pubDate>Thu, 10 Sep 2020 07:39:38 GMT</pubDate>
    <dc:creator>converse</dc:creator>
    <dc:date>2020-09-10T07:39:38Z</dc:date>
    <item>
      <title>How to generate nano seconds delay in LPC1768</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-generate-nano-seconds-delay-in-LPC1768/m-p/1151282#M42181</link>
      <description>&lt;P&gt;We are trying to develop the nano seconds delay but ended up with 1 us delay minimum.&lt;/P&gt;&lt;P&gt;init_timer()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;LPC_SC-&amp;gt;PCONP |= (1&amp;lt;&amp;lt;SBIT_TIMER0) | (1&amp;lt;&amp;lt;SBIT_TIMER1); /* Power ON Timer0,1 */&lt;/P&gt;&lt;P&gt;LPC_TIM0-&amp;gt;MCR = (1&amp;lt;&amp;lt;SBIT_MR0I) | (1&amp;lt;&amp;lt;SBIT_MR0R); /* Clear TC on MR0 match and Generate Interrupt*/&lt;BR /&gt;LPC_TIM0-&amp;gt;PR = 0;//&lt;BR /&gt;LPC_TIM0-&amp;gt;MR0 = 10;//&lt;BR /&gt;LPC_TIM0-&amp;gt;TCR = (1 &amp;lt;&amp;lt;SBIT_CNTEN); /* Start timer by setting the Counter Enable*/&lt;BR /&gt;NVIC_EnableIRQ(TIMER0_IRQn);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void TIMER0_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;unsigned int isrMask;&lt;/P&gt;&lt;P&gt;isrMask = LPC_TIM0-&amp;gt;IR;&lt;BR /&gt;LPC_TIM0-&amp;gt;IR = isrMask; /* Clear the Interrupt Bit */&lt;/P&gt;&lt;P&gt;LPC_GPIO0-&amp;gt;FIOPIN ^= (1&amp;lt;&amp;lt;LED1); /* Toggle the LED1 (P2_0) */&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 05:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-generate-nano-seconds-delay-in-LPC1768/m-p/1151282#M42181</guid>
      <dc:creator>swapnil_sawrkar</dc:creator>
      <dc:date>2020-09-10T05:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate nano seconds delay in LPC1768</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-generate-nano-seconds-delay-in-LPC1768/m-p/1151400#M42182</link>
      <description>&lt;P&gt;How many nanoseconds? If you are running at 100Mhz, each instruction will take at least 10nS (you also have to factor in flash waits states etc). A very very tight loop with a counter is going to take 50-100nS. Then factor in function calls and bit manipulation (if you want to set GPIOs), then I doubt you could get better than 250nS minimum (I’ve not done exact calculation, so this is ballpark)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 07:39:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-generate-nano-seconds-delay-in-LPC1768/m-p/1151400#M42182</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2020-09-10T07:39:38Z</dc:date>
    </item>
  </channel>
</rss>

