<?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: Why is this code so slow? in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558548#M15073</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 Wed Aug 03 01:05:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Could we get back to the lpc1xxx again?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This forum still is about LPCXpresso and not about STM or other Cortex chips ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need 6 PWM channels with a frequency (up to) 350 kHz if I remember correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is if you really need diffent PWM frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The lpc17xx (I use the lpc1754) has one general PWM unit with 6 outputs that all share the same frequency (one timer with 6 match outputs) and a motor control PWM that contains 3 completely seperate PWM channels all with their own timer and match register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can get up to 4 different frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And the general PWM unit can also be set such that 2 match registers are used to get 3 "double edge controller" PWM outputs. They still all share the same frequency but you are free to choose at which time each signal becomes high or low again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&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 22:17:33 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:17:33Z</dc:date>
    <item>
      <title>Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558531#M15056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Sun Jul 31 21:21:01 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been trying different ideas to get 3 (6 in the future) variable frequency's generated with the 1343. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My best case is with match registers and interrupts. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But with just 3 (all on timer32 0) I can't get anything better then 125khz max.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking to get around 350khz on 6 pins max, but nothing seems to get me close. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Each one has to be able to have a variable frequency/period and an adjustable on time. And right now I am testing worst case will all on at a high frequency.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea's on the right way to do this or am I asking to much of this chip?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the highest optimization level as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558531#M15056</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558532#M15057</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 Aug 01 00:18:33 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try to reduce your Prescale Register ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558532#M15057</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558533#M15058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by acno on Mon Aug 01 06:01:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;I have been trying different ideas to get 3 (6 in the future) variable frequency's generated with the 1343. &lt;BR /&gt; &lt;BR /&gt;My best case is with match registers and interrupts. &lt;BR /&gt;But with just 3 (all on timer32 0) I can't get anything better then 125khz max.&lt;BR /&gt;I am looking to get around 350khz on 6 pins max, but nothing seems to get me close. &lt;BR /&gt; &lt;BR /&gt;Each one has to be able to have a variable frequency/period and an adjustable on time. And right now I am testing worst case will all on at a high frequency.&lt;BR /&gt;Any idea's on the right way to do this or am I asking to much of this chip?&lt;BR /&gt; &lt;BR /&gt;I have tried the highest optimization level as well.&lt;BR /&gt; &lt;BR /&gt;Thanks&lt;BR /&gt;Dave&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, with that code You have 2 IRQ per cycle, so at 125kHz the cpu has only 4us (8/2) for executing the ISR. At 50MHz of bus this means only 200 cycles. What is the CPU clock ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also check how much time the cpu spend in the ISR, trace it with a GPIO port for example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I will try to use directly the timer match outputs, with them the ISR routine should need much less code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558533#M15058</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558534#M15059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 08:28:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Did you try to reduce your Prescale Register ? &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have reduced the match register, but anything lower and it misses interrupts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt; At 50MHz of bus this means only 200 cycles. What is the CPU clock ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running at 72mhz. I am using the Embedded Artists LPC1343.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558534#M15059</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558535#M15060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 08:45:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to use toggle mode with the match registers, but I could not think of a good compact code way to keep track of if the toggle is high or low.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And I need to be able to set the pulse to active high or active low depending on the application.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558535#M15060</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558536#M15061</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 Aug 01 09:02:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;...I am looking to get around 350khz on 6 pins max, but nothing seems to get me close...&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Just measured your Interrupt: 2.3 µs for 3 pins, and that's your problem :mad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With 6 pins you're ending below 100kHz :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think your only chance is to use PWM. Unfortunately you need one timer per PWM, so 4 independent timer should be no problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your basic idea to calculate new MR values costs a lot of time (and then you don't use Match outputs :eek:).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Overall I would say it's hopeless to expand your code even to 4 fast pins :mad:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558536#M15061</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558537#M15062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 09:44:13 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;So even with PWM the 1343 and 1769 only have 4 timers... so I am not going to get 6 indipendent output then ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Back to the drawing board. Mabey a CPLD generator attached to the 1343.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558537#M15062</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558538#M15063</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 Aug 01 09:58:45 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;So even with PWM the 1343 and 1769 only have 4 timers... &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1769 has an additional PWM and RIT and therefore the possibility to add a calculated&amp;nbsp; output :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it's a fundamental question if you need (or want to use) a 1769 :confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558538#M15063</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558539#M15064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 10:12:55 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I will need the 6 outputs, and it looks like PWM is the only fast way to go. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I might order a STM32 discovery... it has 12 timers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help Zero, they should be paying you for all the questions you answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558539#M15064</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558540#M15065</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 Aug 01 11:21:09 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;I might order a STM32 discovery... it has 12 timers.Dave&lt;/SPAN&gt;&lt;HR /&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;&lt;BR /&gt;Up to 12 timers&lt;BR /&gt;[LIST]&lt;BR /&gt;[*]Up to three 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]16-bit, 6-channel advanced-control timer: up to 6 channels for PWM output, dead time generation and emergency stop&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]One 16-bit timer, with 2 IC/OC, 1 OCN/PWM, dead-time generation and emergency stop&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]Two 16-bit timers, each with IC/OC/OCN/PWM, dead-time generation and emergency stop&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]2 watchdog timers (Independent and Window)&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]SysTick timer: 24-bit downcounter&lt;BR /&gt;[/LIST]&lt;BR /&gt;&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; &lt;BR /&gt;[LIST]&lt;BR /&gt;[*]Two 16-bit basic timers to drive the DAC&lt;BR /&gt;[/LIST]&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Sorry, I'm not (yet) familiar with ST so I don't know if&amp;nbsp; it's possible to generate 6 independent timer :mad: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it's worth a trial :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558540#M15065</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558541#M15066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 11:46:40 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I ordered 2 of them with shipping for $27.70 so they are a good deal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking in the reference manual it does look like I can use the general purpose timers to generate 6 individual PWM channels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will find out in a few days when I get the boards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558541#M15066</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558542#M15067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Mon Aug 01 14:51:59 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;Thanks for the help Zero, they should be paying you for all the questions you answer.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't worry ... I've heard he just gets his trainee to answer most of the questions now :D&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558542#M15067</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558543#M15068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Aug 01 17:02:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: KTownsend&lt;/STRONG&gt;&lt;BR /&gt;Don't worry ... I've heard he just gets his trainee to answer most of the questions now :D&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What does he do that he gets a trainee? Is he a embedded programmer for a profession?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558543#M15068</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558544#M15069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by acno on Tue Aug 02 01:50:43 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;I wanted to use toggle mode with the match registers, but I could not think of a good compact code way to keep track of if the toggle is high or low.&lt;BR /&gt;And I need to be able to set the pulse to active high or active low depending on the application.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The constraint is if you want indipendent control of active high or low on each channel. If all the channels are of the same polarities, I think that with a 'set on match' or 'clear on match' you should be able to do what you want and with a LPC17xx where you have a PWM timer with 6 channel and motor control PWM timer it should be finally possible. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still not used the motor control PWM timer, but it is quite sophisticated and specifically designed to generate up to 6 complex PWM signals, that is basically your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558544#M15069</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558545#M15070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by qili on Tue Aug 02 04:46:13 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Dave3891&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I might order a STM32 discovery... it has 12 timers.&lt;BR /&gt; &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how many of those timers can be configured to have their own output pins?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558545#M15070</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558546#M15071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Tue Aug 02 15:47:18 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: qili&lt;/STRONG&gt;&lt;BR /&gt;how many of those timers can be configured to have their own output pins?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Looking at the 32 discovery board it looks like most of the timers have a pin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are about 18 pins with a timer association, but this was just a quick look.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558546#M15071</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558547#M15072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Wed Aug 03 00:32:39 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Nuvoton M0 chips have up to 8 PWM channels wih independent cycle settings plus 4 toggle-capable timers. All of this at less than $1.5.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558547#M15072</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558548#M15073</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 Wed Aug 03 01:05:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Could we get back to the lpc1xxx again?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This forum still is about LPCXpresso and not about STM or other Cortex chips ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need 6 PWM channels with a frequency (up to) 350 kHz if I remember correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is if you really need diffent PWM frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The lpc17xx (I use the lpc1754) has one general PWM unit with 6 outputs that all share the same frequency (one timer with 6 match outputs) and a motor control PWM that contains 3 completely seperate PWM channels all with their own timer and match register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can get up to 4 different frequencies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And the general PWM unit can also be set such that 2 match registers are used to get 3 "double edge controller" PWM outputs. They still all share the same frequency but you are free to choose at which time each signal becomes high or low again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&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 22:17:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558548#M15073</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this code so slow?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558549#M15074</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 Wed Aug 03 02:32:25 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;...I will find out in a few days when I get the boards...&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please keep me informed. Can't be wrong to think out of the box :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Why-is-this-code-so-slow/m-p/558549#M15074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:17:34Z</dc:date>
    </item>
  </channel>
</rss>

