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.

PROCESSOR-SDK-AM62X: touch screen coordinates mismatch

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: ADS7843

Hi,

we are using 5.7 inch resistive touch screen. 

we have deleted the ws-calibration rules and re calibrated touch screen 


However, The touch is getting detected and UI is moving to next screen. The problem is, the coordinates are not aligned properly.
I've to press a bit to the right and a bit down of the button.

I calibrated multiple times thinking it will correct itself, but the result s the same (misaligned coordinates).

Could you please guide us, on how to correct this issue.

Thanks and regards,
Swapna
  • Hi Swapna,

    I have assigned your query to our expert. He is currently out of office until 10/30. So expect a delay in response.

    Apologies for the delay.

    Best Regards,

    Suren

  • Hi Suren,

    Did you get a chance to look into this issue?

    please let us know.

    Thanks and Regards,

    Swapna

  • Hello Swapna,

    1) What touchscreen are you using?

    2) How is the touchscreen connected to the AM62x? 

    3) What SDK version are you using?

    4) please show us the Linux devicetree settings for the touchscreen

    5) How are you calibrating the touchscreen?

    6) Are you using a touch pen for the calibration? I have seen that give more accurate results than using a finger with resistive touch screens in the past.

    Regards,

    Nick

  • Hi Nick,

    Here are the details:

    1) What touchscreen are you using?

       We are using ADS7843 touch screen controller for our resistive touch LCD (Hantronix's 5.7 inch  HDA570ST-V LCD.

        

    2) How is the touchscreen connected to the AM62x? 

    TCH-NIRQ is connected to GPIO pin of the Processor.

    3) What SDK version are you using?

    SDK: 08.06.00.42

    4) please show us the Linux devicetree settings for the touchscreen

         &main_spi2 {
            pinctrl-names = "default";
            pinctrl-0 = <&spitouch_pins_default>;
            status = "okay";
            ti,pindir-d0-out-d1-in;
                    
        
            ads7843@0 {
                pinctrl-names = "default";
                pinctrl-0 = <&main_gpio0_ads_intr_pins_default>;

                reg = <0>;    /* CS0 */
                compatible = "ti,ads7843";
                interrupt-parent = <&main_gpio0>;
                interrupts = <1 0>;
                spi-max-frequency = <100000>;
                pendown-gpio = <&main_gpio0 1 0>;
                //vcc-supply = <&vcc_3v3_sys>; Do not uncomment this line

                ti,x-min = /bits/ 16 <0>;
                ti,x-max = /bits/ 16 <4096>;
                ti,y-min = /bits/ 16 <0>;
                ti,y-max = /bits/ 16 <4096>;
                ti,x-plate-ohms = /bits/ 16 <40>;
                //ti,y-plate-ohms = /bits/ 16 <200>;
                ti,pressure-max = /bits/ 16 <255>;

                ti,vref-delay-usecs = <20000>;
                ti,vref-mv      = <3300>;
                ti,keep-vref-on    =  <1>;

                ti,debounce-rep =  <1>;
                ti,debounce-tol =  <30>;
                ti,debounce-max =  <10>;
                

                ti,settle-delay-usec  = /bits/ 16 <150>;
                ti,penirq-recheck-delay-usecs = /bits/ 16 <20000>;

                
                touchscreen-x-mm    = <115>;
                touchscreen-y-mm    = <86>;


                wakeup-source;
            };
        };

    5) How are you calibrating the touchscreen?

    By deleting the  ws-calibrate.rules.

    rm /etc/udev/rules.d/ws-calibrate.rules
    rm /run/media/mmcblk0p1/ws-calibrate.rules
    reboot

    6) Are you using a touch pen for the calibration? I have seen that give more accurate results than using a finger with resistive touch screens in the past.

    We are using touch pen as well as normal pen to calibrate the Screen.

    Thanks and regards,

    Swapna

  • Hello Swapna,

    Thank you for the response. I'll take a look at your device tree settings on Monday and get back to you.

    Regards,

    Nick

  • Hello Swapna,

    To confirm, are you still seeing similar coordinates after calibration when you touch the corners of the screen? Your coordinates from 3 weeks ago look about what I would expect for touching all 4 corners:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1278967/processor-sdk-am62x-touch-screen-interrupt-issue/4856803#4856803

    It has been a couple years since I looked at resistive touchscreens. Back then, using Weston instead of tslib tended to give much worse calibration results. e.g., https://e2e.ti.com/support/processors-group/processors/f/processors-forum/862817/am3358-touchscreen-error/3197806#3197806 , 

    Are you using a Weston-based graphics system? I haven't checked yet to see what the current default is for our SDK.

    Regards,

    Nick

  • Hi Nick,

    Yes, the coordinates are still same, no improvement there.

    We are using Weston Graphic system and SDK version is 08.06.00.42.

    Display used is Hantronix 5.7 inch (HDA570ST-V).

    Regards,

    Swapna

  • Hello Swapna,

    Your coordinates from 3 weeks ago are expected. If the touchscreen coordinates go from 0 to 4000 for both x and y, it is common to get a touch result that is around 100-300 away from 0 or 4000 when you are touching right on the edge of the screen. I do not see any problems here:

    As far as this statement:
    "I've to press a bit to the right and a bit down of the button."

    Are you able to change the behavior by doing the calibration differently? (e.g., what happens when you try pressing the calibration points at an offset?)

    Once we get the correct ws-calibrate.rules settings, I would expect that you could just use those same settings on all of your other boards without having to do manual calibration.

    If touchscreen with Weston / Wayland is not working the way you want, you could try rebuilding without those components to see if touchscreen performance improves. (again, I have not played around with this in the last several years, so I am not sure what the current behavior is here).
    Notes from the last time I tried that are here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/862817/am3358-touchscreen-error/3197806#3197806
    And you can find information about how to do a yocto build without the mentioned components here: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#common-variations

    Regards,

    Nick