cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152RE - Stop Mode Locking MCU intermittently

bmalchow
Associate
Posted on November 05, 2015 at 15:31

Hello,

I have an application where I enter stop mode once the processor is done with all its tasks.  I know the MCU is going to sleep because it draws < 1uA.  Prior to entering stop mode I change the UART RX pin to an input pulled up with an EXTI interrupt.

The other processor than wakes the STM32L152RE via UART; the processor does what it has to do than returns to sleep.

Once in awhile, when entering stop mode the micro draws roughly 70 uA and does not wake, essentially it locks up.

What's more interesting is that when I enable debug in stop mode (DBGMCU->CR |= DBGMCU_CR_DBG_STOP) the problem goes away all together.

Any help would be greatly appreciated!

-Ben
1 REPLY 1
bmalchow
Associate
Posted on November 05, 2015 at 17:22

I found the issue.  You must execute a DSB() before a WFI() or WFE().