AnsweredAssumed Answered

Garbage Printing after wake up from STOP 2 mode - stm32l476rg

Question asked by H UQ on Jun 4, 2018
Latest reply on Jun 4, 2018 by H UQ

Hi, 

 

We are working on STM32L476_NUCLEO board. We successfully entered and exit from STOP 2 mode upon RTC timer expiry. However, when we print a message after wake up, garbage is printed. Here is the code. 

 

print ("Going to STOP 2 mode"); // Printed on console 

USART2 -> CR1 |= 2;

 

/* Enter into STOP 2 Mode */

WRITE(0xE000ED10, READ(0xE000ED10) | 1<<2);

temp32 = READ32(PWR_CR1);
WRITE32(PWR_CR1, temp32 | PWR_CR1_LPMS_STOP2);

 

WFI_EXECUTE();

 

WRITE(0xE000ED10, 0);

WRITE(PWR_CR1, temp32);

 

/* Successfully returned from STOP 2 mode */

USART2 -> CR1 &=  ~2;

print ("\r\nBack"); // Funny characters are printed. 

 

Regards

Outcomes