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 9, 2015
    Posted on July 09, 2015 at 15:00

    Hello Erwan,

    Thank you very much for your quick reply.

    I am attaching my test application herewith. Please verify if the implementation is correct as I am not seeing the expected behavior with this.

    My application uses,

    - PE0/WKUP6 as wakeup signal

    - PA12/EIRQ17 as switch/button signal

    When I run this code on target, I do see transition to 'STANDBY' mode but I do not get wakeup interrupt and hence no further code execution. Even the debugger looses the control when target enters the STANDBY mode. I have verified the behavior even with debugger removed but it is same.

    Thanks in advance for all your help.

    Mike.

    ________________

    Attachments :

    Test_Wakeup_09Jul15.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I09M&d=%2Fa%2F0X0000000bZX%2FqhZNCfWAITxmtJ7lfbTMcvzcpyXbcN.XJtRC_Dfl4SU&asPdf=false
    Erwan YVIN
    ST Employee
    July 9, 2015
    Posted on July 09, 2015 at 17:45

    Hello Mike ,

    Ok , the transition RUN ==> STANDBY is working well.

    The behavior is normal, you are losing the debug control because in low power because the CPU is going to shut off the debugger connection.

    Did you trigger a Falling Edge on WKPU[6] PE[0] ?

                    Best Regards

                                   Erwan

    ssk
    sskAuthor
    Associate III
    July 10, 2015
    Posted on July 10, 2015 at 08:24

    Hello Erwan,

    Yes, I am triggering falling edge on wakup signal.

    Mike.

    ssk
    sskAuthor
    Associate III
    July 10, 2015
    Posted on July 10, 2015 at 16:03

    Whether using falling edge for wakeup signal needs any additional configuration - internal pull up/down? Whether external pull up/down is required?

    Thanks.

    Mike.

    Erwan YVIN
    ST Employee
    July 13, 2015
    Posted on July 13, 2015 at 11:21

    Hello Mike ,

    if you set WIPUER, you do not need to put an external pullup.

    It could be good to check with oscilloscope your Wakeup signal.

        Best Regards

                   Erwan

    ssk
    sskAuthor
    Associate III
    July 13, 2015
    Posted on July 13, 2015 at 12:41

    The same wakeup signal works well in STOP mode. What could be going wrong in STANDBY mode?

    Mike.

    ssk
    sskAuthor
    Associate III
    July 13, 2015
    Posted on July 13, 2015 at 15:50

    Hello Erwan,

    Have you checked my test application? It uses falling edge for wakeup signal. Is it working at your end as expected?

    The same wakeup signal works well in STOP mode. What could be going wrong in STANDBY mode?

    I checked the wakeup signal (PE0) over oscilloscope and I am able to receive the falling signal when MCU is in STANDBY mode. My device goes to STANDBY mode when this signal (PE0) is pulled high.

    Please let me know the solution at the earliest as only this implementation has held up my project release. Thanks.

    Mike.

    Erwan YVIN
    ST Employee
    July 15, 2015
    Posted on July 15, 2015 at 12:02

    Hello Mike ,

    You are right ..

    There is a problem in your STANDBY Application.

    You can not switch from STANDBY Mode to RUN0 Mode

    You have to switch to DRUN Mode First. (CF Reference Manual)

    I am sending you a new application this afternoon.

              Best Regards

                          Erwan

    Erwan YVIN
    ST Employee
    July 15, 2015
    Posted on July 15, 2015 at 13:57

    Hello Mike ,

    You can find in the attachment the Test Application in STANDBY mode.

    1) From STANDBY State, you have to switch in DRUN mode

    2) After STANDBY State , i have to stub spc_clock_init() function

    Best regards

    Erwan

    ________________

    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=0680X000006I0UD&d=%2Fa%2F0X0000000bZW%2Fq_19Gr4AFHhJopz4h0wB3mK5UtydKabrBlN8nbLOO.4&asPdf=false
    ssk
    sskAuthor
    Associate III
    July 20, 2015
    Posted on July 20, 2015 at 13:42

    Hello Erwan,

    Sorry for replying late.

    I tried executing your test application on SPC560D-DIS discovery kit. I did the connections as per your comments,

    PA11 shorted to PA3 and PA2 wired for exiting standby mode. Please find attached image.

    But the test application does not execute as expected i.e. it does not enter the standby mode when button (SW2) is pressed. I am saying this because the LED (D7) in main loop is always blinking. I think, it must be off when device enters standby mode. As it does not enter standby mode, no question of exiting it.

    Can you please clarify the issue?

    I verified the patches and these are available in hal_lld.h. Anything else is required?

    I am using SPC v3.4.x. Please find installation details. Is it required here to upgrade to next version?

    Look forward to have earliest reply as this is the only issue which has held up my project. Thanks.

    ________________

    Attachments :

    ST_SPC_Connection_details_01.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0U8&d=%2Fa%2F0X0000000bZU%2Fkx3tHhyhKXOLXkt_wywhnkQbkK78Gk._sDit90BeQxg&asPdf=false

    ST_SPC_Installation_details_3_4_x.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0LN&d=%2Fa%2F0X0000000bZV%2FoHLw7ujr9TpT5NrXbFprqESIZ6rfgA.ovGENzKcHsBE&asPdf=false