2021-01-07 06:23 AM
Hello, I am using custom board with MCU 746 and generated my project with latest cubmx. When I added Touchgfx task in FreeRTOS, STM started getting reset like for 15-20 times, than everything starts working fine.
Below is the stack information when it goes for hardfault. Also Model::tick() is getting called for once before reset.
Any suggestions ?
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 7000);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
void StartDefaultTask(void const * argument)
{
/* USER CODE BEGIN 5 */
MX_TouchGFX_Process();
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USE
2021-01-07 10:36 PM
While debugging I fond that Touchgx function Model::tick() is getting called before STM hardfault.
2021-01-07 11:02 PM
Hello Chandan Bhatia,
I cannot really help if I don't see your code.
If I had your project in hands, I would first compare everything to the Application Template F746-DISCO and see what are the differences and why they exist. From another post of yours, I believe not much should be different.
Then, if I'm sure that my code is in line with the Application Template (I suspect it's not if you have a hardfault), I would start investigating my custom elements implementation such as the custom display driver implementation,etc.
Also trying the project on CubeMX 6.0.1 and TouchGFX 4.15 could be something I would try. In fact, CubeMX 6.1.1 was not fully tested with TouchGFX 4.16 so minor issues could appear if you're unlucky.
Hope this will be helpful
/Alexandre
2021-01-07 11:28 PM
@Alexandre RENOUX I am putting my project on google drive. Please share your mail id for access.
2021-01-08 02:09 AM
@Alexandre RENOUX Please get my project using below link.
https://drive.google.com/file/d/1Oi7RE_fVcehXMYu8GWFXCwl8XlxZ5K7F/view?usp=sharing
2021-01-09 05:20 AM
@Alexandre RENOUX Did you get the chance to check ?