cancel
Showing results for 
Search instead for 
Did you mean: 

SPC560D - power control modes

ssk
Associate II
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.
61 REPLIES 61
ssk
Associate II
Posted on July 02, 2015 at 10:29

I am using standby mode as my product needs < 2mA of current when in low power mode. I tried using stop mode but it fails to meet the current requirements.

Can you please provide the answers for queries?

Thanks.

Mike.

Erwan YVIN
ST Employee
Posted on July 02, 2015 at 11:26

Hello Mike ,

can you send me your example ? Did you trySPC560Dxx OS-Less WKPU LPM Test Application for Discovery ? You can adapt this program with STANDBY Mode. you should correctly set LP MODE for Standby and add the standby mode in LP3 for example

/**
* @brief Peripheral mode 3 (low power mode).
* @note Do not change this setting, it is expected to be the ''stop only''
* mode.
*/
#if !defined(SPC5_ME_LP_PC3_BITS) || defined(__DOXYGEN__)
#define SPC5_ME_LP_PC3_BITS (SPC5_ME_LP_PC_STOP0)
#endif
/* Enable WKPU PCTL */
halSPCSetPeripheralClockMode(69,
SPC5_ME_PCTL_RUN(2) | SPC5_ME_PCTL_LP(3));

I am using a WKPU Unit to go back in RUN Mode Best Regards Erwan
ssk
Associate II
Posted on July 02, 2015 at 13:00

Hello Erwan,

Thanks for the guidelines. Is the test app you mentioned available with v3.4.x? I have yet not installed the v3.5.x. Can you please provide me the test application here?

All the settings look ok as the device enters the LPM mode but can not exit it.

Thanks.

Mike.

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

Hello Mike ,

You can find in this attachment the LPM Test application

This application is integrated in the application wizard from SPC5Studio 3.5.0+ version

Do not hesitate to send me your application ?

Best regards

Erwan

________________

Attachments :

SPC560Dxx_OS-Less_WKPU_LPM_Test_Application_for_Discovery.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0UI&d=%2Fa%2F0X0000000bZY%2FYgBvr_C1Ph2oj_hAujv2d0qKbQAasWTN0KEcnQX73Kc&asPdf=false
ssk
Associate II
Posted on July 02, 2015 at 16:12

Hello Erwan,

Thanks for the test application. I have implemented the same and it works for STOP mode but not for STANDBY mode. Can you please try to configure your test app for STANDBY mode and check?

As communicated, my app enters the STANDBY mode but I am unable to pull it out of it. As per specifications, I tried using DRUN mode to come out of STANDBY but no success. Can you please check your app for STANDBY mode?

Thanks.

Mike.

ssk
Associate II
Posted on July 06, 2015 at 11:30

Hello Erwan,

Have you tried 'STANDBY' mode? Please respond.

Hello forum members,

Has anyone tried using 'STANDBY' mode? Any help?

Thanks.

Mike.

Erwan YVIN
ST Employee
Posted on July 07, 2015 at 13:29

Hello Mike ,

i will send you an example application LPM on Standby mode.

  Best Regards

              Erwan

Erwan YVIN
ST Employee
Posted on July 07, 2015 at 15:36

Hello Mike ,

You can find in this attachment an example of STANDBY mode LPM Application

First ,

1)with a wire : plug the PA[11] (BUTTON) with PA[3] (IRQ #0)

==>Click on BUTTON SW2 to go in STANDBY Mode

==> Rely by a wire PA[2] to generate a trigger (WKPU) in order to go in RUN Mode

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=0680X000006I0Sc&d=%2Fa%2F0X0000000bZZ%2FpwJUdNGGuatcEo1ThwSB_kpmv5uR8oymKmOQ2Os1LQg&asPdf=false
ssk
Associate II
Posted on July 08, 2015 at 14:18

Hello Erwan,

Thanks for the test application. I believe you must have tested it. I have implemented standby/run mode in the same way as you did though the pin used are different.

What I observed is I do not receive the interrupt for wakeup pin when MCU enters standby mode. But the same code works when I put the device to stop mode and exits when wakeup interrupt is received. I looked at the reference manual (page #138), it states as wakeup event as exit source for standby mode while wakeup interrupt or wakeup event as source for stop mode to exit. Does this make sense?

How to serve event for wakeup? When can I configure event for wakeup?

Thanks for your speedy response.

Mike.