Content originally posted in LPCWare by joepbrown on Mon Apr 27 11:11:39 MST 2015 I'm trying to use PIO0_4 as a GPIO to detect if the pin is high or low. I have an external 1M pulldown resistor and want to use the pin as a floating input. I've tried many things but can't seem to disable the internal pullup on PIO0_4 so the pin is stuck high. Furthermore PIO0_4 looks like, by default, it is configured as the WAKEUP pin but the documentation seems inconsistent.
Here's a few things I've tried to make the pin a floating input:
[list] [*]Setting the pin as an input (which I thought was the default IO state for most pins) with
None of this allows the pin to float and it is still pulled high.
When I read Table 63 (DPDCTRL register description) in the manual it says:
Quote: WAKEUP pin disable. Setting this bit disables the wake-up pin, so it can be used for other purposes.
Remark: Never set this bit if you intend to use a pin to wake up the part from Deep power-down mode. You can only disable the wake-up pin if the self-wake-up timer is enabled and configured.
Remark: Setting this bit is not necessary if Deep power-down mode is not used.
0 Enabled. The wake-up function is enabled on pin PIO0_4. 1 Disabled. Setting this bit disables the wake-up function on pin PIO0_4.
Reset value: 0
But when I'm connected to the device the reset value is 1(disabled) not 0. So I'm not really sure if the WAKEUP is enabled or disabled by default, or what I need to do to disable it, or if I even need to disable it.
Does anyone know how to make PIO0_4 a floating input?
Content originally posted in LPCWare by joepbrown on Mon Apr 27 13:23:47 MST 2015 After a couple hours of debugging I've finally realized the IOCON clock needs to be enabled to change pin modes. I got the pin to float with the following: