AnsweredAssumed Answered

Low Power Modes on stm32f0discovery board not functioning.

Question asked by Andrew A. on Aug 5, 2014
Latest reply on Aug 11, 2014 by Andrew A.
I am trying to use the standby mode on my discovery board in conjunction with digital IO as well as a UART line.  I try to send data over the UART then go into standby mode and then wake up to just put out the same data over UART.  It sends the correct data over the UART line but after that it just spits out the character "à" (the same number of character that I had tried to send out).  I believe the it is not making it completely into standby mode because when I rerun my initialization code just after sending it into standby mode, it will at least send the correct characters, but that is not really solving my problem.  I have set up the code using the cube software.  Here is the my main loop.

Edit: I Found the "Format Code Block" button!!!
01.while (1)
02.  {
03.        if(HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_1))
04.        {
05.            HAL_UART_Transmit(&huart1,sendData,sendSize,sendTimeout);
06.            while(HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_1))
07.            {
08.            }
09.            HAL_PWR_EnterSTANDBYMode();
10.            //MX_USART1_UART_Init();
11.        }
12.        else
13.        {
14.            HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_9);
15.            while(!HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_1))
16.            {
17.            }
18.        }
20.  }