<?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: Delay Function in MCUXpresso (like Arduino) in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565969#M50969</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Your point is not a good reason for NXP to not provide sleep functions like Arduino does, nor just to discredit other platforms.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;All my project managers up to now are disagreeing with you.&lt;BR /&gt;Higher BOM costs for a more performant MCU just to safe an hour or two of development time is a no-go in commercial projects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This might be different in private projects.&lt;BR /&gt;Arduino is a library that abstracts the hardware level to a certain degree, and lowers the entry barrier for beginners and hobbyists. Which is not a bad thing - unless you have a commercial project with strict BOM cost constraints.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By the way, one certain way to recognize Arduino users in MCU fora used to be the question "How fast can that MCU toggle a GPIO ?".&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 14:24:41 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2022-12-07T14:24:41Z</dc:date>
    <item>
      <title>Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1292609#M45479</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am just wondering if there is a delay function in the MCUXpresso IDE. For example, I am wanting to create a 1 second delay in my program, and I am wondering if there is a nice function to use instead of creating nested for loops.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in Arduino code, I would just use the function:&lt;/P&gt;&lt;P&gt;delay(1000);&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 13:11:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1292609#M45479</guid>
      <dc:creator>caden013</dc:creator>
      <dc:date>2021-06-15T13:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1292626#M45481</link>
      <description>&lt;P&gt;To be honest, Arduino is not the best template for professional SW development, to say the least.&lt;/P&gt;&lt;P&gt;Delay functions (busy idling) are one of the worst choices, better use a timer peripheral.&lt;/P&gt;&lt;P&gt;I used to use the SysTick timer available in all Cortex M devices. Set it up at a proper cycle (e.g. 10ms), and handle your delay functionality in the respective interrupt handler.&lt;/P&gt;&lt;P&gt;This way, you can run multiple different delay in parallel without interference and very little performance impact.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 13:29:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1292626#M45481</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-06-15T13:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1423548#M48121</link>
      <description>&lt;P&gt;can someone explain the function principle of the SysTick from the Demo LED Blink example code?&lt;/P&gt;&lt;P&gt;What happen if I want to have a smaller delay, like us?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 00:36:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1423548#M48121</guid>
      <dc:creator>auftrag2021</dc:creator>
      <dc:date>2022-03-07T00:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565323#M50951</link>
      <description>&lt;P&gt;To be honest, a knife may &lt;U&gt;NOT&lt;/U&gt;&amp;nbsp;always be the best option to split an object in two parts, for this reason humans introduced scissors,&amp;nbsp;&lt;SPAN&gt;hacksaws, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And for the exact same reason, busy idling may be the worst solution in some circumstances while may be the &lt;U&gt;BEST&lt;/U&gt; solution in other circumstances. Your point is not a good reason for NXP to not provide sleep functions like Arduino does, nor just to discredit other platforms.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 08:17:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565323#M50951</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2022-12-07T08:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565367#M50953</link>
      <description>&lt;P&gt;It works that way:&lt;/P&gt;&lt;P&gt;typically the SysTick is configured for 1 ms. You set a counter value, and the SysTick counts that value down. You wait until that counter is down to zero.&lt;/P&gt;&lt;P&gt;Of course that might depend on the exact example, but this is how it is usually done.&lt;/P&gt;&lt;P&gt;If you want in the us range, you have to increase the speed of the SysTick (say to 100 us) and count it down the same way.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 18:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565367#M50953</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-12-06T18:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565372#M50954</link>
      <description>&lt;P&gt;If you are looking for 'busy wait' routines, then you might have a look at the McuWait (.c and .h) in &lt;A href="https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib/src" target="_blank"&gt;https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib/src&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is what I use, and it provides busy waiting with cycles, milliseconds and microseconds. It uses 'burning nops' or hardware cycle counters if available.&lt;/P&gt;&lt;P&gt;So you can use things like McuWait_Waitms(100) or McuWait_Waitus(10) or even McuWait_Waitns(50).&lt;/P&gt;&lt;P&gt;Just keep in mind that the waiting time (of course) does not consider time spent in interrupts.&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 18:36:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565372#M50954</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-12-06T18:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565760#M50966</link>
      <description>&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;thanks for your suggestion,&amp;nbsp;I just meant to emphasize the fact that often, if not always, there is no one-size-fits-all way to tell what is the best or worst option for doing something.&lt;/P&gt;&lt;P&gt;And that&amp;nbsp;actively checking against systick timer current count IS busy waiting; and that NXP SDK is not providing a built-in function for this, while others do... YAWN!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 08:16:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565760#M50966</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2022-12-07T08:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565969#M50969</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Your point is not a good reason for NXP to not provide sleep functions like Arduino does, nor just to discredit other platforms.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;All my project managers up to now are disagreeing with you.&lt;BR /&gt;Higher BOM costs for a more performant MCU just to safe an hour or two of development time is a no-go in commercial projects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This might be different in private projects.&lt;BR /&gt;Arduino is a library that abstracts the hardware level to a certain degree, and lowers the entry barrier for beginners and hobbyists. Which is not a bad thing - unless you have a commercial project with strict BOM cost constraints.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By the way, one certain way to recognize Arduino users in MCU fora used to be the question "How fast can that MCU toggle a GPIO ?".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 14:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1565969#M50969</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-12-07T14:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delay Function in MCUXpresso (like Arduino)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1586064#M51338</link>
      <description>Hello Frank,&lt;BR /&gt;yes, I know it doesn't take so much time and effort to code a sleep function using busy wait, using a timer or whatever... what I meant was simply that, in my modest opinion (and all your project managers are better than me, for sure) to code a new sleep function each time I switch to a new platform is just a big annoyance as a developer...&lt;BR /&gt;Coding is fun, don't forget! &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;</description>
      <pubDate>Fri, 20 Jan 2023 14:20:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Delay-Function-in-MCUXpresso-like-Arduino/m-p/1586064#M51338</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2023-01-20T14:20:02Z</dc:date>
    </item>
  </channel>
</rss>

