2015-08-09 05:55 AM
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 Vanima2015-08-12 01:39 AM
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 Erwan2015-08-12 02:12 AM
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 Vanima2015-08-17 01:55 AM
Hello Vanima ,
I think that when you go into the STOP mode.you have to take care because the FLASH is in power-down modei 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 Erwan2015-08-19 10:50 PM
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,2015-08-25 06:56 AM
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 ModePIT 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
2015-08-26 12:24 AM
Hello Erwan
Thanks so much , I try this code and tell you about that . Best Regards Nazerian Vanima