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
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.)
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.