<?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: How to add a delay function in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549416#M10962</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 Mon Dec 19 07:24:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The compiler complains - and if it does this usually means you made a mistake somewhere. let's analyze the error messages you get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;undefined reference to 'delay32Ms'&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; means that the linker cannot find that function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now look a bit further and you will also see a warning with the same function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;implicit declaration of function 'delay32Ms'&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Oops ... it looks like the compiler had a problem here discovering the declaration in timer32.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open the timer32.h file and look at the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You will notice that all the declarations are shown with a gray background. This means that a compiler directive is preventing that code being included.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guess what "[B][COLOR=Red]#if CONFIG_ENABLE_DRIVER_TIMER32==1[/COLOR][/B]" does :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have everything you need to fix the problem yourself :D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:36:09 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:36:09Z</dc:date>
    <item>
      <title>How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549412#M10958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel on Mon Dec 19 06:29:30 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to send messages with a fixed delay by CAN-Bus.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is my project:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;www.appelbanaan.nl/Share/can.zip&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I included the timer32.c and timer32.h from build in the project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I included the timer32.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and I put &lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; enable_timer32(1);&lt;BR /&gt;&amp;nbsp; delay32Ms(1,1500);&lt;BR /&gt;&amp;nbsp; disable_timer32(1);&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the TX_Only_test( void ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it still doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried it also in the blinky example and it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have no idea whats going wrong.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549412#M10958</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549413#M10959</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 Mon Dec 19 07:09:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: daniel&lt;/STRONG&gt;&lt;BR /&gt;So I have no idea whats going wrong.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And your compiler is compiling and linking this project without nagging :confused::confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549413#M10959</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549414#M10960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel on Mon Dec 19 07:14:15 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry, I forget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;error is undefined reference to...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;D:\Documents\LPCXpresso_4.1.0_190\workspace2\can\Debug/../src/cantest.c:51: undefined reference to `enable_timer32'&lt;BR /&gt;D:\Documents\LPCXpresso_4.1.0_190\workspace2\can\Debug/../src/cantest.c:52: undefined reference to `delay32Ms'&lt;BR /&gt;D:\Documents\LPCXpresso_4.1.0_190\workspace2\can\Debug/../src/cantest.c:53: undefined reference to `disable_timer32'&lt;BR /&gt;./src/cantest.o: In function `main':&lt;BR /&gt;D:\Documents\LPCXpresso_4.1.0_190\workspace2\can\Debug/../src/cantest.c:137: undefined reference to `init_timer32'&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;make: *** [can.axf] Error 1&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But my timer32.h files are active and in the driver map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and timer32.h is included in cantest.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so I think it's a wrong project setting or something else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'm not really familiar with the LPCXpresso development tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549414#M10960</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549415#M10961</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 Mon Dec 19 07:22:41 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: daniel&lt;/STRONG&gt;&lt;BR /&gt;But I'm not really familiar with the LPCXpresso development tool.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; :confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're not familiar with C :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look in you timer.h and timer.c files, there are a lot #ifs like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#if CONFIG_ENABLE_DRIVER_TIMER32==1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this blocks are grayed out, they are not used because this define isn't 1 :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So just add:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#define CONFIG_ENABLE_DRIVER_TIMER32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to your driver_config.h :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549415#M10961</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549416#M10962</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 Mon Dec 19 07:24:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The compiler complains - and if it does this usually means you made a mistake somewhere. let's analyze the error messages you get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;undefined reference to 'delay32Ms'&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; means that the linker cannot find that function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now look a bit further and you will also see a warning with the same function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;implicit declaration of function 'delay32Ms'&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Oops ... it looks like the compiler had a problem here discovering the declaration in timer32.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open the timer32.h file and look at the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You will notice that all the declarations are shown with a gray background. This means that a compiler directive is preventing that code being included.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guess what "[B][COLOR=Red]#if CONFIG_ENABLE_DRIVER_TIMER32==1[/COLOR][/B]" does :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you have everything you need to fix the problem yourself :D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549416#M10962</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549417#M10963</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 Mon Dec 19 07:39:12 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;to your driver_config.h &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Darn ... The Big Z beat me again ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;They call it drivers but let's be frank; there are just too many loose ends and bugs to call these things drivers :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was stupid and grabbed the small_printf library, put it in my project and used it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I should have known better ... nsprintf is not thread safe (but who cares) and when trying to fill a string of 9 characters it would only allow me to fill 8 (yes - that is including the Zero byte).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The guys at NXP just do not have the resources to create and test full flash drivers and libraries. They do give people without experience on the LPC1xxx controllers a way to quickly start using the controllers but that's all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.s: who cares? I do; I am using nsprintf() to format strings to multiple uarts and the LCD from multiple FreeRTOS tasks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549417#M10963</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a delay function</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549418#M10964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel on Mon Dec 19 15:25:22 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added some rules to config/driver_config.h file and the errors are passed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have some experience with C but the last time I used it was a few years ago. So the questions should be basic but sometimes you can search a few hours for a simple thing like this :(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:36:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-add-a-delay-function/m-p/549418#M10964</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:36:10Z</dc:date>
    </item>
  </channel>
</rss>

