Skip to main content
Visitor II
August 5, 2003
Question

Stop mode with WFI

  • August 5, 2003
  • 6 replies
  • 1245 views
Posted on August 05, 2003 at 08:44

Stop mode with WFI

    This topic has been closed for replies.

    6 replies

    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:34

    Have a look to the attached project.

    Visitor II
    May 17, 2011
    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.

    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:34

    Thanks.

    I already tried with optimization compilation and now works fine!