MPC 5634 stack or heap issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC 5634 stack or heap issue

779 次查看
windfield
Contributor I

How to check whether the MPC5634 stack and heap is overflow or not when running?  We find a issue when testing this MCU,the result of the sum of two data sometiems correct but sometimes is wrong,so i suspect the stack or heap is overflow,i want to check it,but i don't know how to check it,i need your help,thank you !

0 项奖励
回复
3 回复数

702 次查看
windfield
Contributor I

Hi Lukas,

     Thanks for your help,i tested your method, i set the pattern in the stack begin addreess and end address,all set 0x55AA,then run the code,both this two address data are not rewritten,what this mean?dose it work?

Regards,

Fei

0 项奖励
回复

702 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, if the patterns at the end are not rewritten, it means the stack didn't overflow.

Regards,

Lukas

0 项奖励
回复

702 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

easiest option for debugging purposes is to fill the stack with some known pattern like 0x55AA after reset (this can be done by debugger), then run the code and watch the threshold where the patterns are not rewritten. This should help to check if the size of stack is sufficient.

Regards,

Lukas

0 项奖励
回复