<?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: Exact time between loop in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573335#M21409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat May 21 15:49:58 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Why don't you use SysTick Timer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simplest method to check timing is port toggling &amp;amp; scope.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:51:42 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:51:42Z</dc:date>
    <item>
      <title>Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573334#M21408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Sat May 21 15:35:06 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having an problem, let me explain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to build an quad copter, i need to reed 2 sensors, an acc and gyro.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To control the quad copter i need to use an DCM IMU, this well calculate the sensor data to amount degrees my quad copter is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With that data i can make an pid to control it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is, the DCM IMU needs to run exact an amount of time, for example 50hz. So the time between every loop needs to be 20ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the example libary and used timer.c &amp;amp; timer.h.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To make the counter count every 10us i edited this:&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TIM0-&amp;gt;PR&amp;nbsp; = pclk/1000000; /* set prescaler to get 1 M counts/sec */

&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TIM0-&amp;gt;MR0 = 10; /* Set up 10 mS interval 1000 * 10 = 10ms */
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TIM0-&amp;gt;MR1 = 10; /* Set up 10 mS interval */
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The counter needs to be 2000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It could be that the loops runs at 23ms, to be sure my calculations are right i can use this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;G_Dt = timer/100000.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This should always be 0.02.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the loop is not precise 20ms, how can i measure this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem could be i2c, i need to read my data by i2c, this could have some delay in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can i see how long it takes to run an i2c reading loop?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there also another way to make an loop that runs precise on 20ms?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To be sure the counter is always 2000 i made an if statement, used the debug mode to see if the counter is always 2000 when it enters the loop. It's always 2000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using an lpc EM 1769 board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope i explained everything so you can understand what i mean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If not please ask.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573334#M21408</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573335#M21409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat May 21 15:49:58 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Why don't you use SysTick Timer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simplest method to check timing is port toggling &amp;amp; scope.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573335#M21409</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573336#M21410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Sat May 21 15:56:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I also use i timer for my RC input, thought i can use it also for my 50hz loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already have seen the sys tick but i can not understand how to use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do not know how to calculate the amount of ticks for example 1us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have now imported the systick example:&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;
#include "NXP/LPC17xx/LPC17xx.h"
#include "NXP/LPC17xx/type.h"
#include "NXP/LPC17xx/target.h"

#define NVIC_SYSTICK_CLK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000004
#define NVIC_SYSTICK_INT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000002
#define NVIC_SYSTICK_ENABLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000001

int gi_SystickCount;

// Enable interrupts
static inline void __enable_irq()&amp;nbsp;&amp;nbsp;&amp;nbsp; { asm volatile ("cpsie i"); }

// Initialize the CM3 System Tick timer, given desired rate and the current CPU rate
void vF_SysTickInit(int i_CPUClockHz, int i_SystickHz)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; gi_SystickCount = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Configure SysTick to interrupt at the requested rate. */
&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ST_RELOAD = ( i_CPUClockHz / i_SystickHz ) - 1UL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ST_CTRL = NVIC_SYSTICK_CLK | NVIC_SYSTICK_INT | NVIC_SYSTICK_ENABLE;
}

// Interrupt handler just increments a count forever.
// Note that CM3 interrupt handlers are regular C functions - no special attributes.
void vF_SysTickHander(void)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; gi_SystickCount++;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
}

int main(void) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; TargetResetInit();&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; vF_SysTickInit(96000000, 10);

&amp;nbsp;&amp;nbsp;&amp;nbsp; __enable_irq();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enter an infinite loop, just incrementing a counter
&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile static int i = 0 ;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++ ;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0 ;
}

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;I am trying to understand how to use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vF_SysTickInit(96000000, 10);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;96000000 is the frequency, that should be 12000000 for my board?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The function vF_SysTickInit uses the var name i_SystickHz, i think i need to give an number to count at x hz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can use 10 for 10 hz? Is that correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573336#M21410</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573337#M21411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat May 21 16:07:29 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a Keil example (96MHz).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please use LPCXpresso1768_systick example in LPCXpresso1768.zip (example folder).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573337#M21411</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573338#M21412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Sun May 22 09:31:31 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;yes i know,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted it with the question if i understand the code correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I measured the time between every loop with an logic analyser, 20ms loop in program is in real 23.9ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Think that could be the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573338#M21412</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573339#M21413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Wed May 25 05:02:01 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use the example you told me to use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting an error on SystemCoreClock. It can not find it. (Undeclared, first use in this function)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573339#M21413</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573340#M21414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Wed May 25 08:22:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Lithium&lt;/STRONG&gt;&lt;BR /&gt;I am trying to use the example you told me to use.&lt;BR /&gt;I am getting an error on SystemCoreClock. It can not find it. (Undeclared, first use in this function)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; SystemCoreClock is defined within CMSIS. Thus it sounds like you are not linking with the appropriate CMSIS library project (CMSISv1p30_LPC17xx). More information on CMSIS support in LPCXpresso IDE at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/Support4CMSIS&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573340#M21414</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573341#M21415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Wed May 25 08:24:40 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;HI,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your anwser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not using v1 but v2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Found SystemFrequency is that correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573341#M21415</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573342#M21416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by whitecoe on Wed May 25 08:31:59 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Lithium&lt;/STRONG&gt;&lt;BR /&gt;HI,&lt;BR /&gt;&lt;BR /&gt;Thanks for your anwser.&lt;BR /&gt;I am not using v1 but v2.&lt;BR /&gt;Found SystemFrequency is that correct?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemFrquency is basically the same as SystemCoreClock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it sounds like you are using the CMSIS library NXP provided in the port&amp;nbsp; of their MCB1700 bundle. I would suggest that you don't - there are&amp;nbsp; issues with this that are still to be resolved....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://knowledgebase.nxp.com/showthread.php?t=1600&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573342#M21416</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573343#M21417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Wed May 25 10:10:53 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically this post in that thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://knowledgebase.nxp.com/showpost.php?p=7076&amp;amp;postcount=14&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been in a dialog with CodeRedSupport about this issue and the last thing they reported is that NXP is currently working to resolve this discrepancy.&amp;nbsp; It might be a while.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As whitcoe has suggested, don't use the CMSISv2 provided in the&amp;nbsp; MCB1700 bundle.&amp;nbsp; It will only confuse and frustrate you as it did me.&amp;nbsp; Stick with CMSISv1p30_LPC17xx for now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport can probably update us later on this continuing saga.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573343#M21417</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573344#M21418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Thu May 26 01:59:29 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your answers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't know that, good to know!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I now made a while project with that lib, everything works fine and i did not had any problems like that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will be a work to bring it back to version 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded the example code and found the version 2, why do they publish a version that's not bug free?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That also explains why i can't use any other example code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573344#M21418</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573345#M21419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Thu May 26 02:50:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Lithium&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I downloaded the example code and found the version 2, why do they publish a version that's not bug free?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes NXP,&amp;nbsp; WHY?&amp;nbsp; Many of us, while trying to learn about your chips, found that the CMSIS labeled v2 in that code bundle is in fact v1.2.&amp;nbsp; This has wasted our time, and for many of us time is money.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, but there is really no excuse for sloppiness from a company as reputable as yours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please take the mcb1700.code.bundle.lpc1769.lpcxpresso.zip code bundle off your web site until CMSIS v2 is fixed so others don't get led astray.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Larry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573345#M21419</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573346#M21420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Thu May 26 02:53:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is to NXP or to me?:confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573346#M21420</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573347#M21421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Thu May 26 03:37:43 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;:o Oh, I'm sorry Lithium,&amp;nbsp; that was for NXP.&amp;nbsp; Definitely not for you.:):)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573347#M21421</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573348#M21422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Thu May 26 04:19:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;No problem ;)&amp;nbsp; Just to be sure.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573348#M21422</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573349#M21423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rob65 on Thu May 26 05:28:19 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: larryvc&lt;/STRONG&gt;&lt;BR /&gt;Yes NXP,&amp;nbsp; WHY? &lt;BR /&gt;...&lt;BR /&gt;Sorry, but there is really no excuse for sloppiness from a company as reputable as yours.&lt;BR /&gt; &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I feel like I've been banging my head against the wall with similar issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like they don't care about the quality of documentation and software.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The bad thing is that I am not confident that companies like ST, Atmel or TI will be different :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it is up to us, users of the LPCXpresso tools, to create a working set of initialization code and drivers for the different lpc1xxx variants. One complexity is that we may need different drivers for stand-alone use and use with an RTOS like FreeRTOS. I already made some changes to my I2C driver to make it thread safe with FreeRTOS so that I can address different peripherals on the same I2C bus from different tasks running in parallel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: FreeRTOS is a very nice way of getting the exact time between loops needed. Using the vTaskDelayUntil() you can let a task sleep until a certain point in time. If you need a 1 msec. interval (I use this for debouncing keys) you can use the tick hook function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573349#M21423</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exact time between loop</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573350#M21424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Lithium on Thu May 26 09:43:09 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If i knew i needed to use the V1 lib i am sure i did use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not a problem to make a little search to find the right variable to get my program working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Systick works great, i am having a loop delay time of 1ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The logic analyzer gives me an delay of 1ms so that's great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I now added some i2c readings and my time has rised to more then 4ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can not use fast i2c because one of my sensors does not support fast dmx.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now running the loop at 5ms (250hz) that will be high enough, the next time i will use analog sensors, reading analog sensors will be much faster.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:51:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Exact-time-between-loop/m-p/573350#M21424</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:51:51Z</dc:date>
    </item>
  </channel>
</rss>

