LPC1111/201 PIO 3.4 3.5 output issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1111/201 PIO 3.4 3.5 output issue

252 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iancaddy on Tue Jul 26 23:57:42 MST 2011
I am using a LPC1111F/201 processor in a design, and I am trying to setup PIO3_5 as outputs and drive it low.

(Edited as was 3.4 and 3.5, but turns out 3.4 was user error, only still having problems with 3.5)

AHBCLKCTRL (0x40048080) = 0x00011a5f

IOCON_PIO3_5 (0x40044048) = 0x00D0 (default, but have also tried 0x00C8 and 0xC0)
GPIO3DIR (0x50038000) = 0x0034 (outputs, 3_2, 3_4, 3_5)
GPIO3DATA (0x50030000) = 0x0000 (all outputs OFF/0)

The problem is the output 3_5 is sitting at about 3.2V respectively with nothing connected to it.

Has anyone a solution or a similar issue?
0 Kudos
3 Replies

243 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jul 27 01:45:59 MST 2011
LPC_GPIO_TypeDef in your LPC11xx.h shows that  0x50030000 is [COLOR=Red]NOT[/COLOR] DATA register :eek:

I would strongly suggest to use this structures to avoid addressing problems :)
0 Kudos

243 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iancaddy on Wed Jul 27 01:18:44 MST 2011
I am still chasing it down, but I think you are right, I think it is a code bug as I seem to be able to turn on each PIO 3_2, 3_4 and 3_5 using the debugger commands:

set *0x50030FF0 = 0x04               turns on 3_2, off 3_4, 3_5

set *0x50030FF0 = 0x10               turns on 3_4, off 3_2, 3_5

set *0x50030FF0 = 0x20               turns on 3_5, off 3_2, 3_4

set *0x50030FF0 = 0x00               turns off 3_2, 3_4, 3_5

Interestingly, reading 0x50030000 at any time returns 0 even if one or more of these lines are on.
0 Kudos

243 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jul 27 00:27:44 MST 2011
Did you use your debugger to set / reset Data bits of PIO3_2 / PIO3_4 / PIO3_5 ?

Did you check your hardware (connection to VCC or adjacent pins) ?
0 Kudos