I trying to read inputs on pins 1, 3, & 5 (PTB8, PTB9 & PTB10 respectively). I want to ground pins PTB9 and PTB10 for an input and connect PTB8 to P3V3 for an input. If I understand things correctly, this would mean that I set PTB8 for pull down and PTB9 & 10 for pull up.
Although I have been able to read PTB9 & 10 as expected, PTB8 always reads high. However, it reads a low when shorted to ground.
After looking at the control register for the pin (PORTB_PCR8) in the register view, it appears as though both the slew rate and pull up resistor are hard set to on.
I was not able to clear them with:
PORTB_PCR8 = (PORTB_PCR8 & 0xFFFFFFF8);
(FWIW, it appears the same is true for PORTB_PCR9 as well. And PORTB_PCR10 has the slew rate set off, but the pull up resistor seems to be hard coded on.)
Is this a bug or a "feature" or am I not using these pins correctly?
And where do I find a definition of "slew rate", please?