Setting up Protection register set for memory protection in TC297

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

cross mob
User11979
Level 1
Level 1
Hi,

I am working on TC297x controller with multicore autosar os configuration.
I am trying to setup memory proection but im facing issue when i try to enable SYSCON.PROTEN bit.

In the architecture manual they mentioned that before setting SYSCON.PROTEN bit make sure that
"Protection register set is initialized".
How do i initialize protection register set.

Thanks in advance.

Regards,
Autosarian.
0 Likes
4 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
Hi,
you must initialize the register with a mtcr instruction, also SYSCON. More information about memory protection (register description) you can find in the architecture manual part 1 chapter 9.
Please note that the SYSCON register is safety endinit protected. You must make sure that the safety endinit bit is not set when you will write to SYSCON.
0 Likes
User11979
Level 1
Level 1
Hello MoD,

Thanks for the response.

I have used mtrc instruction to set the SYSCON register and also i made sure that safety endinit bit is not set while setting up SYSCON.
But still i was getting protection trap.

On further debugging i came to know that the current protection register set (PRS0) has to be initialized i.e,
setting up of code, data access range for the current protection register set (PRS0) is necessary.
After setting up the PRS0, SYSCON is successfully updated.

But then I'm getting new issue which is undef instruction access.

Regards,
Rajesh.
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
What you mean with undef instruction access? If the debugger shows undef as assembly code then maybe the debugger don't know the instruction.
0 Likes
User11979
Level 1
Level 1
Hello MoD,

You are right, the debugger couldnt understand the instruction and the issue was resolved.

Regards,
Autosarian
0 Likes