cancel
Showing results for 
Search instead for 
Did you mean: 

How Can i Toggle Pin in standby mode ?

nooshin_1382
Associate II
Posted on August 09, 2015 at 14:55

Hi members

I want to toggle pin in standby mode but i do not know how can i do this ?

because when i go to standby mode all things i use is disabled , i saw something lik this in freescale MCU's but i do'nt know how !

is this possible in SPC Mcu or not ?

Best regards

Nazerian Vanima

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
6 REPLIES 6
Erwan YVIN
ST Employee
Posted on August 12, 2015 at 10:39

Hello Vanima ,

ST MCu's have the same IPs as Freescale's MCUs (SPC56 ~MPC56)

If you want to toggle pin in Standby Mode .. i think that it is not possible.

you should use an intermediate Low Power Mode state and the PCTL SIUL should be enable in this mode.

   Best regards

                Erwan

nooshin_1382
Associate II
Posted on August 12, 2015 at 11:12

Hello Erwan

thanks for your response

Is the intermediate Low Power equal to stop mode or not i am a begginer in this issue

can you show me how can i do this or show me a refrence or example for this issue ?

I try to go to stop mode and set the SIU PCTL but when i come back from this mode the MCU  not work correctlly .

thanks

Best Regards

Nazerian Vanima

Erwan YVIN
ST Employee
Posted on August 17, 2015 at 10:55

Hello Vanima ,

I think that when you go into the STOP mode.

you have to take care because the FLASH is in power-down mode

i advice you to put the function in RAM.

have you got an example of your application?

you can send me directly by email.

            Best regards

                        Erwan

nooshin_1382
Associate II
Posted on August 20, 2015 at 07:50

Dear Erwan

I much appreciate you for your kind guidance.

I try so much to try send the example by email but when i send to your old email the ST server

Reject my Email ,i do not know why , because of this issue i send the example in here . 

The attachment you can find the my example code. The main code is including from 3 functions(led_blinking(), led_timer_start(), and led_timer_stop) and an

interrupt function(IRQ_HANDLER(vector61)). The target is the blinking an led every 1 second. The tick_time variable is set in timer interrupt function.

The main question is how I can run the code in sleep mode.\

Meaanwhile, the other functions such as

Best Regard,

looking forward to hearing from you,

Erwan YVIN
ST Employee
Posted on August 25, 2015 at 15:56

Hello Vanima ,

In SLEEP Mode (STANDBY), it is a destructive reset. You will lose your PIN status RUN0 (main / led_blinking) ==> STANDBY ==> DRUN (WKPU IRQ by timer RTC) ==> RUN0 (main) except I recommend you to use the STOP mode RUN0 (main / led_blinking) ==> STOP (WKPU IRQ by timer RTC or Normal IRQ by PIT) ==> RUN0 (main) you reset your peripherals and you go to the Main Branch I recommend you to use the STOP mode PCTL 92 should be enabled on STOP Mode

PIT configuration 
////////////////////////////////////
IRQ_HANDLER(vector61)
{
OSAL_IRQ_PROLOGUE();
// Reset the PIT
PIT.CH[2].TFLG.R = 1;
tick_time = 1;
// GO TO RUN MODE
OSAL_IRQ_EPILOGUE();
}

while
(1)
{
led_blinking();
// GO TO STOP MODE
}

Best Regards Erwan
nooshin_1382
Associate II
Posted on August 26, 2015 at 09:24

Hello Erwan

Thanks so much , I try this code and tell you about that .

Best Regards

Nazerian Vanima