Skip to main content
parisa
Associate III
Apr 21, 2020 10:38 AM UTC
Question

Help to set the stack size of RTX and startup file STM32F10x

Hello,

In a Ethernet communication, my MCU stop working after some seconds which makes me crazy. I will be thankful if you could help me to set the stack/heap and other parameters of RTX and my MCU startup file in order to find my problem better.

0693W000000WATvQAO.png

0693W000000WAU5QAO.png

I need to have a Network connection (UDP)/USART3/Timer. Based on my requirement and

https://www.keil.com/pack/doc/mw/Network/html/nw_resource_requirements.html

how do you suggest to set these value for my application. Please provide me some numbers to get a good sense of setting of these variables.

This topic has been closed for replies.

3 replies

TDK
Apr 21, 2020 1:25 PM UTC

Are you sure those are the problem? 0x1000 is quite a lot of stack space.

I would suggest using the debugger to figure out why the program "stops working" and debug that. If you have a memory leak, no amount of heap space is going to save you.

"If you feel a post has answered your question, please click ""Accept as Solution""."
parisa
parisaAuthor
Associate III
Apr 22, 2020 8:02 AM UTC

Thank you TDK,

I have problem with debugging my MCU.

My MCU program hangs after some seconds. I put different signal pins and blinking LED to trace which function makes my MCU stop working. But I can't figure it out because when it hangs none of the function works fine. I need a good/complete reference that covers "Debugging codes in ARM Keil debugger" to trace my problem. I will be thankful if you could provide me a good tutorial. I need to know which line/interrupts cause this problem. When I connect Jlink to my MCU everything works fine(I think it is because of its delay).

TDK
Apr 22, 2020 1:21 PM UTC

Going to be hard going if you can't debug. I'm not sure the best way to debug RTOS on Kiel.

> When I connect Jlink to my MCU everything works fine(I think it is because of its delay).

What delay? It shouldn't run any slower with a debugger.

"If you feel a post has answered your question, please click ""Accept as Solution""."