2021-06-26 06:14 AM
BSP_TS_GetState inTouchGFX Return Hardfault and the i2c4 state is always Reset in the BSP_TS_Init. i use STM32H735 Discovery Kit.
2021-07-13 05:33 PM
Hello MSale.1,
Thank you for the new project, I confirm it compiles correctly.
I don't have the board with me right now but I'll test it and come back to you.
But first of all, is it normal that the STM32TouchController is empty ?
void STM32TouchController::init()
{
/**
* Initialize touch controller and driver
*
*/
/*TS_Init_t hTS;
hTS.Orientation = TS_SWAP_XY;
hTS.Accuracy = 0;
hTS.Width = 480;
hTS.Height = 272;
BSP_TS_Init(0, &hTS);*/
}
bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)
{
/**
* By default sampleTouch returns false,
* return true if a touch has been detected, otherwise false.
*
* Coordinates are passed to the caller by reference by x and y.
*
* This function is called by the TouchGFX framework.
* By default sampleTouch is called every tick, this can be adjusted by HAL::setTouchSampleRate(int8_t);
*
*/
return false;
}
/Alexandre
2021-07-14 12:00 AM
@Alexandre RENOUX
Hi,
Thank You for Your support.
No its not normal i just was testing the BSP_TS_Init because the problem is in the initialization of the touch controller. now i cant get the ID of the FT5336.
but the code is for this function can be insterted normally from any template project for that board.
Regards
Mahmoud
2021-07-14 06:59 PM
Hello MSale.1,
After checking your project more thoroughly, I think I found the problem with your touch controller initialization.
You set the I2C in CubeMX while the code is already written in the driver so you've overwritten what was working with something that was not.
Please delete your I2C in CubeMX and check If it goes through the initialization.
Also I noticed a lot of difference between your project and the Board Setup H735-DK available on TouchGFX Designer.
For instance, why do you use FreeRTOS CMSIS V1 and not V2 ?
Why do you initialize DMA2D but do not use it with TouchGFX ?
Please check the Board Setup of H735-DK ^^
/Alexandre
2021-07-15 12:21 AM
@Alexandre RENOUX
Hi Alexandre,
Yes you right. i already tried this before. when i delete the I2C initialization in Cube MX i dont get hardfault error but i can not communicate with touch controller and always getting its ID fail. i tried it with RTOS V2 and V1 as well and it did not change any thing.
For DMA2D . this project i just created to test the touch. i am not sure if the DMA2D has affect on this or not but i will use it.
Mahmoud
2021-07-15 01:56 PM
2021-07-22 06:26 AM
@Alexandre RENOUX
Hi
Have you had time to check the project. the problem is not only with the initialization its also with using the touch controller it self. i have used many discovery board with touchgfx. i faced this problem with the H735 and H7B3 discovery boards only. something is wrong with using the BSP package with the code generated from the CUBE IDE.
Maybe i am wrong but i think it would take some minutes from You to verify it.