Write to SCU_PMSWCR0 fails

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

cross mob
Chinmay
Level 1
Level 1
10 sign-ins First reply posted First like given

Hello,

I am trying to  write to SCU_PMSWCR0 register in a AURIX 265 TFT Kit with Safety Endinit set and clear. I am specifically writing to TRISTEN and TRISTREQ bits, but I am not able to do so. Am I missing some steps here?

I am trying to set the default state of the GPIOs to be Tristate instead of weak pull up on reset(warm).

Code:

/* Clear safety EndInit protection */
IfxScuWdt_clearSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());

SCU_PMSWSTATCLR.U = 0x000300FC;

//SCU_PMSWCR0.B.TRISTEN = 1;

SCU_PMSWCR0.U = 0x2102D0;

//while(SCU_PMSWSTAT.B.TRIST == 0)SCU_PMSWCR0.B.TRISTEN = 1;

SCU_PMSWCR0.U = 0x4102D0;

//SCU_PMSWCR0.B.TRISTREQ = 1; 

//while(SCU_PMSWSTAT.B.TRIST == 0)SCU_PMSWCR0.B.TRISTREQ = 1;

//SCU_PMSWCR0.B.TRISTEN = 0; 

/* Set safety EndInit protection */
IfxScuWdt_setSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());

0 Likes
1 Solution
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

You must set TRISTEN and TRISTREQ in the same write access.

Clear bit TRISTREQ: SCU_PMSWCR0.U = 0x2102D0; // TRISTEN=1 and TRISTREQ=0

Set bit TRISTREQ: SCU_PMSWCR0.U = 0x6102D0; // TRISTEN=1 and TRISTREQ=1

View solution in original post

2 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

You must set TRISTEN and TRISTREQ in the same write access.

Clear bit TRISTREQ: SCU_PMSWCR0.U = 0x2102D0; // TRISTEN=1 and TRISTREQ=0

Set bit TRISTREQ: SCU_PMSWCR0.U = 0x6102D0; // TRISTEN=1 and TRISTREQ=1

Chinmay
Level 1
Level 1
10 sign-ins First reply posted First like given

 Thanks for clarifying. I was doing it over separate instructions.

0 Likes