cancel
Showing results for 
Search instead for 
Did you mean: 

Switch Block influencing stop2?

Jonathan Frech
Associate II

I'm seeing the following problem:

In normal Mode, the current function to run, is from a swich/case block inside main();. This works perfectly fine in run mode. Some cases end up in STOP2, and change state (the switch/case) variable after the wakeup process. Now while processing further in code, im getting the following issue

Until i hit 27th switch case, the code works perfectly fine. After creating the 27th switch case, the mcu cannot wake up from stop2 mode, just nothing happens. While measuring the current of the mcu, i see a rise in current when pushing the wake-up button, but none significant, possibly only the current trough the switch.

It does not matter if the switch-case is usefull or not, if i just put nothing or "nop" inside the switch case, it acts the same. When i comment the stop function out, and replace by "while(notPressed());" the problem does not occur.

I'm using the L433 and Atollic.

Does anyone has seen similar problems? What could be the cause?

1 REPLY 1
Mohamed Aymen HZAMI
ST Employee

Hello,

Could you please share your code with us to understand and reproduce your problem.

Thanks and Best Regards,

Mohamed Aymen.