Example of DWT for stack usage monitoring on S32K1xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example of DWT for stack usage monitoring on S32K1xx

Jump to solution
1,896 Views
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 Kudos
1 Solution
1,864 Views
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

View solution in original post

4 Replies
1,889 Views
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 Kudos
1,872 Views
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 Kudos
1,865 Views
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

1,856 Views
wei_w_he
Contributor IV

Dear Daniel,

Tks for the great support.

BR

He Wei

 

0 Kudos