Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

LPC2138 MIPS

2005-10-25 by rggmns

Hello,

I use a LPC2138 microcontroller with a 25MHz xtal.
I set the pll multiplier at 2 and de devider =2 (in the startup code
of KEIL). This gives 50MHZ CPU clock. This works out fine, in
determining the speed for the UART (baud rate is ok).
But when I run a very small program, toggeling the LED's, I only get
16 MIPS out of the controller.
The MAM unit is fully enabled and the MAM timing is set to 3.

What do I do wrong (how stupid can I get?)?

And no, it is not due to the pipe line, because I toggle the LED's in
staright line code.


#include	<lpc213x.h>

void	main()
{
	unsigned long j=0x00ff0000;
	IODIR0=0x00ff0000;
	while	(1)
        {
		IOPIN0=j;
		j=~j;
		IOPIN0=j;
		j=~j;
		IOPIN0=j;
		j=~j;
		IOPIN0=j;
		j=~j;
	}
}

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.