cancel
Showing results for 
Search instead for 
Did you mean: 

Why the MCU hangs?

Mujtaba
Senior

Dear friends,

I am using STM32F107RCt6 MCU and I am running a TCP server on it using LwIP and freeRTOS.

The total heap size of freeRTOS is 10KB and there are two tasks which each task has 256 wods stack. One task is used for Modbus TCP server and the other one is used for Modbus RTU thread.

The Modbus RTU thread works correctly alone and everything works fine but when I add the Modbus TCP server, the MCU hangs and stops working and both tasks don't work anymore.

I am using the latest version of CubeMX and STM32F1 hal libraries.

Any helps would be appreciate,

Mujtaba

10 REPLIES 10

Perhaps provide diagnostic or instrumentation output to understand the nature of the failure and the path it took to get there, rather than just add a watchdog to reset the processor when your code fails.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..