/* set the wake-up event:
* specify wake-up on RXNE flag */
WakeUpSelection.WakeUpEvent = UART_WAKEUP_ON_READDATA_NONEMPTY; //; //UART_WAKEUP_ON_STARTBIT
if (HAL_UARTEx_StopModeWakeUpSourceConfig(&huart1, WakeUpSelection)!= HAL_OK)
{
//Error_Handler();
}
/* Enable the UART Wake UP from stop mode Interrupt */
__HAL_UART_ENABLE_IT(&huart1, UART_IT_WUF);