MPC 5634 stack or heap issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC 5634 stack or heap issue

904件の閲覧回数
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 返答(返信)

827件の閲覧回数
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 件の賞賛
返信

827件の閲覧回数
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 件の賞賛
返信

827件の閲覧回数
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 件の賞賛
返信