Skip to main content
Du1
Associate III
January 24, 2019
Solved

STM32L4R9I-DISCO Touch Screen dependencies

  • January 24, 2019
  • 2 replies
  • 648 views

I'm trying to develop a custom application, but noticed that if I disconnect the touch screen cable of the AMOLED LCD, the joystick stops working. I'm looking through code for dependencies, but I think it's not in the provided code, but something programmed into the Port Expander, anyone know how where I can find code for that and if not, how can I disable dependencies on the touchscreen so I can keep using the joystick. Thanks!

This topic has been closed for replies.
Best answer by Du1

Thanks for the answer @Amel NASRI​ 

turns out a project created by TouchGFX has two places to enable the Touch control, one is in GuiConfig.h with this:

#define GUI_SUPPORT_TOUCH         (0) // Support touchscreen

and the other is in mmi_config.h with:

#define MMI_TOUCHSCREEN_SUPPORTED    1

Disabling those was the trick to regaining access to the joystick.

2 replies

Amel NASRI
Technical Moderator
January 25, 2019

Hi @Du​ ,

The configuration of both the Joystick and the IO_Expander (MFX) are provided in the driver STM32Cube_FW_L4_V1.13.0\Drivers\BSP\STM32L4R9I-Discovery\stm32l4r9i_discovery.c.

Based on BSP_JOY_Init, the only dependency between the joystick and MFX is when Joy_Mode is "JOY_MODE_EXTI". So, try using "JOY_MODE_GPIO".

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Du1
Du1AuthorBest answer
Associate III
January 25, 2019

Thanks for the answer @Amel NASRI​ 

turns out a project created by TouchGFX has two places to enable the Touch control, one is in GuiConfig.h with this:

#define GUI_SUPPORT_TOUCH         (0) // Support touchscreen

and the other is in mmi_config.h with:

#define MMI_TOUCHSCREEN_SUPPORTED    1

Disabling those was the trick to regaining access to the joystick.