Hi @abdelrhman
SPR registers can be read/write using these macros:
https://community.nxp.com/t5/S32-Design-Studio/Read-PowerPC-Machine-State-Register-from-C/m-p/160022...
And here is minimalist code showing how to store content of r10 to RAM address 0x40001000:
__asm("e_lis %r3, 0x4000");
__asm("e_or2i %r3, 0x1000");
__asm("e_stwu %r10, 0x0(%r3)");
Regards,
Lukas