Hello @yalin_10,
Could you please use GPIO_PinWrite() instead of GPIO_WritePinOutput() as this function is deprecated?
Also, did you receive an error window? Did the program stop when you receive only 5 bytes? Or the communication continues? In case you receive an error window, or the program stops while debugging, could you please share them with us?
Finally, could you please make sure you are sending one character at a time? For example, in the lpuart_polling example if you input/send too many characters each time, the receiver may overflow.
Best regards, Raul.