LPC812 Pull-up

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

LPC812 Pull-up

1,151件の閲覧回数
jan92
Contributor II

Hello, Iam using the LPC812 and I need to turn off the pull up resistor on the input pin 0_5. Still with no success. Can anyone help me what Iam doing wrong?

Here is the code I am using:

Chip_SWM_Init();

Chip_SWM_DisableFixedPin(SWM_FIXED_RST);

Chip_SWM_Deinit();
Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 5);

Chip_IOCON_PinSetMode(LPC_IOCON, IOCON_PIO5, PIN_MODE_INACTIVE);

Thanks

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

851件の閲覧回数
ianbenton
Senior Contributor I

Looks like C is really making a meal out of it! In assembler it's simple - just write 0x80 to the PIO0_5 register in IOCON which is located at 0x4004 400C (see table 65 of the LPC800 user manual).

(Make sure IOCON has its clock enabled in SYSAHBCLKCTRL as it is disabled at reset.)

0 件の賞賛
返信

851件の閲覧回数
wernerf
Contributor II

What does Chip_SWM_Deinit() do? Possibly switches off the clock of the IOCON block again? If so, you can't access IOCON anymore and switching off the pullup resistor does not work.

0 件の賞賛
返信