Skip to main content
websat13
Associate III
March 20, 2016
Question

Stbymode and RTC on STM32F205

  • March 20, 2016
  • 8 replies
  • 1481 views
Posted on March 20, 2016 at 13:39

hello

i am working on an stm32f205 project. before adding the RTC part , the stbby mode

works fine.

when i added the RTC part   (i tested it and it works fine), but my system dont want to

get in stby mode. the RTC wakeup and alarms are all disabled.

thanks
    This topic has been closed for replies.

    8 replies

    Tesla DeLorean
    Guru
    March 20, 2016
    Posted on March 20, 2016 at 14:46

    I have a 205 project where it all seems to work, I wonder what you're doing wrong.

    Think about how you can present your problem in a way it might be solved.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    websat13
    websat13Author
    Associate III
    March 20, 2016
    Posted on March 20, 2016 at 16:12

    hello clive1

    thanks for the response.

    i have set a push button to enter standby mode, after pressing this button for 1.3s the MCU goes to standby mode. when i push again the button the MCU restarts in run mode.

    i added the RTC part. now when i press the push button the MCU executes the standby mode function , but it goes imeediately into Run Mode.

    thanks

    Tesla DeLorean
    Guru
    March 20, 2016
    Posted on March 20, 2016 at 18:35

    Perhaps you have neglected to clear some pending state or EXTI?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    websat13
    websat13Author
    Associate III
    March 21, 2016
    Posted on March 21, 2016 at 11:08

    hello

    i have verified all exti pending, i disabled the rtc part and the stby mode works

    again.

    is there any relation between RTC part and thr standby mode.

    thanks

    websat13
    websat13Author
    Associate III
    March 21, 2016
    Posted on March 21, 2016 at 12:49

    hello

    with the debugger here is the RTC_ISR state before activating stbymode (capture.png).

    and after executing the function :HAL_PWR_EnterSTANDBYMode(), here is the state of the RTC_ISR regiter (capture1.png).

    thanks

    ________________

    Attachments :

    Capture.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzTp&d=%2Fa%2F0X0000000bMW%2FZlh3HSXIojj.KAy9.jbZF6.YpLFWtSzYYBhD9B19mt0&asPdf=false

    Capture1.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzTj&d=%2Fa%2F0X0000000bMS%2FHOxtor2Mko2_Hs2_fx3mnaIk9L1gFVY4Wm.GoifLmeY&asPdf=false
    Walid FTITI_O
    Visitor II
    March 21, 2016
    Posted on March 21, 2016 at 12:59

    Hi taleb_bendiab.zakari,

    You have to ensure that all wakeup sources' flags are cleared before entering the standby mode, otherwise it will enter and exit instantly by watching one wakeup source activated.

    Try always to apply the following sequence before in low power application:

    • Disable all used wakeup sources,

    • Clear all related wakeup flags,

    • Re-enable all used wakeup sources,

    • Enter Standby mode

    The wakeup flags that you consider in your case are :

    PWR_FLAG_WU, PWR_FLAG_SB, RTC_FLAG_WUTF.

    If entering and exiting the standby mode several times , check my recommendation in this [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F437%20exiting%20standby%20incorrectly&currentviews=63]discussion.

    The application note http://www.stmicroelectronics.com.cn/st-web-ui/static/active/jp/resource/technical/document/application_note/DM001214pdfcontains an application similar to your case, you may get inspired for your hole application.

    -Hannibal-

    websat13
    websat13Author
    Associate III
    March 21, 2016
    Posted on March 21, 2016 at 15:21

    hello hannibal

    thanks a lot for the information. i followed the instructions you give me and the

    problem was resolved.

    thanks again

    Walid FTITI_O
    Visitor II
    March 23, 2016
    Posted on March 23, 2016 at 12:23

    Hi taleb_bendiab.zakari,

    Nice. Keep up the good work.

    -Hannibal-