- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to enable user mode 0 on tc39x aurix . For this want to change the IO bit in the PSW register to 00 for user mode 0.
Ifx_CPU_PSW psw;
psw.U = __mfcr(CPU_PSW);
psw.B.IO = 0x0;
__mtcr(CPU_PSW, psw.U);
This is the instruction I am using to change the IO bit but instead of setting the IO bit it setting the interrupt stack control bit(IS). also the starting value of the psw shows c000980 rather than 0000 0B80(reset value). what should I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @indra
Thank you for your interest in Infineon Semiconductor products and for the opportunity to serve you.
What should I do?
The PSW will become the 0xC000980 after going through the startup function, to change the privilege level, I'd like to suggest you to software trigger either interrupt or trap, then modify the PSW in the auto-stored upper CSA context, after finishing, return and PSW will be 'restored' to modified value.
BR,
Jeremy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jeremy_Zhou
Can you provide me any example code on how to enable a software interrupt and modify upper CSA context
BR,
Indra