<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LPC2148 is slow in  Realview</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37415/lpc2148-is-slow-in-realview</link><description> 
Dear all, 
I am using Realview (evaluation) and have the following program for
LPC2148: 

 
#include &amp;lt;LPC214x.h&amp;gt;
#define LED 0x01000000
main() {
 IO1DIR |= LED; //use P1.24
 for(;;){
 IO1CLR |= LED ;
 IO1SET |= LED;
 }
}
 

 
 
the crystal is 12M and</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LPC2148 is slow in  Realview</title><link>https://community.arm.com/thread/113152?ContentTypeID=1</link><pubDate>Sat, 25 Aug 2007 21:44:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:57f4b905-6b49-49a4-89bd-a674a8cad004</guid><dc:creator>Dung Han</dc:creator><description>&lt;p&gt;&lt;p&gt;
I had NOT enabled MAM before.&lt;br /&gt;
I enabled it and the system works correctly now.&lt;br /&gt;
Thank you for your useful advices.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2148 is slow in  Realview</title><link>https://community.arm.com/thread/99562?ContentTypeID=1</link><pubDate>Sat, 25 Aug 2007 13:06:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5ae16a22-3e1e-4814-8b2a-1010eca89a5f</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You haven&amp;#39;t mentioned if you have enabled the MAM.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2148 is slow in  Realview</title><link>https://community.arm.com/thread/75421?ContentTypeID=1</link><pubDate>Sat, 25 Aug 2007 08:27:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f8702e1f-7bf2-4db8-9223-9e3cf7bcf12d</guid><dc:creator>Dung Han</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you. But I think the pin and peripheral are not the problem.
The LED is just one example. Actually I tried to put more code such
as:&lt;/p&gt;

&lt;pre&gt;
while(1)
{
    IO1CLR=LED;
    CodeTakes5msWith60MHZClock():
    IO1SET=LED;
    CodeTakes5msWith60MHZClock():
}
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
I expect to have LED blink with the cycle of 10ms but in fact it
blinks with much slower cycle, around 200ms-300ms (20 times slower).
I also use UART0 and timer 0 and they work with correct timing. I
dont use IAP for Flash.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2148 is slow in  Realview</title><link>https://community.arm.com/thread/51069?ContentTypeID=1</link><pubDate>Sat, 25 Aug 2007 07:53:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f048e304-cc5e-4430-9e00-357baf85c71d</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;m too tired right now to start thinking about if your clock/pll
initialization is correct, and if you have activated caching of the
flash etc, but one thing my tired brain notices is that you seem to
have forgotten the runtime requirements of the for loop.&lt;/p&gt;

&lt;p&gt;
Even if you think that the two set/clear operations should be a
single clock cycle each, that is not the only thing your processor
has to do. Unroll the loop a bit by using multiple sets of (IO1CLR |=
LED; IO1SET |= LED;) inside the loop and check how much time the loop
takes.&lt;/p&gt;

&lt;p&gt;
Besides, are the physical port direct-mapped into the ARM core, so
the pins may be toggled without access delay?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>