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.
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
61 REPLIES 61
ssk
Associate II
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
ssk
Associate II
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
Associate II
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 II
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
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 II
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
Associate II
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
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 II
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 II
Posted on October 03, 2015 at 07:20

Hi Mike

Please Let me Know about your Configuration bits.

Best Regrds

Nazerian Vanima