Skip to main content
Visitor II
April 21, 2020
Question

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

  • April 21, 2020
  • 3 replies
  • 1265 views

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

    Super User
    April 21, 2020

    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.

    parisaAuthor
    Visitor II
    April 22, 2020

    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).

    Super User
    April 22, 2020

    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.