PDA

View Full Version : LPC2129 I/O Pin Initialization


raska
05-31-07, 01:02 PM
Hi,

I've had some findings/problems recently that I'm still searching for an answer to. I've read this thread (www.newmicros.com/discussion/showthread.php?t=1211) that had some relevant info, but didn't find any others in a search. I have a LP2129 mounted to a PCB of which I've isolated the P0.21 I/O pin (or so I think) which floats at 1V when the board is powered up. The pin will not ever go lower when the memory is blank (as bought or erased using Flash Magic) , and will take 250ms to go low each time the power is on if the I immediately initialize it as a low output. I have been trying to fix this by adding the following code right at the beginning of the main, but it still operates as described above. I also tried a weak 100K pull down on the pin, and am just about to experiment with stronger ones, but the 100K made no difference. I've worked with some similar circuits before, and not seen this pin floating at that level (for any significant amount of time anyways) before.

PINSEL0 = 0x00000000;
PINSEL1 = 0x00000000;
PINSEL2 = 0x00000000;

IODIR0 = 0xFFFFFFFF;
IODIR1 = 0xFFFFFFFF;

IOSET0 = 0x00000000;
IOSET1 = 0x00000000;

Is this normal? Am I missing something in initializing? Do I have other problems?

Thanks.

nmitech
05-31-07, 02:03 PM
I have a LP2129 mounted to a PCB of which I've isolated the P0.21 I/O pin (or so I think) which floats at 1V when the board is powered up. The pin will not ever go lower when the memory is blank (as bought or erased using Flash Magic) ,

This is normal. All IO pin are in high impedance state during reset.


and will take 250ms to go low each time the power is on if the I immediately initialize it as a low output.

Yeah, it will take some time and also your reset circuitry will affect this delay period as well.


I have been trying to fix this by adding the following code right at the beginning of the main, but it still operates as described above. I also tried a weak 100K pull down on the pin, and am just about to experiment with stronger ones, but the 100K made no difference.

I would go with the stronger pull down resistor, 10K, or 4.7K if the reset circuitry won't help.

raska
05-31-07, 03:13 PM
Thanks for your reply. On most circuits of the same configuration the floating pin usually isn't able to turn on the BJT connected to it, but sometimes it is. A 4.7K pull-down works flawlessly. I'm going to take a look into the reset circuitry as well.

raska
06-01-07, 11:29 AM
Any speculation on why some are able to change a BJT's state, while others do not? I don't know if it is just coincidence, but on 100 circuits with a Phillips labeled LPC2129, the BJT stays in cutoff, but only about 50% of the NXP labeled boards does it. The "Value after reset" state of 1 for this pin would suggest they all would, would it not? Maybe something else to do with the initialization speed? Although made at different times and possibly with substituted components that I'll have to look into more, the design of these circuits is the same for the most part.

RMDumse
06-01-07, 12:45 PM
Any chance the BJT is a darlington? because if it is, it takes a higher base-to-emitter voltage to turn on. Usually about 1.8V or more.