Example of DWT for stack usage monitoring on S32K1xx

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

Example of DWT for stack usage monitoring on S32K1xx

跳至解决方案
2,049 次查看
wei_w_he
Contributor IV

Dear Officer,

Can we have a application/code example for DWT  (Debug Watchpoint and Trace) for stacking over/underflow detection on S32K1xx platform?

Thanks and best regards

He Wei

 

0 项奖励
1 解答
2,017 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Dear He Wei,

The S32K11x DWT module is not accessible by the core, unfortunately.

Please read this thread: DWT on S32K11x

https://community.nxp.com/t5/S32K/DWT-on-S32K11x/m-p/960401

 

Regarding the asm, please create a new thread in

https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds

 

Thank you,

BR, Daniel

在原帖中查看解决方案

4 回复数
2,042 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello He Wei,

You can find an example here:

https://community.nxp.com/t5/S32K/Failure-reaction-in-case-of-Stack-overflow-or-underflow-S32K1/m-p/...

 

Best regards,

Daniel

0 项奖励
2,025 次查看
wei_w_he
Contributor IV

Dear Daniel,

Thanks lot for this useful information. I try to port it on my S32K118 board but notice the numComp (number of comparators) is 0, so this DWT is not supported for S32K118? 

And the below code will give a compilation error:

register uint32_t* stackPointer asm("sp");
register uint32_t reg0 asm("r0");

I need to modify as below to pass the compilation.

register uint32_t* stackPointer __asm("sp");
register uint32_t reg0 __asm("r0");

Is this modification OK?

Thanks and best regards

He Wei

 

 

 

 

0 项奖励
2,018 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Dear He Wei,

The S32K11x DWT module is not accessible by the core, unfortunately.

Please read this thread: DWT on S32K11x

https://community.nxp.com/t5/S32K/DWT-on-S32K11x/m-p/960401

 

Regarding the asm, please create a new thread in

https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds

 

Thank you,

BR, Daniel

2,009 次查看
wei_w_he
Contributor IV

Dear Daniel,

Tks for the great support.

BR

He Wei

 

0 项奖励