LPC812 Pull-up

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

LPC812 Pull-up

1,152 Views
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

Labels (1)
0 Kudos
Reply
2 Replies

852 Views
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 Kudos
Reply

852 Views
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 Kudos
Reply