Skip to main content
Ronte.1
Associate III
October 19, 2020
Question

Good afternoon! I'm trying to use TSC2046 based touchscreen device on a STM32MP157C-DK2 based custom board. I get SPI transfer time-out when touching the screen. Does anyone have a similar problem ?

  • October 19, 2020
  • 3 replies
  • 2353 views

I'm using spi5 and my device tree settings are

&spi5 {

pinctrl-names = "default", "sleep";

pinctrl-0 = <&spi5_pins_a>;

pinctrl-1 = <&spi5_sleep_pins_a>;

    #address-cells = <1>;

    #size-cells = <0>;

 num-cs = <1>;

is-decoded-cs = <0>;

cs-gpios = <&gpiof 6 GPIO_ACTIVE_LOW>;

/delete-property/dma-names;

/delete-property/dmas;

status = "okay";

    

tsc2046@0 {

reg = <0>; // CS0

compatible = "ti,tsc2046";

interrupt-parent = <&gpiof>;

interrupts = <10 2>;

interrupt-controller;

spi-max-frequency = <1000000>;

pendown-gpio = <&gpiof 10 0>;

vcc-supply = <&v3v3>;

touchscreen-size-x = <1024>;

touchscreen-size-y = <600>;

wakeup-source;

status = "okay";

};

};

 The driver of the touch screen is ADS7846. It's currently in-build. Something wrong in the device tree ?

 Some more info. The chip select line seems to be inverted for some reason. Checking with oscilloscope it goes high during spi transaction. It should be low with ads7846 chip.

This topic has been closed for replies.

3 replies

Ronte.1
Ronte.1Author
Associate III
October 23, 2020

Some more info. The chip select line seems to be inverted for some reason. Checking with oscilloscope it goes high during spi transaction. It should be low with ads7846 (and tsc2046) chip.

PatrickF
Technical Moderator
October 29, 2020
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
ZLiu.3
Associate II
March 28, 2023

hey, is your problem solved?

Ronte.1
Ronte.1Author
Associate III
April 4, 2023
Well, we changed the chip to TSC2007 and used i2c control. It solved that problem. BR Raimo Sent from Mail<> for Windows