cancel
Showing results for 
Search instead for 
Did you mean: 

STR750 wake up from STOP/WFI mode

romano
Associate II
Posted on June 29, 2007 at 06:55

STR750 wake up from STOP/WFI mode

2 REPLIES 2
romano
Associate II
Posted on June 22, 2007 at 14:24

Dear All,

I have a problem with an STR752FR2 (custom HW), IAR KS + JLink.

This is the code:

-----------

// Enter WFI

MRCC_PWRCTRL = x;

MRCC_PWRCTRL = xp1;

MRCC_PWRCTRL = xp1;

MRCC_PWRCTRL = x;

MRCC_PWRCTRL = xp1;

if(MRCC_PWRCTRL); // WFI or STOP!

// ****** WAKE UP ********

asm('' nop'');

asm('' nop'');

if(MRCC_PWRCTRL_bit.LP_DONE)

{

MRCC_PWRCTRL_bit.LP_DONE = 0;

EXTIT_PR = 0xffff;

SW_reset(); // RESET THE SYSTEM

}

---------------------------

The main program simply blinks two leds, and goes in WFI (or STOP) when a line is high.

If I remove the nops above, the following if-statement will never execute, and so the SW_reset() inside will never make his way. Worse, the program stuck.

If I remove a single nop (leaving one), then the program continues running but with strange behaviour.

If I leave both nops in place, it works, wakes up correctly, and make the SW_reset().

I suppose this is due to the pipeline not being flushed when waking up, could you confirm? Where I can find more info?

Best regards,

Romano

kaouther
Associate II
Posted on June 29, 2007 at 06:55

Dear Romano,

An example is available in STR75x firmware library, configuring the system to go in WFI mode. If the system fails to go into WFI mode, a led connected to P2.19 pin is turned on. More details are available in the readme.txt file provided with the example4 in MRCC examples. Could you test this example if you get the same behavior as below? if possible to get your whole project to visualize the problem if reproduced.