cancel
Showing results for 
Search instead for 
Did you mean: 

Stop mode with WFI

giovanni239955
Associate II
Posted on August 05, 2003 at 08:44

Stop mode with WFI

6 REPLIES 6
giovanni239955
Associate II
Posted on May 17, 2011 at 11:34

We are using ST92F150.

Can you provide to me a software example how to enter and leave Stop Mode?

Thanks

romain2399
Associate II
Posted on May 17, 2011 at 11:34

Have a look to the attached project.

kapil
Associate II
Posted on May 17, 2011 at 11:34

Yes these extra instructions generated can cause problem.

They can be removed by increasing the level of optimization.

giovanni239955
Associate II
Posted on May 17, 2011 at 11:34

Thanks Romain.

I would be very grateful if you coul help me to understand why I don't enter Stop mode.

Here attached the Low_power() function and other definitions. During normal functioning, ADC interrupt and STIM interrupt are working.

I'm not able to enter stop mode (STA_DBG always equal to 3).

I'm not interested in manage wake-up interrupt, I only need to wake up and restart.

Do you see an evident error?

Thanks a lot

giovanni239955
Associate II
Posted on May 17, 2011 at 11:34

In ST92F150, it's written: << to enter STOP Mode, write the sequence 1,0,1 to Stop bit with three consecutive write operations. >>

But the instructions:

WU_CTLR |= WUm_stop;

WU_CTLR &= ~WUm_stop;

WU_CTLR |= WUm_stop;

in the .lis file, are assemblied in this way:

or @WU_CTLR,#4

ld r0,@WU_CTLR

ld @WU_CTLR,r0

and @WU_CTLR,#251

ld r0,@WU_CTLR

ld @WU_CTLR,r0

or @WU_CTLR,#4

ld r0,@WU_CTLR

ld @WU_CTLR,r0

Having not consecutive 3 write instructions could be a problem ?

Thanks a lot

giovanni239955
Associate II
Posted on May 17, 2011 at 11:34

Thanks.

I already tried with optimization compilation and now works fine!