Skip to main content
Jonathan Frech
Associate II
March 16, 2020
Question

Switch Block influencing stop2?

  • March 16, 2020
  • 1 reply
  • 649 views

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?

This topic has been closed for replies.

1 reply

Mohamed Aymen HZAMI
ST Employee
March 27, 2020

Hello,

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

Thanks and Best Regards,

Mohamed Aymen.