STM32WL enters STOP2 mode but can't use the lpuart wake_up
Hello folks,when I was using the HAL library function to implement MCU wake-up service from STOP2 mode through LPUART serial port, I found that no matter how the data was sent, the MCU could not exit STOP2 mode. Below are the relevant configurations configured by my cubemx,the MCU I am using is STM32WLE5CCU6.



Related MAIN Codes:
UART_WakeUpTypeDef WakeUpSelection={0};
void sss(){
printf("[INFO]Enter Stop!\n");
HAL_Delay(10); //??
WakeUpSelection.WakeUpEvent = UART_WAKEUP_ON_STARTBIT;
if (HAL_UARTEx_StopModeWakeUpSourceConfig(&hlpuart1, WakeUpSelection) != HAL_OK)
{
Error_Handler();
}
while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_BUSY) == SET);
while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_REACK) == RESET);
__HAL_UART_ENABLE_IT(&huart1,UART_IT_WUF);
HAL_UARTEx_EnableStopMode(&huart1);
HAL_Delay(10);
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON,PWR_SLEEPENTRY_WFE);
}
void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart) {
SystemClock_Config();
HAL_ResumeTick();
MX_GPIO_Init();
MX_LPUART1_UART_Init();
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_SET);
}
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
MX_LPUART1_UART_Init();
MX_RTC_Init();
/* USER CODE BEGIN 2 */
// Get_Flash();
HAL_UARTEx_ReceiveToIdle_IT(&hlpuart1,uart_buff,sizeof(uart_buff));
HAL_UARTEx_ReceiveToIdle_IT(&huart1,uart_buff2,sizeof(uart_buff2));
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_RESET);
HAL_Delay(2000);sss();
HAL_UARTEx_DisableStopMode(&hlpuart1);
HAL_UARTEx_ReceiveToIdle_IT(&hlpuart1,uart_buff,sizeof(uart_buff));
printf("LORA START!\r\n");
while (1){}These are some problems I have encountered, and I hope the experts can propose some solutions,thank you.
Edited to apply source code formatting - please see How to insert source code for future reference.
