Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

indra
Level 1
Level 1
5 replies posted 10 sign-ins 5 sign-ins

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?

0 Likes
2 Replies
Jeremy_Zhou
Moderator
Moderator
Moderator
10 solutions authored 10 likes given 100 replies posted

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.

2023-03-07_13h56_43.png

BR,

Jeremy

 

0 Likes

Hi @Jeremy_Zhou 

Can you provide me any example code on how to enable a software interrupt and modify upper CSA context

BR,

Indra

0 Likes
This widget could not be displayed.