This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSC2007 I2C hangup

Other Parts Discussed in Thread: TSC2007

Hi!

I'm using TSC2007 touch controller with STM32f103 via I2C. The interface is working, i'm getting accurate data from TSC2007 but the communication is not consistent. I'm facing the following issues:

1.Sometimes the I2C gets stuck in lockup state when the address byte is sent i.e SCL goes low and remains there. My I2C cycle is as provided in the datasheet.

2. The TSC2007 rejects the setup command "0xB0". So now I'm not sending the setup command and letting the TSC work on default settings.

3. I'm doing testing in polling mode i.e i'm not using the PENIRQ signal but finally i would like to work with the interrupt. The problem here is that I'm getting interrupt from TSC continuously every 500ns when it should give an interrupt only when the panel is touched. I checked on the DSO and getting the interrupt signals as falling edge spikes not a proper Square wave signal. Is this correct?

Hardware Connection::

The TSC 2007 is seperatly mounted on another board and all signals to the STM and touch panel(4-wire resistive) have been made using wire.The I2C bus has a pull-up of 4.7Kohms(3.3V). Also I have added decaps 0.1 and 0.01 uF. I also connected a pull-up(2.2Kohm) to the interrupt PENIRQ and later removed it. And their were no changes with the output with respect to interrupt.

Please provide some suggestions specifically for the I2C. Thanks a lot!

Regards

Gaurav

  • Hello Gaurav,

    1. Is it possible because the SCL stretching requirement is not met? Refer to the attachment for the explanation and suggestion.

    2. TSC2007 does not ACK the setup command 0xB0, as listed in Table 3, Pg25 of the data sheet. TSC2007 receives the setup command even though it does not  "ACK".

    3. If you do not touch screen, the /PENIRQ should not go low, except when the I2C is reading X/Y/Z (and thus X/Y driver is turned ON by the reading command).  Refer to  Figure 27 on Pg19 of the data sheet, the touch detector is disabled when X/Y driver is ON and thus /PENIRQ is brought "low". Stop I2C activity should make the /PENIRQ stable.

    Best regards,
    Wendy F.

    SCL stretching requirement.doc
  • Hi Wendy,

    I solved the I2C hangup Issue by reducing the SCL frequency to 100khz. The doc you sent me was very helpful in understanding clock stretching.

    Also the problem with /PENIRQ was solved by disabling the external interrupt before I2C write-read cycle and enabling it again.

    The touchscreen is working gr8 with the calibration scheme provided by you.

    Are there any more suggestions by which i can increase the RESPONSE TIME & SENSITIVITY of the touchscreen?

    Thanks a lot!!!

    Best Regards

    Gaurav P.

  • Hello Gaurav,

    So glad these issues had been resolve!

    About the touch system's response time: the main factors are (1) the touch panel (material, structure and such) and (2) the capacitance between the touch panel and the TSC, i.e.: X+/X-/Y+/Y-. Refer to Section 3 of the application report sbaa155a on the capacitance affection. Besides, there are other factors, such as I2C speed (using other options to meet SCL stretch requirement so as not to reduce I2C speed).

    About the touch system's sensitivity: the main factor is the touch panel. The /PENIRQ pull-up resistance can have some affction only if you read touch data upon /PENIRQ interrupt  (refer to the section "/PENIRQ sensitivity" of the application report slyt292).

    Regards,
    Wendy F.