2021-05-28 02:09 PM
Hello,
I have been following this tutorial to enable touch screen on my STM32F469-Discovery board for STemWin.
I have done all the things shown in article. Code compiled successfully. But I can see only blank screen.
In extra to the tutorial, I need to add stm32469i_discovery_lcd.h, Utilities/Fonts/fonts.h and stm32469i_discovery_sdram.h.
By adding these task I got an error on redefining the DSI_IO_WriteCmd function which already defined in STemwin_wrapper.c. SO I removed defination from stm32469i_discovery_lcd.c and compiled.
Can Anyone help ?
2021-05-31 08:21 AM
Hello @Keyur Thumar
Let me first welcome you to the Community :)
From your input , I understand that the project is working when removed the DSI_IO_WriteCmd function from stm32469i_discovery_lcd.c. Is this true?
Could you please provide more details on the faced issue:
Which version of CubeF4, CubeMx and STemWin are you using ? Which IDE ?
What exactly did the error message say?
I am curious to know if you faced any particular issue with one of the working LCD example already available in the STM32CubeF4 package?
\STM32Cube_FW_F4_V1.26.1\Projects\STM32469I-Discovery\Examples\LCD_DSI
\STM32Cube_FW_F4_V1.26.1\Projects\STM32469I-Discovery\Applications\Display
If there is no issue faced with these examples, you may check differences between CubeMX generated code and example.
I'll be waiting for your feedback and progress on your project :smiling_face_with_smiling_eyes:
Imen
2021-05-31 09:34 AM
Hey @Imen DAHMEN ,
Thank you for the reply.
STemwin_wrapper.c:(.text.DSI_IO_WriteCmd+0x0): multiple definition of `DSI_IO_WriteCmd'; Drivers/BSP/STM32469I-Discovery/stm32469i_discovery_lcd.o:stm32469i_discovery_lcd.c:(.text.DSI_IO_WriteCmd+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
2021-06-01 10:27 AM
Hey @Imen DAHMEN
I have found that I2C communication with touch controller does work. Driver can not get reponse for ID in below snippet from stm32469i_discovery_ts.c
uint8_t BSP_TS_Init(uint16_t ts_SizeX, uint16_t ts_SizeY)
{
uint8_t ts_status = TS_OK;
uint8_t ts_id1, ts_id2 = 0;
/* Note : I2C_Address is un-initialized here, but is not used at all in init function */
/* but the prototype of Init() is like that in template and should be respected */
/* Initialize the communication channel to sensor (I2C) if necessary */
/* that is initialization is done only once after a power up */
ft6x06_ts_drv.Init(I2C_Address);
ts_id1 = ft6x06_ts_drv.ReadID(TS_I2C_ADDRESS);
if(ts_id1 != FT6206_ID_VALUE)
{
ts_id2 = ft6x06_ts_drv.ReadID(TS_I2C_ADDRESS_A02);
I2C_Address = TS_I2C_ADDRESS_A02;
}
else
{
I2C_Address = TS_I2C_ADDRESS;
}
/* Scan FT6xx6 TouchScreen IC controller ID register by I2C Read */
/* Verify this is a FT6206 or FT6336G, otherwise this is an error case */
if((ts_id1 == FT6206_ID_VALUE) || (ts_id2 == FT6206_ID_VALUE))
{
/* Found FT6206 : Initialize the TS driver structure */
ts_driver = &ft6x06_ts_drv;
/* Get LCD chosen orientation */
if(ts_SizeX < ts_SizeY)
{
ts_orientation = TS_SWAP_NONE;
}
else
{
ts_orientation = TS_SWAP_XY | TS_SWAP_Y;
}
if(ts_status == TS_OK)
{
/* Software reset the TouchScreen */
ts_driver->Reset(I2C_Address);
/* Calibrate, Configure and Start the TouchScreen driver */
ts_driver->Start(I2C_Address);
} /* of if(ts_status == TS_OK) */
}
else
{
ts_status = TS_DEVICE_NOT_FOUND;
}
return (ts_status);
}
I am getting ts_id1 and ts_id2 as 0 and It says touch device not found.
2022-11-02 04:59 AM
I am having exactly the same issue. Is there a solution for this?