Hello,
I’m working on a project with stm32h723-zg board. I’m using ili9341 for displaying and xpt2046 as touch panel. However, the screen is working fine, the only problem is the touch screen which is not working.
I’m new to zephyr rtos, here is my overlay code
&spi1 {
status = “okay”;
status = “okay”;
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>;
pinctrl-names = “default”;
cs-gpios = <&gpiod 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,<&gpiod 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
xpt2046: xpt2046@0 {
compatible = "xptek,xpt2046";
status = "okay";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(2)>; // Set your desired frequency here
int-gpios = <&gpiof 3 (GPIO_ACTIVE_LOW)>;
touchscreen-size-x = <320>;
touchscreen-size-y = <240>;
min-x = <0>;
min-y = <0>;
max-x = <4096>;
max-y = <4096>;
kscan_input: kscan-input {
compatible = "zephyr,kscan-input";
};
};
ILI9341:ILI9341@1 {
compatible = "ilitek,ili9341";
status="okay";
spi-max-frequency=<DT_FREQ_M(2)>;
reg=<1>;
cmd-data-gpios=<&gpioe 9 (GPIO_ACTIVE_LOW)>;
reset-gpios=<&gpiog 12 (GPIO_ACTIVE_LOW )>;
pixel-format = <1>;
width = <320>;
height = <240>;
rotation = <270>;
};
};`
the main.cpp code is in: zephyrproject\zephyr\samples\subsys\display\lvgl\src
can anyone help me to fix this ? Thankyou !