<?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 Delay Function in msec in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594111#M22591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by superkato on Wed Apr 08 05:25:05 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;does someone has a example for a simple delay function in milliseconds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;like: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delay(1000); //1sec delay&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;

void Delay(uint32_t msecs)
{
&amp;nbsp; while (msecs != 0)&amp;nbsp;&amp;nbsp; 
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something with the systicktimer;
&amp;nbsp; }

}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:23:25 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:23:25Z</dc:date>
    <item>
      <title>Delay Function in msec</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594111#M22591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by superkato on Wed Apr 08 05:25:05 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;does someone has a example for a simple delay function in milliseconds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;like: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delay(1000); //1sec delay&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;

void Delay(uint32_t msecs)
{
&amp;nbsp; while (msecs != 0)&amp;nbsp;&amp;nbsp; 
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something with the systicktimer;
&amp;nbsp; }

}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594111#M22591</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in msec</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594112#M22592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nerd herd on Wed Apr 08 07:28:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi superkato,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to get your thought process going, a basic delay function can be implemented by using a timer interrupt (Systick works fine) and sleep mode. The idea is that you start a timer that will count for the desired delay duration. While it is counting, the MCU can be put into Sleep mode ensuring no code is being executed. Once the timer goes off, the interrupt will wake up the MCU and resume code execution. You can then disable the timer and exit the delay function.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:23:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594112#M22592</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in msec</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594113#M22593</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 Wed Apr 08 09:24:24 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fwhat-do-you-use-to-delay" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/what-do-you-use-to-delay&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:23:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-msec/m-p/594113#M22593</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:23:27Z</dc:date>
    </item>
  </channel>
</rss>

