GPIO pin P15 in Hi-Z Analog mode still outputting square wave | Cypress Semiconductor
GPIO pin P15 in Hi-Z Analog mode still outputting square wave
I'm using a CY8C5568LTI. I have pin 61 P15 connected to a 1K resistor, which in turn connects to the center point of a stack of 100K resistors from a regulated 2V down to ground.
I use instructions
PIN_SetDriveMode(PIN_DM_ALG_HIZ); // Set as Hi-Z input,
PIN_Write(0); // Really no impact since we're in Hi-Z input mode
To put this pin into high impedance mode. Neverthelss, I'm seeing a square wave at the center point of the resistor stack, varying from 0.9V to 1.1V. The resistor stack is seeking 1.0V, and the pin is injecting current to cause this +/- 0.1V change. The square wave period is about 120ms (8.3Hz). Whether I do DC analysis (101K to ground) or AC analysis (resistor network 51K), I come up with 1 to 2 uA of current coming out or going into this pin that's supposed to be high impedance.
So I check the CY8C55 Family Datasheet. Table 11-6 for GPIO DC Specifications says input leaking max 2nA. That's a far cry from 1 to 2uA. I do find more leaking on SIO pins, but this is definitely a GPIO pin.
So why do I seem to have 500 to 1000 times more current coming from/to the pin that the datasheet says?
Note also that I found a knowledgebase article at http://www.cypress.com/?id=4&rID=33792 about a similar subject. It says a resistor of "few tens of K" will fix the problem noted. But that also implies a leakage current much larger than the datasheet says.
So what's up and how can I fix this offensive pin?