Exception Timer for SYSCALL Class 6 Trap and Task Context Switch AP32152

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

cross mob
User9635
Level 4
Level 4
50 replies posted 50 questions asked 25 replies posted
Hello Support,

For the RTOS Task Level Context Switch, usually Class 6 SYSCALL Trap is used, which works correctly as expected.
But for SYSCALL Class 6 Trap, Exception Timer of Aurix 2G can't be used because FCX contents will not match upon exit from SYSCALL Trap when performing Task Level Context switch.

TPS_EXTIM_FCX register is a read-only register and hence before performing the Task Level Context switch within SYSCALL Trap Handler we cannot write to TPS_EXTIM_FCX with the correct expected value.
Is there any solution possible to use Exception Timer for SYSCALL Class 6 Trap for this Context Switch handler?
Please let me know.
Context Switch mechanism I am mentioning is well described in Infineon AP32152
https://www.infineon.com/dgdl/ap3215210_Concurrent_multi_threaded_execution.pdf?fileId=db3a3043284aa...
4307.attach
Best Regards
0 Likes
2 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Saving and restoring the Temporal Protection Registers for each task is another part of the operating system's job.

I presume most operating systems would just disable the exception entry timer after returning from a context switch.
0 Likes
User9635
Level 4
Level 4
50 replies posted 50 questions asked 25 replies posted
Hello Support,
Saving Restore by RTOS will not work for TPS_EXTIM_FCX register as it is a read-only register.
That is where the problem I was trying to find a solution as I asked originally.
Best regards
0 Likes