Why not wake-up from SCR?

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

cross mob
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

SCRWKEN is set before entering Standby.
PMSWCR0_SCRWKEN = 0x1;

The SCR program is as follows.
int main(void)
{
-------------- omitted ----------------------
while(1)
{

      SCR_SCU_PAGE = 0;
      if( SCR_SCU_SR == 0x08U )
      {

           SCR_SCU_PAGE = 1;

           SCR_SCU_STDBYWKP = 0x1U;

           SCR_SCU_PAGE = 0;
           while( SCR_SCU_SR == 0x08U )
      }
}

I thought that setting SCR_SCU_STDBYWKP to 1 would wake up the Tricore and start from the Reset address, but it doesn't wake up.

what am i doing wrong?

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

On entry into Standby mode, blanking filter is activated.

Configure the blanking filter appropriately via PMSWCR0.BLNKFIL bits (blanking time).

ESRx / PINx edge, WUT underflow or SCR wakeup is ignored during the time between Enter_Standby state till blanking filter expiry. xWKP / xOVRUN flags are only set during Standby mode after Blanking Filter expiry when the respective wake-up event happens.

View solution in original post

0 Likes
6 Replies
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

Please update the following details

1. Could you provide more details on how the standby mode is entered?
2. Are the required voltage supplies available for the device to wake up?
3. How do you identify the device doesn't wake up?
4. Were you able to wake up by any other wake-up sources?

Thanks.

0 Likes
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

Hello.

 

Answer about 1.

void gvTestStandby( void )
{
IfxScuCcu_wait(10); /* Wait for ~10s */

IfxScuWdt_clearSafetyEndinit(IfxScuWdt_getSafetyWatchdogPassword()); /* Clear Safety EndInit protection */
IfxScuWdt_clearCpuEndinit(IfxScuWdt_getCpuWatchdogPassword()); /* Clear CPU EndInit protection */

PMS_PMSWSTATCLR.U = 0xF001EFFF; /* clear all flags*/

Ifx_PMS_PMSWCR4 pmswcr4;
pmswcr4.B.BPSCREN = 1U;
pmswcr4.B.SCREN = 1U;
pmswcr4.B.SCRCLKSEL = 1U;
PMS_PMSWCR4.U = pmswcr4.U;

IfxScuWdt_setSafetyEndinit(IfxScuWdt_getSafetyWatchdogPassword()); /* Set Safety EndInit protection */
IfxScuWdt_setCpuEndinit(IfxScuWdt_getCpuWatchdogPassword()); /* Set CPU EndInit - Standby becomes active */

/********************/

IfxScuWdt_clearSafetyEndinit(IfxScuWdt_getSafetyWatchdogPassword()); /* Clear Safety EndInit protection */
IfxScuWdt_clearCpuEndinit(IfxScuWdt_getCpuWatchdogPassword()); /* Clear CPU EndInit protection */

Ifx_PMS_PMSWCR0 pmswcr0; /* Stdby and Wake-up Ctrl Reg 0 handle */
pmswcr0.U = PMS_PMSWCR0.U; /* Assign current register value to it */
pmswcr0.B.PINBWKEN = 0x0; /* Enable WakeUp on Pin A */
pmswcr0.B.PINBEDCON = 0x0; /* Generate WakeUp Trigger at any edge */
pmswcr0.B.ESR0EDCON = 0x0; /* Disable WakeUpTrigger at any ESR0 edge */
pmswcr0.B.PWRWKEN = 0x0; /* Disable WakeUpTrigger on VEXT ramp up */
pmswcr0.B.SCRWKEN = 0x1; /* Enable WakeUpTrigger on SCR */
PMS_PMSWCR0.U = pmswcr0.U; /* Assign object to register */

SCU_PMCSR0.B.REQSLP = 0x3; /* Request Standby Mode for the system */

IfxScuWdt_setSafetyEndinit(IfxScuWdt_getSafetyWatchdogPassword()); /* Set Safety EndInit protection */
IfxScuWdt_setCpuEndinit(IfxScuWdt_getCpuWatchdogPassword()); /* Set CPU EndInit - Standby becomes active */

return;
}

 

 

Answer about 2.

The power is both VEVRSB and VEXT.

 

Answer about 3.

When MPU wakes up, communication can be done by CAN. I use CAN communication to recognize System RUN.

 

Answer about 5.

I do not try another ways.

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

I guess your wakeup event occurs during the blanking time and therefore will be ignore. Reduce blanking time for standby or wait more time before activate the wakeup.

0 Likes
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

What is blanking time?

How do I set the blanking time?

 

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

On entry into Standby mode, blanking filter is activated.

Configure the blanking filter appropriately via PMSWCR0.BLNKFIL bits (blanking time).

ESRx / PINx edge, WUT underflow or SCR wakeup is ignored during the time between Enter_Standby state till blanking filter expiry. xWKP / xOVRUN flags are only set during Standby mode after Blanking Filter expiry when the respective wake-up event happens.

0 Likes
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

Thank you very much.

Thanks to your advice, I was able to wake up the MPU via SCR.

0 Likes