LPC2138 GPIO issues : P0.4 / P.6

Hello,

I’ve a problem with GPIO pins P0.4 and P0.6 on LPC2138… There is no hardware connected to these pin, they are free.

Here is the code (under WinARM)

void GPIO_Init(void)
{
		// Setup clocks
		lowInit();
						
		// set the interrupt controller defaults
		MEMMAP = MEMMAP_FLASH; 

		// Set PISELx : GPIO
		PINSEL0 = 0x00000000;
		PINSEL1 = 0x00000000;
		PINSEL2 = 0x00000000;
		
		// IO Ports : P0.4 and P0.6 set high
		IO0DIR = 0x00000050;
		IO0SET = 0x00000050;
			
		while(1);
}

I get about 0.4V instead of 3.3V for a high level and 0V for low state… These pins don’t need to be pulled up (like I2C on P0.2/0.3), I don’t know why… the others pins work well.

Do you have any idea ??

Thanks in advance !

Best regards,

David

I can read the correct state when set as inputs, so this means these two PINS are set correctly as GPIO I/O (and not share a periph). I can drive all others pins, except them… I finally change my design to place input signals at these pins since I didn’t manage to set output…

Strange issue, I don’t see what’s wrong… :roll: anyway, I can finish the project right now :wink: