Skip to main content
Ronte.1
Associate III
Oct 19, 2020 09:09 UTC
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 ?

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.

4 replies

Ronte.1
Ronte.1Author
Associate III
Oct 23, 2020 09:20 UTC

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
ST Employee
Oct 29, 2020 10:12 UTC
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
ZLiu.3
Associate II
Mar 28, 2023 01:22 UTC

hey, is your problem solved?

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