Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable
I have used IO004 App to create INPUT pin (P2.11) and use IO004_ReadPin to read the signal of this pin in main() function.
(I already connected P2.11 to GND with hard wire)

Unfortunately, it's always get value '1' when reading. Anyone got this problem?
0 Likes
6 Replies
User6412
Level 4
Level 4
The input pin can be negated (e.g. inverted tristate), check the setting for this port.
0 Likes
Not applicable
I did setting this pin to "Tristate", "Pull-Up", "Pull-Down" but still no change.
What I have to do before use ReadPin function??
0 Likes
User6412
Level 4
Level 4
Actually nothing more. Look in to errata, may be this pin is permanently pull-up (this case has the XMC4500 for example).
0 Likes
Not applicable
Hi iamten,

Port2 is actually the analog port and in order to use this pin as digital input, you have to choose IO001 instead of IO004.


rgds,
Rou
0 Likes
User6412
Level 4
Level 4
Dave dosen't allowed manual pin assignment of IO004 App to analog pins. At least for XMC4500.
0 Likes
Not applicable
Hi Rou,

I changed to IO001 instead of IO004. It's work!!

Thank you.
iamten
0 Likes