I had very similar problems (I think) on the 2294. You have to be very careful
how you set the PINSEL bits. I assume, when you say the processor doesn't
run, the debug function doesn't work?
I'm not sure of the exact differences between the 2294 and the 2214, but with
the 94 I had to initialise PINSEL2 as below for it to not disable the debug
interface.
// Now PINSEL2 which configures debug lines and address and data lines
temp = PINSEL2;
temp |= 0x0F814920;
temp &= ~0x08; // Take it out of trace mode...
PINSEL2 = temp;
Hope this is of some help.
Cheers,
Rob
--------------------------------------------------------------------------------------------------
I'm running an LPC2214.
I'm using P2.29 as an output to flash an LED, so I
know that the processor is exacuting my program.
If I include a line to set P1.16 as output, the
processor does not run.
If I change that line so that P1.16 remains an input,
or delete that line, the program runs fine.
On my board, P1.16 is not connected to anything.
I have a 10k pullup resistor on P1.20 so as I
understand it, the P1 pins should be GPIO, not Trace
port.
If I bring P0.14 low while the processor is frozen,
the bootloader immediately runs without my having to
reset the processor, and Philips' flash utility can
program the chip.
If I leave P0.14 high while the processor is frozen,
the bootloader doesn't run and Philips' flash utility
can't program the chip.
I'm using the Keil demo version compiler.
Can anyone see something I'm doing wrong?
#define IODIR1 (*((volatile unsigned long *)
0xE0028018))
#define IOSET2 (*((volatile unsigned long *)
0xE0028024))
#define IODIR2 (*((volatile unsigned long *)
0xE0028028))
#define IOCLR2 (*((volatile unsigned long *)
0xE002802C))
int main (void)
{
unsigned long i;
IODIR2 = 0x20000000; //P2.29=output
IODIR1 = 0x00010000; //P1.16=output. This line
causes the problem.
while (1)
{
IOSET2 = 0x20000000; //P2.29 on
i = 2000000; //delay
while (--i);
IOCLR2 = 0x20000000; //P2.29 off
i = 2000000; //delay
while (--i);
}
}
Yahoo! Groups LinksMessage
Re: [lpc2000] LPC2214 doesn't run if IODIR1 = 0x00010000
2005-01-27 by Robert Wood
Attachments
- No local attachments were found for this message.