<?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: micros &amp; millis in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513339#M129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Wed Nov 12 11:35:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Not with the Systick timer, because it wasn't neccessary for me yet. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use StopWatch_DelayUS() from LPCOpen instead which uses the RIT timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at the documentation in the package for LPC15xx:&lt;/SPAN&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%2Fsystem%2Ffiles%2Flpcopen_2_08c_docs_15xx.zip" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/system/files/lpcopen_2_08c_docs_15xx.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:06:42 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:06:42Z</dc:date>
    <item>
      <title>micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513336#M126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Wed Nov 12 01:18:48 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have somebody implemented microseconds counter with the timers available on lpc1549.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried with the systick timer&amp;nbsp; but i am not sure if it can get under 1 ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boyko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513336#M126</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513337#M127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sandy_493 on Wed Nov 12 04:40:35 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello bobi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the sample code that i have implemented to generate 1 msec using systick interrupt. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sysTickRate = Chip_Clock_GetSysTickClockRate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// sysTickRate&amp;nbsp; = 72000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Enable and setup SysTick Timer at a periodic rate */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SysTick_Config(sysTickRate/ 1000 ); @ 1msec &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513337#M127</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513338#M128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sandy_493 on Wed Nov 12 04:42:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello bobi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the sample code that i have implemented to generate 1 msec using systick interrupt. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sysTickRate = Chip_Clock_GetSysTickClockRate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// sysTickRate&amp;nbsp; = 72000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Enable and setup SysTick Timer at a periodic rate */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SysTick_Config(sysTickRate/ 1000 ); @ 1msec &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513338#M128</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513339#M129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Wed Nov 12 11:35:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Not with the Systick timer, because it wasn't neccessary for me yet. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use StopWatch_DelayUS() from LPCOpen instead which uses the RIT timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at the documentation in the package for LPC15xx:&lt;/SPAN&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%2Fsystem%2Ffiles%2Flpcopen_2_08c_docs_15xx.zip" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/system/files/lpcopen_2_08c_docs_15xx.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513339#M129</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513340#M130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Wed Nov 12 16:33:03 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What's your aim?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Being able to measure us or sub-us delays? That enables you to create delays in that range easily, too. For this, I would use one SCT with 32bit counter, just free running. Reading out the timer value is simply looking at the clock (of PCLKs). Use 32bit math and you're fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) If you want exactly 1us per tick (in some special register, NOT one or even multiple variables in RAM incremented) I would try to use one SCT split into 2 16-bit counters and use one part as a pre-scaler and the other as the clock counter. Use 16bit math here and you're fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A very special case of course could be a clock of 1 &amp;lt; &amp;lt; n MHz, using approach 1) but dividing by &amp;gt; &amp;gt; n and applying special overflow handling when calculating differences t1-t0 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just theory, I find myself doing timings with MRT and SYSTICK instead of the simple approach with T0.TC+T0.PR on the 'old' uCs. ARM had better includes a prescaler into SYSTICK, really. Saved a few gates at the expense of umpteen words of code&amp;nbsp; :~ &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: forget about 2) !&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There [color=#f00]is[/color] a pre-scaler in the SCT and it provides enough range (1..256) to scale to 1 MHz (1us). I'm working on something very similar for a LPC810 right now. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513340#M130</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513341#M131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Thu Nov 13 04:00:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: 1234567890&lt;/STRONG&gt;&lt;BR /&gt;Not with the Systick timer, because it wasn't neccessary for me yet. &lt;BR /&gt;I use StopWatch_DelayUS() from LPCOpen instead which uses the RIT timer.&lt;BR /&gt;Have a look at the documentation in the package for LPC15xx:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fsystem%2Ffiles%2Flpcopen_2_08c_docs_15xx.zip" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/system/files/lpcopen_2_08c_docs_15xx.zip&lt;/A&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I am using the RIT timer for one other task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: MarcVonWindscooting&lt;/STRONG&gt;&lt;BR /&gt;What's your aim?&lt;BR /&gt;1) Being able to measure us or sub-us delays? That enables you to create delays in that range easily, too. For this, I would use one SCT with 32bit counter, just free running. Reading out the timer value is simply looking at the clock (of PCLKs). Use 32bit math and you're fine.&lt;BR /&gt;.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I forgot about the SCT :D because i have only used the example for the PWM. I need only microseconds counting ( will not use it for delay)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share the code how you use the SCT as a normal 32bit timer with the LPCOPEN? ( I am not sure if all the functions for it are in the library).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bobi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513341#M131</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513342#M132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Thu Nov 13 08:56:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Bobi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here's my source code for the LPC810. I've never used LPCOPEN, but you'll easily figure out, how to use the SCT for this purpose. I haven't worked with LPC15 so far, so you'll have to make sure SCT is clocked (SYSAHBCLKCTRL on LPC800).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The rest&amp;nbsp; is quite simple, see usTimerInit().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gettting the time (us) is usTimerUs().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The (hopefully descriptive) constants used can be found in sct.h's enums.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing may differ from your environment: I write SCT.someField while you probably will have to write SCT-&amp;gt;someOtherField.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's because I define SCT as a variable (not a pointer) in crt0.s . That's not the typical way. It's because I HATE that pointer syntax (and #define,&amp;nbsp; too). You should be able to port it to your environment/uC easily.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this is helpful to you....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513342#M132</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513343#M133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Mon Nov 17 03:10:09 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this code, but unfortunetly it never gets to the interrupt handler. Am I missing something?&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;

void SCT0_IRQHandler(void)
{

Chip_GPIO_SetPinState(LPC_GPIO,0,BTN1_PIN,OFF);

/* Clear the Interrupt */
//Chip_SCT_ClearEventFlag(LPC_SCT0, SCT_EVT_0);
 LPC_SCT0-&amp;gt;EVFLAG = SCT_EVT_0;
}

#define TICKRATE_MHZ (1000)
Chip_SCT_Init(LPC_SCT0); /* The match/capture REGMODE defaults to match mode */
Chip_SCT_Config(LPC_SCT0, ( SCT_CONFIG_32BIT_COUNTER | SCT_CONFIG_CLKMODE_BUSCLK)); /* Configure the SCT as a 32bit counter using the bus clock */
Chip_SCT_SetMatchCount(LPC_SCT0, SCT_MATCH_0, SystemCoreClock / TICKRATE_MHZ); /* Set the match count for match register 0 */
Chip_SCT_SetMatchReload(LPC_SCT0, SCT_MATCH_0, SystemCoreClock / TICKRATE_MHZ); /* Set the match reload value */
Chip_SCT_EnableEventInt(LPC_SCT0, SCT_EVT_0); /* Enable an Interrupt on the Match Event */

&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable the IRQ for the SCT */
NVIC_EnableIRQ(SCT0_IRQn);

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513343#M133</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513344#M134</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 Mon Nov 17 08:36:31 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: bobi-one&lt;/STRONG&gt;&lt;BR /&gt;Am I missing something?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; :quest: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could be useful to define an event and start the counter&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;&lt;LI-EMOJI id="lia_face-with-open-mouth" title=":face_with_open_mouth:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &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;
volatile uint32_t counter;

#ifdef __cplusplus
extern "C" {
#endif
void SCT0_IRQHandler(void)
{
 if (LPC_SCT0-&amp;gt;EVFLAG &amp;amp; SCT_EVT_0)
 {
&amp;nbsp; LPC_SCT0-&amp;gt;EVFLAG = SCT_EVT_0;
&amp;nbsp; Board_LED_Toggle(0);
&amp;nbsp; counter++;
 }
}
#ifdef __cplusplus
}
#endif


//main------------------------------------------------------------------------
int main(void)
{
 SystemCoreClockUpdate();
 Board_Init();

#define TICKRATE_MHZ (1000)
 Chip_SCT_Init(LPC_SCT0); /* The match/capture REGMODE defaults to match mode */
 Chip_SCT_Config(LPC_SCT0, (SCT_CONFIG_32BIT_COUNTER | SCT_CONFIG_CLKMODE_BUSCLK)); /* Configure the SCT as a 32bit counter using the bus clock */
 Chip_SCT_SetMatchCount(LPC_SCT0, SCT_MATCH_0, (SystemCoreClock/TICKRATE_MHZ)-1); /* Set the match count for match register 0 */
 Chip_SCT_SetMatchReload(LPC_SCT0, SCT_MATCH_0,(SystemCoreClock/TICKRATE_MHZ)-1); /* Set the match reload value */

 [color=#f00]LPC_SCT0-&amp;gt;EVENT[0].STATE&amp;nbsp; = (SCT_EVT_0);// events
 LPC_SCT0-&amp;gt;EVENT[0].CTRL = (0 &amp;lt;&amp;lt; 0)&amp;nbsp; |&amp;nbsp; // use match register
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1 &amp;lt;&amp;lt; 12) |&amp;nbsp; // COMBMODE[13:12] = match condition
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1 &amp;lt;&amp;lt; 14) |&amp;nbsp; // STATELD[14]&amp;nbsp;&amp;nbsp; = STATEV is loaded
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (0 &amp;lt;&amp;lt; 15);&amp;nbsp;&amp;nbsp; // STATEV[19:15] = new state
 LPC_SCT0-&amp;gt;LIMIT = (1&amp;lt;&amp;lt;0);[/color]
 Chip_SCT_EnableEventInt(LPC_SCT0, SCT_EVT_0); /* Enable an Interrupt on the Match Event */
 NVIC_EnableIRQ(SCT0_IRQn);
 [color=#f00]Chip_SCT_ClearControl(LPC_SCT0, SCT_CTRL_HALT_L | SCT_CTRL_HALT_H);//and start[/color]

 while(1)
 {
&amp;nbsp; //do something useful here....
 }
}

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513344#M134</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: micros &amp; millis</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513345#M135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Mon Nov 17 09:16:00 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks R2 :D &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/micros-millis/m-p/513345#M135</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:06:46Z</dc:date>
    </item>
  </channel>
</rss>

