cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Resetting after adding Touchgfx task in FreeRTOS

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.

0693W000006HrX1QAK.png 

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

5 REPLIES 5

While debugging I fond that Touchgx function  Model::tick()  is getting called before STM hardfault.

Alexandre RENOUX
Principal

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

@Alexandre RENOUX​  I am putting my project on google drive. Please share your mail id for access.

@Alexandre RENOUX​ Please get my project using below link.

https://drive.google.com/file/d/1Oi7RE_fVcehXMYu8GWFXCwl8XlxZ5K7F/view?usp=sharing

@Alexandre RENOUX​  Did you get the chance to check ?