Skip to main content
S_bgh99
Associate II
September 16, 2020
Question

Two task in touch gfx

  • September 16, 2020
  • 3 replies
  • 1078 views

Hi, I'm using FreeRtos v1 , my board is stm32f429... . I have to thread in main.c and I generate them by stm32cubemx ...in one thread I have a touchgfx process . Other is a task for ethernet . Both of them have a same priority and the stack size of the first is 2048 and another is 1024. But just the touchgfx task can run . I wrote a variable in the header ... But I can set it in the ethernet task . In other words the second can't be run. ​

This topic has been closed for replies.

3 replies

HPham.1590
Associate III
September 16, 2020

Ethernet may not need too much stack size, you can try reduce from 1024 to 512, may be, It's depend on your Heap Size which you were configured.

Of course, you can increase the Heap size if you dont want to reduce the stack size of Ethernet task

Hieu

S_bgh99
S_bgh99Author
Associate II
September 16, 2020

i test 512 but it doesn't work:grimacing_face: i change stack size from startup file and now it works true with 1024 stack size. but now i have a new question. how can i calculate stack size???

HPham.1590
Associate III
September 18, 2020

Sorry for the lately reply,

It's hard to calculate exactly how much Stack size we need, or I don't know how to. But in my case, I often determine this parameter depend on my experience.

It's good if anyone can explain how to choose these parameter :)