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

AURIX™ Forum Discussions

Chinmay
Level 1
First reply posted First like given First question asked
Level 1

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
50 solutions authored 100 sign-ins 25 solutions authored
Employee

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
50 solutions authored 100 sign-ins 25 solutions authored
Employee

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
First reply posted First like given First question asked
Level 1

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

0 Likes