Pro test chicken soup! ! stm32 is used to enter the stop mode interrupt and the interrupt used to generate the wake-up. The preemption priority of the latter must be high, otherwise it will not be able to wake up!

When I did the experiment before, I encountered a very serious problem during the experiment, that is, the stop mode cannot be awakened.

The main content of the experiment is: use an external interrupt response to make the program enter the shutdown mode. Then through another external interrupt or alarm interrupt to wake up the microcontroller. But debugging for a long time

For the interrupt used to enter the stop mode and the interrupt used to generate the wake-up, the latter must have a high preemption priority , otherwise the wake-up will not be possible.

Analyze the reason from the experimental results:

After entering the stop mode, the regulator provides 1.8V power in the low power consumption mode without disconnection, and the contents of the register are still maintained, so the program is still in the interrupt . But when another interrupt comes to wake up, because the preemption priority is not high enough, the original interrupt cannot be preempted, so it cannot be awakened. Therefore, only the interrupt used to wake up has a high preemption priority, can wake up! !


Guess you like

Origin blog.csdn.net/ludaoyi88/article/details/50836933