none
Multi touch on WEC7 RRS feed

  • Question

  • Hey all,

    I am working on EDT multi-touch controller. 

    Facing the following issues:

    1. Single touch, for fourth read , header of the read data is wrong.

    2. If I use five fingers to touch and under pen down condition, read data is valid and I am getting proper data. But during pen up, same invalid header or CRC.

    3. Implemented Read of touch controller so that it reads 26 bytes, why sometimes read fails/header is wrong/CRC is wrong ?

    Please share your ideas .

    Regards,

    Seeth


    Seeth

    Wednesday, April 3, 2013 3:53 AM

Answers

  • Paul forgot to mention, single touch is worked for me. 

    Regards,
    Seeth


    Seeth

    • Marked as answer by Seeth Monday, June 24, 2013 12:55 PM
    Monday, June 24, 2013 12:55 PM

All replies

  • 1) Osciloscope and check first that there is no problem on I2C lines (or SPI)

    2) Check if you are properly counting CRC. Are you getting just 0xFF's only or just the  CRC is wrong?

    I made two FocalTechs drivers based on EDT and custom display and have to say that I had no problems with them (beside I2C issues)

    Wednesday, April 3, 2013 5:13 AM
  • Hi,

    I just printed the data of 26 bytes after reading from the controller. It is as follows for single touch.

    Read buffer data is : 0xaa
    PID:00400002 TID:05830012 Read buffer data is : 0xaa
    PID:00400002 TID:05830012 Read buffer data is : 0x1a
    PID:00400002 TID:05830012 Read buffer data is : 0x1
    PID:00400002 TID:05830012 Read buffer data is : 0x0
    PID:00400002 TID:05830012 Read buffer data is : 0x3
    PID:00400002 TID:05830012 Read buffer data is : 0x8b
    PID:00400002 TID:05830012 Read buffer data is : 0x2
    PID:00400002 TID:05830012 Read buffer data is : 0x13
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0x82
    PID:00400002 TID:05830012 Read buffer data is : 0xaa
    PID:00400002 TID:05830012 Read buffer data is : 0xaa
    PID:00400002 TID:05830012 Read buffer data is : 0x1a
    PID:00400002 TID:05830012 Read buffer data is : 0x1
    PID:00400002 TID:05830012 Read buffer data is : 0x0
    PID:00400002 TID:05830012 Read buffer data is : 0x83
    PID:00400002 TID:05830012 Read buffer data is : 0x8b
    PID:00400002 TID:05830012 Read buffer data is : 0x2
    PID:00400002 TID:05830012 Read buffer data is : 0x12
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xcf
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0x3
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Read buffer data is : 0xff
    PID:00400002 TID:05830012 Unexpected header

    For the third read it's reading only 0xff and if I touch using 5 fingers it doesn't give error but once I lift my fingers it throws error as unexpected header or CRC error.

    Regards,

    Seeth


    Seeth

    Wednesday, April 3, 2013 5:28 AM
  • Seeth,

    Those two first data blocks looks properly for EDT fw. Third read has wrong header (for EDT its 0xAA, 0xAA), so it shouldn't be taken into account.

    My thoughts are:

    Do you have another function which is taking care of reading/extracting values whenever TOUCH_CONTACT from EDT was read? Maybe it's invalidating data buffer?

    Did you check on oscilloscope or data analyzer that only 0xFF's are coming after TOUCH_PUT_DOWN ( finger(s) first contact with panel )?

    Still it's possible that micro fw is wrong, but this should be confirmed first osc.

    Wednesday, April 3, 2013 5:52 AM
  • Thank you for your response Pawel..

    I do not have any other function which takes care of the reading the values when pen down interrupt occurs.

    I am checking with oscillator to find out the data. I really do not understand whats going wrong..

    Seeth


    Seeth

    Wednesday, April 3, 2013 6:14 AM
  • Ok. Put some results here, when you have a chance, so we can solve it.
    Wednesday, April 3, 2013 6:27 AM
  • Hi, 

    I checked using Oscillator, I2C clock and data lines are proper. And interrupt line is also fine.

    Data I couldn't make out as for one touch its generating many interrupts and I don't know if I can capture all the data.

    Seeth


    Seeth

    Wednesday, April 3, 2013 8:48 AM
  • Are you getting data on IRQ or somehow continuously? What's the interval between each interrupts?
    Wednesday, April 3, 2013 10:20 AM
  • Hi,

    I am getting the data always but junk data if not interrupt. 

    I always get that print even if there is no interrupt.


    Seeth


    Seeth


    • Edited by Seeth Wednesday, April 3, 2013 10:53 AM
    Wednesday, April 3, 2013 10:51 AM
  • As I understand correctly this is so called continuous mode, right?

    As i know not all fw in FocalTechs support it. I'm using IRQ and only IRQ to get data. It's possible that between interrupts data are invalidated and sent as 0xff to asking host. I think interrupt mode should be more efficient from windows point of view.

    I will check with my IC if this occurs when I try to read it in this way. Will get back with the results.

    Wednesday, April 3, 2013 11:13 AM
  • Hi,

    Yes I think.. It is continuous mode.

    I want to know how the x and y values can be calculated to send them to the upper layers in FocalTech drivers.

    I am confused with this, if I am wrong in calculating these values in returning to upper layer.

    This is the flow of working driver, please correct me if I am wrong:

    1. Touch IST gets created.

    2. This calls Get sample funtion

    3. Get_Sample  function reads the controller and stores in a buffer and then calculates the x and y values as follows as 5th,6th,7th and 8th bytes are X_high, Y_high, X_low and Y_low.

    prex = ((frm[5] << 8) | frm[6]);
    prey = ((frm[7] << 8) | frm[8]);


    4. Function returns the valid flag to the upper layer with the x and y values.

    Is it correct ?



    Seeth

    Seeth

    Wednesday, April 3, 2013 11:42 AM
  • In PDD layer Touch IST is created which waits for touch events generated by touch controller. ->

    When interrupt is generated it should get sample point/points.

    This should call GetPoints in PDD, read data from tch controller and reset intr.

    > prex = ((frm[5] << 8) | frm[6]);
    > prey = ((frm[7] << 8) | frm[8]);

    looks ok.

    Remember that you get points from uncoordinated area and you have to convert them with values stored in registry (HKLM/Hardware/devicemap/touch/CalibrationData/). It's possible to have them recalculated in touch controllerm but it depends on IC fw capabilities.

    4) Yes. It's important to have correctly report them as it's used to recognize clicks within a system.

    BTW: There is nice flow diagram on msdn:

    http://msdn.microsoft.com/en-us/library/jj838836.aspx


    • Edited by Pawel W Z Wednesday, April 3, 2013 12:17 PM
    Wednesday, April 3, 2013 12:15 PM
  • Hi,

    I have not set calibration data in my registry. Please help me what values need to be set.

    And what I did in my code is , if CRC and header are wrong then return TouchSampleIgnore. So if at all I receive any data with 0xff it will return the flag to 

    indicate the upper layer that it should ignore.

    Now I feel I have issues in prex = ((frm[5] << 8) | frm[6]); > prey = ((frm[7] << 8) | frm[8]);

    I am assigning these values directly to x and y. 

    Is it correct?

    Seeth


    Seeth

    Wednesday, April 3, 2013 12:24 PM
  • Those values should be converted within PDD using ConvertTouchPanelToTouchInput()

    ref:

    http://technet.microsoft.com/en-us/subscriptions/index/gg157578.aspx

    so you get uncalibrated values and then calibrate them with this function. Correct values depends on those reported by controller. Generally they are calculated based on reported values in 

    400,240 160,96 160,384 640,384 640,96 when you have 800x480 display, so it's point in the middle and 4 more points moved in 1/4 screen off the edge. You can run Calibration thread and get those points stored in registry (TouchCalibrate() function -> http://technet.microsoft.com/en-us/subscriptions/ee481922.aspx).

    Wednesday, April 3, 2013 12:36 PM
  • Thank you.

    So what ever I am using the method to calculate x and y values are ok right?

    I feel only one touch its taking and some icon gets selected now. 

    Seeth



    Seeth

    Wednesday, April 3, 2013 12:53 PM
  • Are you implementing this driver in some BSP? What kind of?

    It depends on PDD layer how many points are reported. Most of the drivers implementation will take only one point. There is in freescale BSPs some example of multi touch point.

    Wednesday, April 3, 2013 1:01 PM
  • Hi,

    Yes. For BSP, i.MX processor.

    I have HSD100 driver in which this function takes three inputs, x , y and ID.

    Here also I implemented the same thing so updating the same driver.Even controller gives two values no, we need to handle them no. 

    So kept the same implementation as that of HSD100 and changed only values calculation part.

    Is that correct? 

    Seeth


    Seeth

    Wednesday, April 3, 2013 1:07 PM
  • I checked that driver. You have change PDDTouchIST a little to handle as many finger inputs as you required and of course the rest of the stuff in "bsptouch.c". Anyway, you can see that it's based on interrupt from the controller to read the values whenever controller "have them for you". Of course remember to clear interrupt pin after reading it.
    Wednesday, April 3, 2013 3:43 PM
  • Thank you.

    May be because of this itself the values returned are not getting handled properly.

    Even I analyzed the source here with my senior and we got the same opinion that PDD must be changed in order to get this done.

    Is it not possible to make it work only single touch as of now ?

    What might be the changes required to make the single touch work? I am perplexed..

    Seeth


    Seeth

    Wednesday, April 3, 2013 5:53 PM
  • You don't have to change it if you want to report just one at a time. Just write correct values for first finger to *x, *y and *ID = 0

    This controller has indexing feature, so you don't have to worry about keeping each finger remembered/indexed (that's tricky part tricky)

    Don't forget about proper StateFlags. Take a look on prex and prey variables, which could help you solving problems with incorrect values being reported from controller.

    Wednesday, April 3, 2013 6:16 PM
  • Thank you for the reply Pawel.

    Here, it reads 26 bytes from the controller, 5, 6, 7 and 8th bytes having the data as X_high, X_low, Y_high and Y_low...

    If I do as below, please check if I am correct. 

    prex = ((frm[5] << 8) | frm[6]);
    prey = ((frm[7] << 8) | frm[8]);

    *ID=0x0;

    *x=prex;

    *y=prey;

    And if I return Valid flag as usual, it should be working right?

    And before this I would be checking the CRC and header as earlier and if they do not match, I send ignore flag to the upper layer.

    Regards,

    Seeth


    Seeth

    Thursday, April 4, 2013 5:01 AM
  • Pawel W Z,

    I am interested in purchasing the rights to use the Focaltech multi-touch drivers that you developed. Please contact me at homer7 (at) witchesbrew (dot) zzn (dot) com if you are interested.

    Thanks,

    Foz

    Monday, June 24, 2013 12:43 PM
  • Paul forgot to mention, single touch is worked for me. 

    Regards,
    Seeth


    Seeth

    • Marked as answer by Seeth Monday, June 24, 2013 12:55 PM
    Monday, June 24, 2013 12:55 PM