LPC11C24FBD48 PIO1_4 issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC11C24FBD48 PIO1_4 issue

1,213件の閲覧回数
Richard1964
Contributor I

HI,

I have a design with a LPC11C24FBD48/301 and I'm using pin40 PIO1_4 as an input I have configured the pin with the following code:-

/* ID1 PI01 pin 4*/
Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO1_4, (IOCON_FUNC0 | IOCON_MODE_INACT));
Chip_GPIO_SetPinDIRInput(LPC_GPIO, 1, 4);

However when the pin is read it always returns 0 even though the external pin has 3.3V applied. I have tried two boards with the same result. I Know this pin is used for waking the device is there some other configuration I need to do?

Thanks,

Richard. 

0 件の賞賛
返信
2 返答(返信)

1,201件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Yes, you have to enable the gated clock of the peripheral by setting the corresponding bit in SYSAHBCLKCTRL before you write any register of the peripheral. pls refer to UM10398.pdf.

This is the code in SDK to enable gated clock of IOCON.

CLOCK_EnableClock(kCLOCK_Iocon);

Hope it can help you

BR

XiangJun Rong

 

xiangjun_rong_0-1632618577088.png

 

0 件の賞賛
返信

1,209件の閲覧回数
Richard1964
Contributor I

Hi,

Found the problem, the pin was not set in IOCON to be digital.

Thanks,

Richard.

0 件の賞賛
返信