stm32 hard fault usage fault UNALIGNED -> task stack overflow

在STM32官方论坛里提问了:

https://community.st.com/s/question/0D50X00009sW72oSAC/how-to-debug-a-hard-fault-exception-for-stm32

Finally, after I have changed the task stack size of the new added OSPF task from 500 to 2000, everything goes fine. However, I still cannot figure out how could task stack overflow cause the above strange phenomenon.

 

Or just as this link (https://www.micrium.com/detecting-stack-overflows-part-1-of-2/) says:

Stack overflows are common and can lead to some curious behaviors. In fact, whenever someone mentions that his or her application behaves “strangely,” insufficient stack size is the first thing that comes to mind.

 

Although I am using a FreeRTOS operating system, my knowledge about os is very limited. It's time to make up this limitation for me.

 

cnblogs上一个中文的关于STM32堆栈的讲解,非常好

https://www.cnblogs.com/yangguang-it/p/7123727.html

 

 

 

posted on 2020-10-25 21:31  yanhc  阅读(833)  评论(0编辑  收藏  举报

导航