Skip to main content
ssk
Associate III
June 30, 2015
Question

SPC560D - power control modes

  • June 30, 2015
  • 61 replies
  • 8056 views
Posted on June 30, 2015 at 16:50

Hello,

I am using standby mode for SPC560D MCU. The datasheet mentions about using DRUN or software reset for exiting this mode. Can you please explain on,

1. How to configure the DRUN mode? I tried using API 'halSPCSetRunMode' for switching between modes. But when used for DRUN mode, it does not exit the standby mode correctly and a power reset is required. Is any thing missing for this?

2. Which are the ways to use software reset for SPC560D? Can I use watchdog reset as a software reset? Is there any other means for software reset?

Thanks in advance for any help.

Mike.
    This topic has been closed for replies.

    61 replies

    ssk
    sskAuthor
    Associate III
    July 24, 2015
    Posted on July 24, 2015 at 11:33

    Hello Erwan,

    I executed your test app successfully. What I observed is that unless the PA2 (WKUP3) signal is connected to ground, the MCU does not enter the standby mode i.e. the test app does not execute.

    My requirement is that I am using single pin for entering and exiting standby mode. I tried doing this with the test application. I connected the button signal (PA11) to wakeup signal (PA2). This should put the MCU to standby mode when the button is pressed and should exit when the button is released. But this is not working as expected. MCU does not enter the standby mode even after keeping the button pressed. Is it ok to use a single pin for enter and exit of standby mode? What other configurations are required for the pins?

    Mike

    ssk
    sskAuthor
    Associate III
    August 7, 2015
    Posted on August 07, 2015 at 18:53

    Hello Erwan,

    I tried executing my code for wakeup signal. I am attaching a image showing the debugger state and CPU SFRs for the configuration. I am finding that the MCU is not exiting the standby mode and giving the error as 'Clock failure'. Please look into this as I need to resolve this issue on priority. I will be working on weekends for this issue. Really appreciate your fastest help.

    Thanks in advance.

    Mike.

    ________________

    Attachments :

    MPC560D_after_wakeup.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0U3&d=%2Fa%2F0X0000000bZR%2FI8_XBuKZF9PyKFhHC2nAXmatVOXK_2xIe0R0ZDbWQA4&asPdf=false
    nooshin_1382
    Associate III
    September 30, 2015
    Posted on September 30, 2015 at 14:55

    Hi Mike I have The same Problem too , in SPC560B50L5 I try the other ways but this problem is not solved .

    i try the erwan code sample but have the same problem .

    is this Bug in st MCU or not ? Please let me know.

    is your Problem Solved with this issue ?

    Best Regards

    Nazerian Vanima

    Erwan YVIN
    ST Employee
    September 30, 2015
    Posted on September 30, 2015 at 17:08

    Hello Vanima ,

    ST Forum is back.

    Have you enabled FLEXCAN module ?

    When any FlexCAN module is active, MDIS to 0.

    no 

    low-power mode can be entered. FlexCAN must be frozen using FLEXCANx_MCR[FRZ]=1

    Mike , did you solve your Low Power mode issue 

    Standby to DRUN ?

       Best regards

                         Erwan

    nooshin_1382
    Associate III
    October 1, 2015
    Posted on October 01, 2015 at 08:13

    Hi Erwan

    Thanks for fast response

    I don't use anything likeCAN or Serial , i try my code but i have same response with your send code for mike (My code is in attachment) .

    I don't know this is random some times for first time the program go in Standby mode but when the APP havea wakeup interrupt the core is running but never go to standby mode

    i see the S_Mtarns bit in Debugger it is always is zero and the program is always in while loop.

    I see some docs about the standby mode , when you want go tostandby mode it is better your function is in SRAM and your exit from standby mode function should be in SRAM.

    Dear Erwan Please help about this item in SPC Studio community ''

    /public/STe2ecommunities/mcu/Lists/SPC5%20Studio/Flat_New.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/SPC5%20Studio/Implement%20function%20in%20RAM&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800081659930B93F604AA33E49F806912ACD

    ''

    Thanks

    with Best Regards

    Nazerian Vanima

    ________________

    Attachments :

    Sleep.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Ty&d=%2Fa%2F0X0000000bZS%2FNLoj9N1owfisvfmcUVBN6ggdXDfGS2D2yKFsba0hbDE&asPdf=false
    ssk
    sskAuthor
    Associate III
    October 1, 2015
    Posted on October 01, 2015 at 14:06

    Nice to hear that forum is up and running again.

    Yes Erwan I am able to resolve the issue by correctly setting the configuration bits. Thanks.

    Mike.
    Erwan YVIN
    ST Employee
    October 1, 2015
    Posted on October 01, 2015 at 17:52

    Hello Vanima ,

    I am checking your issue.

    Standby transition is not so easy to implement.

    I have answered to your SRAM issue in an other post.

    Best regards

                           Erwan

    nooshin_1382
    Associate III
    October 3, 2015
    Posted on October 03, 2015 at 07:17

    Hi Erwan

    Thanks for your Response

    ok I wait For your message about this issue .

    Best Regards

    Nazerian Vanima

    nooshin_1382
    Associate III
    October 3, 2015
    Posted on October 03, 2015 at 07:20

    Hi Mike

    Please Let me Know about your Configuration bits.

    Best Regrds

    Nazerian Vanima

    ssk
    sskAuthor
    Associate III
    October 5, 2015
    Posted on October 05, 2015 at 13:15

    Hello Vanima,

    I am attaching herewith the sample application which I used for understanding the stanby mode behavior. Thanks.

    Mike.

    ________________

    Attachments :

    SPC560Dxx_OS-Less_WKPU_STANDBY_LPM_Test_Application_for_Discovery.7z : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Tt&d=%2Fa%2F0X0000000bZT%2Fe8jJVJhltjLqHzyQedxHTAYaA9XiyfMWVPkuebxhyNc&asPdf=false