<?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のトピックRe: counting every 1micro seconds using systick</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553495#M12795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ToBeFrank on Fri Oct 21 15:43:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: black_ghost&lt;/STRONG&gt;&lt;BR /&gt;Hi everyone i am trying to use the systick timer as a delay functiion. i looked at the examples from the library and found the systick timer counting every 1ms. but i also want to use systick to count every 1us.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want a delay with microsecond resolution, use a timer, not the systick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:30:02 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:30:02Z</dc:date>
    <item>
      <title>counting every 1micro seconds using systick</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553493#M12793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by black_ghost on Wed Oct 19 23:38:18 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi everyone i am trying to use the systick timer as a delay functiion. i looked at the examples from the library and found the systick timer counting every 1ms. but i also want to use systick to count every 1us. does anyone have an idea. i am using lpc1769 by the way. i was thinking calling of using another systick handler or dividing by 1E6&amp;nbsp; again but dont think thats a right approach.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;volatile uint32_t msTicks;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void SysTick_Handler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msTicks++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;static void ms_delay(uint32_t delayTicks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t currentTicks;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentTicks = msTicks;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((msTicks-currentTicks)&amp;lt;delayTicks);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int main()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (SysTick_Config(SystemFrequency / 1000)) // counts every 1ms&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:30:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553493#M12793</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: counting every 1micro seconds using systick</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553494#M12794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_Europe on Fri Oct 21 06:03:03 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1us is extremely short if you need to take into account the overhead from the ISR, and any additional processing that you need to do, etc.&amp;nbsp; At 100 MHz 1us leaves you 100 clock cycles between each 'tick'.&amp;nbsp; That's not a lot if you need to do anything else.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:30:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553494#M12794</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: counting every 1micro seconds using systick</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553495#M12795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ToBeFrank on Fri Oct 21 15:43:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: black_ghost&lt;/STRONG&gt;&lt;BR /&gt;Hi everyone i am trying to use the systick timer as a delay functiion. i looked at the examples from the library and found the systick timer counting every 1ms. but i also want to use systick to count every 1us.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want a delay with microsecond resolution, use a timer, not the systick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:30:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/counting-every-1micro-seconds-using-systick/m-p/553495#M12795</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:30:02Z</dc:date>
    </item>
  </channel>
</rss>

