XMC4500 Relax Kit, ADC internal pull up active??

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

cross mob
Not applicable
Hi,

I'm trying to control a 4 wire touch-screen with the XMC4500 Relax Kit.

I've used ADC001 to get continious samples from Ports P14.0 and P14.1, one port for each touch-screen pane. I've also conntected two digital I/O pins to every pane (for activating the measurement voltage).

When measuring the x-pane, the I/O pins on this pane are set to tristate, and the y-pane is connected to the measurement voltage. Measurements for the y-pane are taken vice versa.


I'm now experiencing the issue, that if I'm not pressing on the touch-screen and therefore no connection to the measurement pane is made, the ADC pin is pulled high (~ 300uA input current), even though the other pins connected to the same pane are set to tristate. The only reasonable explaination is, that the ADC input is pulled high by a weak internal pull-up. I've tried to disable it, but i can't find any info regarding this behaviour. Is there any way to set the ADC input to tristate instead of weak pull up? I've already tried setting the I/O configuration registers manually according to the datasheet but nohting worked.

best regards,
Michael
0 Likes
6 Replies
Not applicable
Hi Michael,

In ADC001 App, the Digital Pad input is enabled by default in IO001 App (controlled by Pn_PDISC) and the internal pull-up is disabled (controlled by Pn_IOCR0). You can try to disable the Digital Pad input in IO001 App to verify.

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

Yes i already disabled the digital input functionality via dave and manually by setting the registers. I also tried to set the pins to analog input via registers. Nothing changes, the Pins are still pulled high when not connected to anything. Can it be that this is an unfixable hardware bug?

Best regards,
Michael
0 Likes
Not applicable
Hi Michael,

I've confirmed the P14.0 has the correct behaviour by:
1) Uncheck the "Enable Digital Input" in IO001 Configuration tab;
2) Adding "PORT14 ->IOCR0 |= 0x10" in main.c after DAVE_Init().

Pls check your hardware as well...

Best regards,
Sophia
0 Likes
Not applicable
Even after your setting, the ADC channel on P14.0 still reads 4095 when nothing(!) is connected to the input. The setup for measuring without pressing the touchscreen is as follows:

P14.0 & P1.2 (tristate) <-- Touchscreen pane impedance (~500 ohms) --> P1.4 (tristate)

since the other pane is not pressed, P14.0 just reads the tristate setup of the (inactive) voltage pins, which should read anything around 0x0000.

The measurment is correct (with a little offset, because of the pull high) when the touchscreen is pressed, and therefore a voltage is applied to the other layer.

Best regards,
Michael
0 Likes
Not applicable
Hi,

You need to disconnect the touch screen in order to observe the correct behaviour of the port itself. Connecting the touch screen is equivalent to connecting a capacitor on that pin.

BR,
Zain
0 Likes
Not applicable
Hi,

That's why i did a few measurements with and without the touchscreen to verify the behaviour. The pin is pulled high no matter what.
Best regards,
Michael

Edit:

I have found the issue why it is pulled high, the other I/O pins connected to the ADC inputs are pulling it high! The pins are P1.2 and P1.3, even after setting the command IO004_DisableOutputDriver(XXX,IO004_TRISTATE); the pins are still pulled high? P1.4 and P1.5 are set up exactly the same and they successfully enter the tristate state.

Re-Edit:

The miracle is solved, on the XMC4500 Relax Kit, P1.2 und P1.3 are connected to the SPI Flash memory. Of course, exactly these two pins are connected to pull high resistors on the board itself. Shame on me, thread \closed
0 Likes