How to read stack pointer, Link register and program counter value for S32K146 (Arm Cortex-M4)

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

How to read stack pointer, Link register and program counter value for S32K146 (Arm Cortex-M4)

2,247件の閲覧回数
pratheek_b
Contributor II

How to read the below registers value?

1) Stack pointer(SP) - R13
2) Link Register(LR) - R14
3) Program Counter - R15
4) Exception and Reset Control Registers
5) Program Status Register

 

@S32k146, @ArmCortexM

0 件の賞賛
1 返信

2,235件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @pratheek_b,

Do you want to read it with the core in C?

If so. use inline assembler.

You can refer to this example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

fault_exceptions.c

 

BR, Daniel

0 件の賞賛