LPC812 Pull-up

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC812 Pull-up

1,150 次查看
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 回复数

850 次查看
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 项奖励
回复

850 次查看
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 项奖励
回复